Webhooks V2 (POST)

All the types of events and parameters that SMSPortal 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:

Key

Type

Description

Status

string

The status that the handset responded with. Please refer to the list of possible delivery statuses here.

EventId

long

The system generated ID for this event (or batch) of messages

Mcc

integer

The Mobile Country Code is the country where the mobile number is registered.

Mnc

string

The Mobile Network Code is the network that the mobile number is registered with.

MsgCount

integer

This is the number of message parts in the SMS message.

Msisdn

string

The phone number that the message was sent to

Received

long

The UNIX timestamp when the DLR was received (in UTC)

UserReference

string

Refers 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:

Key

Type

Description

To

string

The short or long code the message was sent to

Id

long

A unique system ID assigned to the MO SMS.

EventId

long

The system generated ID for this event (or batch) of messages.

Message

string

The content of the inbound SMS message from the mobile subscriber.

Msisdn

string

The phone number that the inbound message was sent from.

Received

long

The UNIX timestamp when the DLR was received. (In UTC)

UserReference

string

Refers 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"
				}