Incoming SMS


Incoming SMS enables businesses or organizations to receive text messages from their customers or users

  • Customer initiates an SMS by composing a text message on their mobile device and sending it to a designated phone number provided by the business. This phone number can be either a short code (a shorter phone number, usually 5 or 6 digits) or a long code (a standard 10-digit phone number).

  • Exotel receives the message from the SMS gateway and sends the text message to the callback URL shared by the business. Exotel also stores the data SMS record for reporting purposes.

  • Upon receiving the SMS business can then send an appropriate response back to the customer or do any further processing.

  • It enables two-way communication, allowing businesses to engage with their audience and gather valuable feedback, inquiries, or responses


Prerequisite for incoming SMS

In order to start receiving the inbound/incoming messages from your consumers, you will have to do the following:

  1. Purchase a long code or short code from Exotel for incoming SMSs

  2. Use the callback method to receive the SMS body sent by the consumers directly to your system

  3. Configure the callback URL against the long code or short code in Exotel system via [email protected]


Callback format and details:

Sample request to your webhook:

curl -X POST 'https://YOUR_URL/' \

-H "Content-Type: application/json" \

-d  '{

  "SmsSid": "2Q08orixl5wTp8Z8upk9Hb3sDcl",

  "Direction": "incoming",

  "Sender": "+911234567890",

  "ReceivedOn": "12345",

  "MessageBody": "Message body of incoming sms",

  "ReceivedTime": "2023-05-18T16:11:01Z"

}'


Parameter 

Description

SmsSid

Unique identifier of SMS (Alpha numeric)

Direction

Incoming 

Sender

The consumer’s phone number with which the incoming SMS was received

ReceivedOn

The long code or short code on which the incoming SMS was received 

MessageBody

The body of the SMS sent by the consumer

ReceivedTime

Timestamp when the message is received in UTC format


Inclusions:

  1. Support for both long code and shortcode

  2. Callback [developed by the customer] in Exotel-defined format

    1. Separate callback per long code or shortcode

  3. Billing and Reporting



FAQs:

  1. What are short code and long code? 


Short Code:

  • A shortcode is a special telephone number typically composed of 5 or 6 digits, such as 12345 or 54321. 

  • Short codes are usually easy to remember and are primarily used for sending high-volume, automated messages etc. 

  • Shortcode can be shared or dedicated. Share shortcodes are shared across different businesses. 

  • The businesses using the shared shortcode typically have unique keywords associated with their services or campaigns.


Long Code:


  • A long code, also known as a long virtual number, is a standard, full-length telephone number that includes the country code. For example, a long code in India might look like +91-8967712345.

  •  Long codes are regular phone numbers that can send and receive SMS messages.

  •  They are particularly useful when businesses want to engage in individual conversations with customers.

  • They are typically used for low to moderate message volumes.

  • They are more affordable and easier to acquire compared to shortcodes.