Webhooks V2 (Post)

All the types of events and parameters that we currently send using Webhooks V2.

If you plan to use Webhooks V2 to receive delivery statuses and/or replies then you should be familiar with the following:

  • JSON
  • HTTP
  • REST

When using Webhooks V2 your endpoint must process the received data as a POST request.

Delivery Statuses (DLRs)

In our request to you, the delivery status will include the following data in the form of a plain text body:

KeyTypeDescription
StatusstringThe status that the handset responded with. Please refer to the list of possible delivery statuses here.
EventIDlongThe system generated ID for this event (or batch) of messages
MccintegerThe Mobile Country Code is the country where the mobile number is registered.
MncstringThe Mobile Network Code is the network that the mobile number is registered with.
MsgcountintegerThis is the number of message parts in the SMS message.
MsisdnstringThe phone number that the message was sent to
ReceivedlongThe UNIX timestamp when the DLR was received (in UTC)
UserReferencestringRefers to the same value as the customerID in the BulkMessages request

A user defined ID which can be used to correlate messages sent to the API and receipts or replies received for that message

Maximum length 100 characters

Code Example:

POST /dlr HTTP/1.1
		    HOST: yourdomain.com
		    Content-Type: application/json
		    Accept: text/plain
				{
					"Status":"DELIVRD",
					"EventId":1179504595,
					"Mcc":655,
					"Mnc":"01",
					"MsgCount":1,
					"Msisdn":"27123456789",
					"Received":1530013907,
					"UserReference":"5b3228ad6c8d84001a6e6707"
				}

Replies (MOs)

In our request to you, the MO will include the following data in the form of a plain text body:

KeyTypeDescription
TostringThe short or long code the message was sent to
IDlongA unique system ID assigned to the MO SMS.
EventIDlongThe system generated ID for this event (or batch) of messages.
MessagestringThe content of the inbound SMS message from the mobile subscriber.
MsisdnstringThe phone number that the inbound message was sent from.
ReceivedlongThe UNIX timestamp when the DLR was received. (In UTC)
UserReferencestringRefers to the same value as the CustomerID in the BulkMessages request

A user defined ID which can be used to correlate messages sent to the API and receipts or replies received for that message

Maximum length 100 characters

Code Example:

POST /mo HTTP/1.1
		    HOST: yourdomain.com
		    Content-Type: application/json
		    Accept: text/plain
				{
					"To":"2787050080076451",
					"Id":160880521,
					"Message":"This is a reply",
					"Msisdn":"27123456789",
					"Received":1529916528,
					"UserReference":"5b3228ad6c8d84001a6e6707"
				}