REST Documentation

View InboundXML Docs

Send SMS Message

Outbound SMS messages can easily be sent via our REST API.

Request URI

Sending of a message via our REST API is achieved using the HTTP POST method. The format of the URI used to make the POST request is below.

POST https://api.telapi.com/v2/Accounts/{AccountSid}/SMS/Messages

Parameters

The parameters below are used to specify the SMS behavior.

Parameter Description
required
SMS capable phone number
required
The number you want to send the SMS from. This should be one of your SMS enabled TelAPI numbers.
Allowed Value:
SMS enabled TelAPI number
required
Text of the SMS message to be sent. If greater than 160 characters, the SMS will be rejected by TelAPI.
Allowed Value:
plain text up to 160 characters in length
optional
URL that the status of the SMS and a set of default parameters will be forwarded to.
Allowed Value:
valid URL
optional
Specifies the HTTP method used to request the StatucCallback URL.
Default Value:
POST
Allowed Value:
POST or GET

Example Response

An example of what a response to a send SMS request may look like is below.



Helper Example

Our helper libraries simplify the task of making REST API calls while programming. The code below will perform a request to TelAPI.



Tips

  • There is a 70 character limit on SMS Messages which contain unicode symbols.
  • There is a 1 SMS per second rate limit on SMS Messages by default. If you need to send SMS messages at a higher rate, contact us.

SMS Filtering

All TelAPI numbers which haven't yet had a user supplied SMS request URL set are provided with the following default SMS filtering behaviors:

  • If a recipient replies to a TelAPI SMS message with STOP, QUIT, or UNSUBSCRIBE, they will no longer receive SMS messages from that number.
  • The keywords START, YES, or SUBSCRIBE revert this blocking.
  • HELP informs the recipient of the above keywords.
  • Once an SMS request URL is set, this default behavior stops, allowing developers to implement their own SMS filtering solution.