RocketCOMS

Send a Message

Send a single outgoing message for a campaign.

Line breaks are supported in the message with the special character \n (Line Feed). To avoid having an extra space in your message, do not put a space after \n.

For example, enter the message as:
\nHello World
not:
\n Hello World

Note  An SMS message is limited to 140 bytes, which is 160 7-bit characters. Inclusion of 8-bit characters (such as [ ] \ | ) may reduce the number of characters included in the message. For messages over 140 bytes, RocketCOMS will split the message into multiple segments. These segments are then stitched back together into a single message on the subscriber’s mobile device. Because each segment is charged as a separate SMS message, sending long messages may increase the cost to the subscriber. Note that if you’re using URL shortening, RocketCOMS uses the message length after the URLs are shortened to determine if segmentation is required.

Endpoint

POST /v1/messages/outgoing

Authorization Header

Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding

Request Body

campaignId  REQUIRED

string

ID of the campaign sending the outgoing message.

destinationNumber  REQUIRED

string

Destination phone number for the message.

message  REQUIRED

string

Content of the message.

shortlink  REQUIRED

boolean, default: false

Whether all URLs in SMS messages will be sent as short links.

Returns

If successful, returns 200 Message was sent successfully.

SAMPLE REQUEST

				
					{
  "campaignId": "d7b0e25f-30c9-456b-b287-6b3dcaa4b8f7",
  "destinationNumber": "5555556789",
  "message": "Spring Sale Starts Today",
  "shortlink": false
}
				
			

SAMPLE RESPONSE

				
					{
  200 Message was sent successfully
}