Sending a Simple Campaign

How to send a basic campaign

POST https://api.cm.com/messages/v1/accounts/{accountId}/messages

Example post body:

{ "body": "This is a test message", "recipients": [ { "group": "b99f6d4f-243a-11e7-9742-005056b0187a" }, { "contact": "0b7bf29a-2439-11e7-9742-005056b0187a" }, { "msisdn": "+31765727000" } ], "senders": ["TEST"] }

recipients : Contains an array of recipient objects, for any given phone number msisdn must be specified. If you want to send to Addressbook groups/contacts you need to specify the guids.

senders : Contains an array of string(s), specifies the sender.

Campaign will be sent immediately.


Example curl request :

curl -X POST \ https://api.cm.com/messages/v1/accounts/z9761684-b8d0-440f-8508-72ec36766069/messages \ -H 'Accept: application/json, text/json' \ -H 'Content-Type: application/json' \ -H 'X-CM-PRODUCTTOKEN: ce4e6c52-5696-405b-9524-e478468f1907' \ -d '{ "body": "This is a test message", "recipients": [ { "group": "b99f6d4f-243a-11e7-9742-005056b0187a" }, { "contact": "0b7bf29a-2439-11e7-9742-005056b0187a" }, { "msisdn": "+31765727000" } ], "senders": ["TEST"] }'


Did this page help you?