Inbound SMS
Wavecell SMS API exposes a webhook mechanism to let you receive Inbound SMS (SMS sent to your virtual numbers) on a callback URL of your choice. Whenever you receive inbound SMS, the Wavecell SMS platform sends a POST request to the endpoint of your choice with a JSON body containing the inbound SMS and the associated data.
Requirements
To use Wavecell inbound SMS capabilities, liaise with your account manager to activate the following:
- A virtual mobile number where your user will send their SMS
- An inbound SMS callback URL: indicate us to which URL Wavecell platform should forward the inbound messages addressed to your MO number (you can configure your callback using the POST webhook endpoint)
Inbound SMS flow
- A user sends an SMS to one of your virtual numbers
- Wavecell receives the SMS on your behalf
- Wavecell programmatically sends the SMS to the callback URL configured for your virtual number by sending a POST request there.
- The POST request body, in JSON format contains the SMS body and all associated data (UMID, source, destination, encoding, timestamp)
Webhook format
Sample of POST request body sent to your callback URL:
{
"umid":"216F40E1-3DAA-4725-B7C6-000181A794CE",
"type":"inbound",
"source":"+11111111111",
"destination":"+22222222222",
"body":"Hello, World!",
"encoding":"UCS2",
"receivedAt":"2018-06-06T10:21:21.0917564Z",
"version":2
}
Request body - Parameters description:
parameter name | Description |
---|---|
umid | Unique message ID for the inbound message |
type | Type of message: inbound |
source | Originating address of the SMS (sender number) |
destination | Destination address of the SMS (MO number) |
body | Content of the SMS |
encoding | Encoding used in the SMS body (GSM7 / UCS2) |
receivedAt | Date and time of reception (GMT) |
version | Version of the MO webhook: 2 |
NB: if the request you receive has a different structure than the sample above, please contact support@wavecell.com to activate the latest format for your account.