Send an SMS message

Send an SMS message. Use request parameters to specify the type of message, what phase of the account lifecycle the message is being sent in, and additional details about the transaction.

General requirements

  • Authentication: Basic (easiest to implement) or Digest
  • Encoding: Accepts only UTF-8 unicode characters as inputs.
  • Accepts: application/x-www-form-urlencoded
  • Required headers: Content-Type - application/x-www-form-urlencoded
  • Rate limit: Default rate limits by product
Log in to see full request history
Form Data
string
required

The end user's phone number with country code included. Avoid use of special characters and spaces.

string
required

Text of the message to be sent to the end user. You are limited to 1600 characters. If you send a very long message, Telesign splits your message into separate parts. Telesign recommends against sending messages that require multiple SMSes when possible.

string
required

This parameter specifies the traffic type being sent in the message. You can provide one of the following values -

  • OTP (One time passwords)
  • ARN (Alerts, reminders, and notifications)
  • MKT (Marketing traffic)
string

This parameter allows you to indicate what phase of the lifecycle you are in when you send a transaction. The options for this parameter are -

  • create - For the creation of a new account)
  • sign-in For when an end user signs in to their account.
  • transact - For when an end user completes a transaction within their account
  • update - For when an update is performed, such as an update of account information or similar.
  • delete - For when an account is deleted.
string
length ≤ 20

This parameter allows you to set a specific sender ID to be used on an SMS message sent to the end user. In order to use a specific sender ID, Telesign must whitelist your selected sender ID values. Be aware that 100% preservation of a sender ID value is not guaranteed. Telesign may override the sender ID value that your end user will receive in order to improve delivery quality or follow SMS regulations in particular countries. In order to use this feature, you must contact Telesign Support and have them enable it for you. We recommend limiting values to 0-9 and A-Z, as support for other ASCII characters varies by carrier.

string

A customer-generated ID for this transaction. The response simply echoes the value provided for this parameter.

string

Your end user's IP address (do not send your own IP address). This is used to help Telesign improve our services. IPv4 and IPv6 are supported. For IPv4, the value must be in the format defined by the Internet Engineering Task Force (IETF) in the Internet-Draft document titled Internet Protocol. For IPv6, the value must be in the format defined by the IETF in the Internet-Draft document titled IP Version 6 Addressing Architecture.

string

A URL where you want delivery reports to be sent related to your request. This overrides any default callback URL that you’ve previously set. The override only lasts for this request.

string
Defaults to true

Whether you are using this service as your primary provider to send this message (”true”) or as a backup after your primary provider failed (”false”). We use this data to optimize message routing.

string
length ≤ 40

(India-local traffic only). The ID of the DLT template used for this message. See India DLT Update for more details on the relevant regulations.

string
length ≤ 40

(India-local traffic only). The ID of the entity sending this message. See India DLT Update for more details on the relevant regulations.

Responses

Response body
object
string
required

A unique, randomly generated hex value that identifies your web service request.

status
object
required
integer
required

A numeric code that indicates the status of your transaction.

string
required

Text describing the status of your transaction.

string

Indicates whether the end user's phone number provided in the request was modified before processing by Telesign to increase message deliverability.
Contact our Customer Support Team to enable this feature. Possible values are "True" and "False".

string

The customer-generated ID for this transaction that was provided in the request. If the external_id parameter was not included in the request, the value here is null.

string

The corrected version of the submitted phone number returned in the response after common formatting issues are fixed to improve deliverability. If there are no changes, the original phone number from the request is returned. Contact our Customer Support Team to enable this feature.

status.code and errors.code properties in the response payload, rather than the HTTP status code of the response.

Status codeAssociated text string
10000System Unavailable, Please try again later.

Language
Credentials
: