Add Campaign
Campaigns
Adds a Campaign.
POST https://api.cm.com/messages/v1/accounts/{accountId}/messages
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path | accountId required | The accountId. | string (uuid) |
Body parameter
The Campaign.
Name : message
Flags : required
Type : CM.Platform.Campaigns.Models.ApiCampaignRequest
Responses
HTTP Code | Description | Schema |
---|---|---|
201 | Created | CM.Platform.Campaigns.Models.ApiCampaignResponse |
Example HTTP request
Request path
https://api.cm.com/messages/v1/accounts/00000000-0000-0000-0000-000000000000/messages
Request body
{
"body" : "test",
"channels" : ["SMS"] ,
"countrySpecificSenders" : {
"NL" : "CM.com"
},
"ignoreUnsubscribes" : false,
"name" : "My Test Campaign",
"recipients" : [ {
"contact" : "00000000-0000-0000-0000-000000000000",
"data" : {
"1" : "Data is only allowed when using msisdn"
},
"group" : "00000000-0000-0000-0000-000000000000",
"msisdn" : "+3163710000"
} ],
"recurrence" : "not yet implemented",
"scheduledAtUtc" : "2019-01-11T13:15",
"senderPreset" : "00000000-0000-0000-0000-000000000000",
"senders" : [ "CM.com" ],
"spread" : {
"timeFrames" : [ {
"days" : [ "currently not available" ],
"startTime" : "currently not available",
"endTime" : "currently not available"
} ],
"until" : "2019-01-12T13:15"
},
"options": {
"urlShortenerDomainId": "00000000-0000-0000-0000-000000000000"
}
}
Example HTTP response
Response 201
{
"id" : "00000000-0000-0000-0000-000000000000",
"analytics" : {
"accepted" : 0,
"converted" : 0,
"delivered" : 0,
"euroPrice" : 0.0,
"failed" : 0,
"localCurrency" : "string",
"localPrice" : 0.0,
"optedOut" : 0,
"recipients" : 0,
"test" : 0
},
"body" : "string",
"channels" : ["SMS"] ,
"countrySpecificSenders" : {
"string" : "string"
},
"ignoreUnsubscribes" : false,
"name" : "string",
"recipients" : [ {
"contact" : "00000000-0000-0000-0000-000000000000",
"data" : {
"string" : "string"
},
"group" : "00000000-0000-0000-0000-000000000000",
"msisdn" : "string"
} ],
"recurrence" : "string",
"scheduledAtUtc" : "string",
"senderPreset" : "00000000-0000-0000-0000-000000000000",
"senders" : [ "string" ],
"spread" : {
"timeFrames" : [ {
"days" : [ "string" ],
"startTime" : "string",
"endTime" : "string"
} ],
"until" : "string"
},
"status" : "string",
"options": {
"urlShortenerDomainId": "00000000-0000-0000-0000-000000000000"
},
"createdAtUtc" : "string",
"createdBy" : "00000000-0000-0000-0000-000000000000"
}
Updated about 2 years ago