S M S

Sending SMS

POST
/sms/v1/messages

Use messages endpoint to send Single or Bulk SMS. When you send SMS messages using this API, the API will return to you the sent messages’ ID to track them later using Cequens Get Message Details by ID API.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT access token returned by Signing In (POST /auth/v1/tokens/).

In: header

Request Body

application/json

messageText*string

The message content that you want to send.

senderName*string

The name of the message sender.

Default"Cequens"
messageType*string

Message type either text or unicode Can be text or unicode

Default"text"
recipients*string

The intended recipients’ phone numbers.

clientMessageId?integer

An integer used as an identifier for your request to track it.

Formatint32
deliveryTime?string

A string that includes the desired delivery time of the SMS.

dlrUrl?string

A string to define the URL to which you would like to send the delivery receipts (DLR).

dataCoding?string

A string to define the data coding scheme of the SMS.

shortURL?boolean

set it to true, if the messageText contains URL and you want to shorten it

Defaultfalse

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/sms/v1/messages" \  -H "Content-Type: application/json" \  -d '{    "messageText": "string",    "senderName": "Cequens",    "messageType": "text",    "recipients": "string"  }'
"{\n  \"replyCode\": 0,\n  \"replyMessage\": \"Request handled successfully\",\n  \"requestId\": \"2fbc0560-6187-11e7-b60b-77c0e21cef84\",\n  \"clientRequestId\": 0,\n  \"requestTime\": \"2017-07-05T15:38:10.742\",\n  \"data\": {\n    \"SentSMSIDs\": [\n      {\n        \"SMSId\": \"0461f8f4-4c4f-4dc0-b7ed-097f4f9f85f4\"\n      }\n    ],\n    \"InvalidRecipients\": \"\"\n  }\n}"