Documentation

LogIn
  • Home
  • API
  • Incoming SMS Callback (Text Message)

In order to receive text messages events, you need to ensure you have set up your account callback URL under Company settings > API



Parameters Sample Description
type message-received will always be message-received for incoming messages.
from 3056490655 One of your telephone numbers assigned under the account, if not assigned, will result in error.
to 9195551212 The phone number the message should be sent to
message_body string The contents of the text message.
direction in It will be always "in" for recieved messages.
segmentCount number How many messages this message counted as (each segement is 259 characters).
message_id string Unique ID for the message

Example:


				

Example :

POST /your_url HTTP/1.1
Content-Type: application/json; charset=utf-8

Response :

  1. {
  2. "type":"message-received",
  3. "time":"2016-09-14T18:20:16Z",
  4. "from":"626446262",
  5. "to":"305689888",
  6. "direction":"in",
  7. "message_body":"This is the message body",
  8. "segmentCount":"1",
  9. "message_id":"Hmdbn479ikf7",
  10. }