Welcome
Login  Sign up

Table of contents

  1. Message polling
  2. Message pushed 
  3. Message delivered 
  4. Message delivery error 
  5. Message replies 
  6. Unsubscribe

Live sms webhooks are available for a number of event types.

Below are the webhook event types we currently send.

Message polling

The SMS recipients mobile number is validated to check whether it is:

  1. An invalid number
  2. A duplicated number
  3. An unsubscribed number

Example callback payload (JSON):

{
"eventType":"message_polling",
"timestamp":1572417372,
"campaignID":"908322f4-fadf-11e9-8276-021e81eba81c",
"address":"61400000402",
"reference":"7c545c11-e189-470a-b5b8-3905b5acd2dc",
"status":"SEND"
}

Example callback payload (XML):

<address>61400000402</address>
<campaignID>908322f4-fadf-11e9-8276-021e81eba81c</campaignID>
<eventType>message_polling</eventType>
<reference>7c545c11-e189-470a-b5b8-3905b5acd2dc</reference>
<status>SEND</status>
<timestamp>1572417372</timestamp>


Message pushed

Once an SMS has passed initial validation steps, it is pushed into the message queue.

Example callback payload (JSON):

{
"eventType":"message_pushed",
"timestamp":1572417373,
"campaignID":"908322f4-fadf-11e9-8276-021e81eba81c",
"address":"61400000401",
"reference":"7c545c11-e189-470a-b5b8-3905b5acd2dc",
"status":"ACCEPTED"
}

Example callback payload (XML):

<address>61400000401</address>
<campaignID>908322f4-fadf-11e9-8276-021e81eba81c</campaignID>
<eventType>message_pushed</eventType>
<reference>7c545c11-e189-470a-b5b8-3905b5acd2dc</reference>
<status>ACCEPTED</status>
<timestamp>1572417373</timestamp>


Message delivered

Messages that have been successfully delivered receive a delivered status.

If an SMS is unable to be received by the recipients phone, an enroute status will be received.

Example callback payload (JSON):

{
"eventType":"message_delivered",
"timestamp":1572417966,
"campaignID":"ed813be8-fae0-11e9-b2d8-021e81eba81c",
"address":"61400000405",
"reference":"e6d6f0f6-3218-4f3b-a85d-40e977d4b026",
"status":"ENROUTE"
}

Example callback payload (XML):

<address>61400000405</address>
<campaignID>ed813be8-fae0-11e9-b2d8-021e81eba81c</campaignID>
<eventType>message_delivered</eventType>
<reference>e6d6f0f6-3218-4f3b-a85d-40e977d4b026</reference>
<status>ENROUTE</status>
<timestamp>1572417966</timestamp>


Message delivery error

If a message is unable to be delivered after a period of 48 hours, a delivery error response will be received.

Example callback payload (JSON):

{
"timestamp":1510630222,
"eventType":"message_delivery_error",
"campaignID":"theCampaignID",
"status":"UNDELIVERABLE",
"reference":"reference",
"address":"61419xxxxxx"
}

Example callback payload (XML):

<address>61419xxxxxx</address>
<campaignID>theCampaignID</campaignID>
<eventType>message_delivery_error</eventType>
<reference>reference</reference>
<status>UNDELIVERABLE</status>
<timestamp>1510630222</timestamp>


Message replies

When a user replies to a message, a replied response will be received.

Example callback payload (JSON):

{
"eventType":"message_received",
"timestamp":1572418177,
"sentFrom":"61400000405",
"messageText":"abctestduocvo",
"campaignID":"ed813be8-fae0-11e9-b2d8-021e81eba81c"
}

Example callback payload (XML):

<campaignID>ed813be8-fae0-11e9-b2d8-021e81eba81c</campaignID>
<eventType>message_received</eventType>
<messageText>abctestduocvo</messageText>
<sentFrom>61400000405</sentFrom>
<timestamp>1572418177</timestamp>


Unsubscribe

If an SMS recipient selects to unsubscribe, a callback is received with the unsubscribed contact details.

The webhook can also be triggered by entering a mobile number to the Manage unsubscribe list.

Example callback payload (JSON):

{
"eventType":"unsubscribe",
"timestamp":1572418492,
"contactID":"NotAContact",
"campaignID":"cfb0f616-fae1-11e9-a21c-021e81eba81c",
"address":"61400000407"
}

Example callback payload (XML):

<address>61400000407</address>
<campaignID>cfb0f616-fae1-11e9-a21c-021e81eba81c</campaignID>
<contactID>NotAContact</contactID>
<eventType>unsubscribe</eventType>
<timestamp>1572418492</timestamp>

Unsubscribe links are not automatically added. For an opt-out link to be included in your SMS you must add the {OptOutURL} shortcode.Learn more about managing webhooks

Did you find it helpful? Yes No