Calculate Campaign Cost
Gets cost estimation for specified message
POST https://api.cm.com/messages/v1/accounts/{accountId}/messages/cost
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path | accountId required | The accountId. | string (uuid) |
Body parameter
The campaign object
Name : campaign
Flags : required
Type : CM.Platform.Campaigns.Models.ApiCampaignRequest
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | OK | CM.Platform.Campaigns.Models.ApiCampaignCost |
Example HTTP request
Request path
https://api.cm.com/messages/v1/accounts/00000000-0000-0000-0000-000000000000/messages/cost
Request body
{
"isArchived" : true,
"body" : "string",
"channels" : [ "string" ],
"countrySpecificSenders" : {
"string" : "string"
},
"grouping" : "string",
"ignoreUnsubscribes" : true,
"name" : "string",
"recipients" : [ {
"contact" : "00000000-0000-0000-0000-000000000000",
"data" : {
"string" : "string"
},
"group" : "00000000-0000-0000-0000-000000000000",
"msisdn" : "string"
} ],
"recurrence" : "string",
"content" : [ {
"media" : {
"mediaName" : "string",
"mediaUri" : "string",
"mimeType" : "string"
},
"whatsAppTemplate" : {
"templateId" : "00000000-0000-0000-0000-000000000000",
"languageCode" : "string",
"languageFixed" : true,
"parameters" : [ {
"text" : "string",
"currency" : "string",
"currencyAmount" : "string",
"currencyCode" : "string",
"currencyDecimalSeparator" : "string",
"dateTime" : "string",
"dateOptions" : {
"showDayOfWeek" : true,
"showYear" : true,
"showMonth" : true,
"showDayOfMonth" : true,
"showHour" : true,
"showMinute" : true
}
} ]
},
"text" : "string"
} ],
"scheduledAtUtc" : "string",
"senderPreset" : "00000000-0000-0000-0000-000000000000",
"senders" : [ "string" ],
"spread" : {
"durationMinutes" : 0,
"timeFrames" : [ {
"days" : [ "string" ],
"startTime" : "string",
"endTime" : "string"
} ],
"until" : "string"
},
"status" : "string",
"options": {
"urlShortenerDomainId": "00000000-0000-0000-0000-000000000000"
},
"updatedAtUtc" : "string"
}
Example HTTP response
Response 200
{
"charsLeft" : 0,
"charsToRemove" : 0,
"countryCosts" : [ {
"cost" : 0.0,
"countryCode" : "string",
"isMultipart" : true,
"messageCount" : 0,
"recipientCount" : 0
} ],
"currency" : "string",
"isMultipart" : true,
"messageCount" : 0,
"minDeliveryTime" : 0,
"recipientCount" : 0,
"totalCost" : 0.0
}
Updated about 2 years ago