Send An SMS Message

Send an SMS message: POST /sms

Send an SMS message to a phone or device.


See also:
Check SMS Delivery Status

Request Components

HTTP Request


Resource Path and Query Parameters


Header Parameters

The request header must contain a current ThingSpace authorization bearer token.

Parameter Name Data Type Description
string HTTP Authorization request header.

Request Body

The body contains the destination number, message, and other values.

Parameter Name Data Type Description
string The phone number (MDN) of the recipient phone or device.
string The long code that you want to send the message from.
string Text content of the message.
string A unique identifier for this request provided by your application. Maximum length is 40 characters.
boolean Request a delivery report for this message. Default is false. You can also check the delivery status of a message with a separate request.

Example Request Body

  "recipient": "8587546063",
  "senderAddress": "1609051527",
  "content": "Can you read me now?",
  "transactionID": "b149870-1e49cd-123456",
  "deliveryReport": true

Success Responses

Status 200

A success response includes the status of the request.

Parameter Name Data Type Description
transactionID string Same as transactionID in request.
messageID string Unique ID of the message.
statusCode string Status code of the request. See Status Codes for a list of status codes and texts.
statusText string Status text of the request. See Status Codes for a list of status codes and texts.
details string Details of the status.

Example Success Response

  "transactionID": "b149870-1e49cd-123456",
  "messageID": "vmp1_3033003",
  "statusCode": "1000",
  "statusText": "Success",
  "details": ""

Failure Responses

Status 400

All error messages are returned in this format:

  "error": "The type of error, such as INVALID_REQUEST.",
  "error_description": "Additional error information.",
  "error_url": "Optional URI with more information about the error."

The error_url field will not be present if there is no URI for more information.

Error codes and messages are listed on the Status Codes page, along with explanations and suggestions for corrective actions.

Try It Out!