Webhook Types and Variables

Webhook Types and Variables

This page details the properties available to each webhook type as well as the use-case for the various webhook types. The Variable column indicates what should be put within the @@ encapsulation when setting up a webhook template. The UI will assist with the variable encapsulation process.

NOTE 1: Deprecated variables are listed with a "Rather Use" column that indicates which property should rather be used. If this column is empty, it means that the variable is no longer relevant for that type of webhook.

NOTE 2: Variables are case sensitive. As an example, ID and Id are not the same.

1. SMS Delivery Receipts (DLRs)

Delivery Receipts (DLRs) are webhooks that provide feedback on the delivery of a single SMS.

NOTE 3: XDateTime variables consider the configurable offset in the API key responsible for the send. The offset is added to these webhooks types at send time.

VariableTypeGETPOSTDescription
CustomerIdstringAn optionally supplied customer ID field.
EventIdlongThe ID provided by the API for the original outgoing SMS batch.
GroupDatajsonAll the data pertaining to group sends.
IdintegerA unique value for this specific line item.
MccintegerThe Mobile Country Code (MCC) is the country where the mobile number is registered.
MncstringThe Mobile Network Code (MNC) is used to identify a mobile network within a country.
PhoneNumberstringThe mobile number the message was sent to.
ReceivedDateTimestringDLR received date/time adjusted by the API key’s SAST offset at send time (SAST = 0 offset), in dd/MMM/yyyy HH:mm:ss format.
ReceivedUtclongThe UTC UNIX ticks timestamp when the DLR was received.
SentDatastringThe message content sent. Note that this field is truncated to 157 characters in the webhook data.
SentDataPartsCountintegerThe number of message parts for the message content sent.
SentDataTypestringThe data type ("SMS" only).
SentDateTimestringMobile network operator submission date/time adjusted by the API key’s SAST offset at send time (SAST = 0 offset), in dd/MMM/yyyy HH:mm:ss format.
SentUtclongThe UTC UNIX ticks timestamp when the message was submitted to the mobile network operator.
StatusstringThe status that the handset responded with (see Delivery Statuses).

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerIDstringCustomerId
DatastringSentData
DataTypestringSentDataType
DestinationstringPhoneNumber
EventIDlongEventId
GRPDescstringGroupData
GRPNamestringGroupData
IDintegerId
MsgCountintegerSentDataPartsCount
MsisdnstringPhoneNumber
NumberValue1stringGroupData
NumberValue2stringGroupData
NumberValue3stringGroupData
NumberValue4stringGroupData
NumberValue5stringGroupData
NumberValue6stringGroupData
PhonenumberstringPhoneNumber
ReceivedlongReceivedUtc
SentDataTimestringSentDateTime
UserReferencestringCustomerId

2. SMS Replies (MOs)

SMS Replies are webhooks that provide feedback on the reply that someone replied with after receiving a single SMS that was sent to them.

NOTE 4: XDateTime variables consider the configurable offset in the API key responsible for the send. The offset is added to these webhooks types at send time.

NOTE 5: SentX variables refer to information on the message sent. IncomingX variables refer to information on the reply received.

VariableTypeGETPOSTDescription
CampaignstringThe campaign that the original message was sent for.
CustomerIdstringAn optionally supplied customer ID field.
DestinationPhoneNumberstringThe mobile number that received the reply message.
EventIdlongThe ID provided by the API for the original outgoing SMS batch.
GroupDatajsonAll the data pertaining to group sends.
IncomingDatastringThe message content received in the reply. Note that this field is truncated to 477 characters in the webhook data.
IncomingDateTimestringCustomer reply received date/time adjusted by the API key’s SAST offset at send time (SAST = 0 offset), in dd/MMM/yyyy HH:mm:ss format.
IncomingIdintegerA unique value for this specific line item.
IncomingUtclongThe UTC UNIX ticks timestamp when the message was received.
OptOutbooleanA boolean flag indicating whether an opt out was detected (true) or not (false).
OptOutPhrasestringAny opt-out phrase detected in the reply (eg. "stop", "opt-out", etc).
SentDatastringThe message content sent. Note that this field is truncated to 157 characters in the webhook data.
SentDateTimestringMobile network operator submission date/time adjusted by the API key’s SAST offset at send time (SAST = 0 offset), in dd/MMM/yyyy HH:mm:ss format.
SentIdlongA unique value for this specific outgoing line item.
SentUtclongThe UTC UNIX ticks timestamp when the message was submitted to the mobile network operator.
SourcePhoneNumberstringThe mobile number that sent the reply message.

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerIDstringCustomerId
EventIDlongEventId
IdintegerIncomingId
IncomingDataTimestringIncomingDateTime
IncomingIDintegerIncomingId
MessagestringIncomingData
MsisdnstringSourcePhoneNumber
NumberValue1stringGroupData
NumberValue2stringGroupData
NumberValue3stringGroupData
NumberValue4stringGroupData
NumberValue5stringGroupData
NumberValue6stringGroupData
PhonenumberstringSourcePhoneNumber
ReceivedlongIncomingUtc
SentDataTimestringSentDateTime
SentIDlongSentId
SentMessageGRPDescstringGroupData
SentMessageGRPNamestringGroupData
TolongDestinationPhoneNumber
UserReferencestringCustomerId

3. Short Code Interactions

Short code interactions are webhooks that provide feedback on SMS's sent to short codes.

VariableTypeGETPOSTDescription
IdintegerThe short code message ID.
IncomingDatastringThe message content received in the reply.
IncomingDateTimestringThe date and time in SAST when the message was received (dd/MMM/yyyy HH:mm:ss).
IncomingUtclongThe UTC UNIX ticks timestamp when the message was received.
KeywordstringThe matched keyword.
MccintegerThe Mobile Country Code (MCC) is the country where the mobile number is registered.
MncstringThe Mobile Network Code (MNC) is used to identify a mobile network within a country.
PhoneNumberstringThe mobile number that sent the message.
ScstringThe short code.

Deprecated Variables

VariableTypeGETPOSTRather Use
IDintegerId
MessagestringIncomingData
MobilestringPhoneNumber
SCstringSc

4. Short URL Events

Short URL events are webhooks that provide feedback on any interactions with short URLs created in our platform.

VariableTypeGETPOSTDescription
CustomerIdstringAn optionally supplied customer ID field.
InteractionDateTimestringThe date and time in SAST when the link was interacted with (dd/MMM/yyyy HH:mm:ss).
InteractionUtclongThe UTC UNIX ticks timestamp when the link was interacted with.
PhoneNumberstringThe mobile number the message was sent to.
TypestringThis will either be "REDIRECT" or "PREVIEW", depending on whether the URL was clicked or previewed.

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerRefstringCustomerId
LandingPageNamestring
LandingPageVersionstring
MsgNumTostringPhoneNumber
SentIDlong
SmppIdstring

5. Landing Page Events

Landing page events are webhooks that provide feedback on any interactions with landing pages created in our platform.

VariableTypeGETPOSTDescription
CustomerIdstringAn optionally supplied customer ID field.
InteractionDateTimestringThe date and time in SAST when the link was interacted with (dd/MMM/yyyy HH:mm:ss).
InteractionUtclongThe UTC UNIX ticks timestamp when the link was interacted with.
LandingPageComponentIdstringThe ID of the component on the landing page that triggered the webhook.
LandingPageNamestringThe name of the landing page.
LandingPageVersionstringThe version of the landing page.
PhoneNumberstringThe mobile number the message was sent to.
TypestringThis will either be "REDIRECT", "PREVIEW", "AUTHENTICATION" or "CONTENT", depending on how the user interacted with the landing page.

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerRefstringCustomerId
MsgNumTostringPhoneNumber