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.

This page also indicates which variables are included in the default webhook templates for the HTTP POST request body JSON objects. This is observed in the Default Template column of the various variable tables. The naming of the variables in the template is equivalent to the Variable column name except in camel case (eg. a variable called Id would be named "id" in the template).

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.

VariableTypeGETPOSTDescriptionDefault Template
CustomerIdstring✅✅An optionally supplied customer ID field.✅
EventIdlong✅✅The ID provided by the API for the original outgoing SMS batch.✅
GroupDatajson❌✅All the data pertaining to group sends.✅
Idlong✅✅A unique value for this specific line item.✅
Mccinteger✅✅The Mobile Country Code (MCC) is the country where the mobile number is registered.✅
Mncstring✅✅The Mobile Network Code (MNC) is used to identify a mobile network within a country. This field is returned as a string because some networks may have multiple MNCs, which are provided as a comma-separated list with leading zeros preserved (e.g., '01,02' or '001'). Leading zeros are significant - values like '1', '01', and '001' represent different network codes. When processing this field, split on commas to handle multiple MNC values.✅
PhoneNumberstring✅✅The mobile number the message was sent to.✅
ReceivedDateTimestring✅✅DLR 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.❌
ReceivedUtclong✅✅The UTC UNIX ticks timestamp when the DLR was received.✅
SentDatastring❌✅The message content sent. Note that this field is truncated to 157 characters in the webhook data.✅
SentDataPartsCountinteger✅✅The number of message parts for the message content sent.✅
SentDataTypestring✅✅The data type ("SMS" only).✅
SentDateTimestring✅✅Mobile 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.❌
SentUtclong✅✅The UTC UNIX ticks timestamp when the message was submitted to the mobile network operator.✅
Statusstring✅✅The status that the handset responded with (see Delivery Statuses).✅

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerIDstring✅✅CustomerId
Datastring✅✅SentData
DataTypestring✅✅SentDataType
Destinationstring✅✅PhoneNumber
EventIDlong✅✅EventId
GRPDescstring✅✅GroupData
GRPNamestring✅✅GroupData
IDlong✅✅Id
MsgCountinteger✅✅SentDataPartsCount
Msisdnstring✅✅PhoneNumber
NumberValue1string✅✅GroupData
NumberValue2string✅✅GroupData
NumberValue3string✅✅GroupData
NumberValue4string✅✅GroupData
NumberValue5string✅✅GroupData
NumberValue6string✅✅GroupData
Phonenumberstring✅✅PhoneNumber
Receivedlong✅✅ReceivedUtc
SentDataTimestring✅✅SentDateTime
UserReferencestring✅✅CustomerId

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 via SMSPortal. IncomingX variables refer to information on the reply received by SMSPortal.

VariableTypeGETPOSTDescriptionDefault Template
Campaignstring✅✅The campaign that the original message was sent for.✅
CustomerIdstring✅✅An optionally supplied customer ID field.✅
DestinationPhoneNumberstring✅✅The mobile number that received the reply message.✅
EventIdlong✅✅The ID provided by the API for the original outgoing SMS batch.✅
GroupDatajson❌✅All the data pertaining to group sends.✅
IncomingDatastring❌✅The message content received in the reply. Note that this field is truncated to 477 characters in the webhook data.✅
IncomingDateTimestring✅✅Customer 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.❌
IncomingIdlong✅✅A unique value for this specific line item.✅
IncomingUtclong✅✅The UTC UNIX ticks timestamp when the message was received.✅
OptOutboolean✅✅A boolean flag indicating whether an opt out was detected (true) or not (false).✅
OptOutPhrasestring✅✅Any opt-out phrase detected in the reply (eg. "stop", "opt-out", etc).✅
SentDatastring❌✅The message content sent. Note that this field is truncated to 157 characters in the webhook data.✅
SentDateTimestring✅✅Mobile 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.❌
SentIdlong✅✅A unique value for this specific outgoing line item.✅
SentUtclong✅✅The UTC UNIX ticks timestamp when the message was submitted to the mobile network operator.✅
SourcePhoneNumberstring✅✅The mobile number that sent the reply message.✅

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerIDstring✅✅CustomerId
EventIDlong✅✅EventId
Idlong✅✅IncomingId
IncomingDataTimestring✅✅IncomingDateTime
IncomingIDlong✅✅IncomingId
Messagestring✅✅IncomingData
Msisdnstring✅✅SourcePhoneNumber
NumberValue1string✅✅GroupData
NumberValue2string✅✅GroupData
NumberValue3string✅✅GroupData
NumberValue4string✅✅GroupData
NumberValue5string✅✅GroupData
NumberValue6string✅✅GroupData
Phonenumberstring✅✅SourcePhoneNumber
Receivedlong✅✅IncomingUtc
SentDataTimestring✅✅SentDateTime
SentIDlong✅✅SentId
SentMessageGRPDescstring✅✅GroupData
SentMessageGRPNamestring✅✅GroupData
Tolong✅✅DestinationPhoneNumber
UserReferencestring✅✅CustomerId

3. Short Code Interactions

Short code interactions are webhooks that provide feedback on SMSes sent to short codes.

VariableTypeGETPOSTDescriptionDefault Template
Idlong✅✅The short code message ID.✅
IncomingDatastring❌✅The message content received in the reply.✅
IncomingDateTimestring✅✅The date and time in SAST when the message was received (dd/MMM/yyyy HH:mm:ss).❌
IncomingUtclong✅✅The UTC UNIX ticks timestamp when the message was received.✅
Keywordstring✅✅The matched keyword.✅
Mccinteger✅✅The Mobile Country Code (MCC) is the country where the mobile number is registered.✅
Mncstring✅✅The Mobile Network Code (MNC) is used to identify a mobile network within a country.✅
PhoneNumberstring✅✅The mobile number that sent the message.✅
Scstring✅✅The short code.✅

Deprecated Variables

VariableTypeGETPOSTRather Use
IDlong✅✅Id
Messagestring✅✅IncomingData
Mobilestring✅✅PhoneNumber
SCstring✅✅Sc

4. Short URL Events

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

VariableTypeGETPOSTDescriptionDefault Template
CustomerIdstring✅✅An optionally supplied customer ID field.✅
InteractionDateTimestring✅✅The date and time in SAST when the link was interacted with (dd/MMM/yyyy HH:mm:ss).❌
InteractionUtclong✅✅The UTC UNIX ticks timestamp when the link was interacted with.✅
PhoneNumberstring✅✅The mobile number the message was sent to.✅
Typestring✅✅This will either be "REDIRECT" or "PREVIEW", depending on whether the URL was clicked or previewed.✅

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerRefstring✅✅CustomerId
LandingPageNamestring✅✅—
LandingPageVersionstring✅✅—
MsgNumTostring✅✅PhoneNumber
SentIDlong✅✅—
SmppIdstring✅✅—

5. Landing Page Events

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

VariableTypeGETPOSTDescriptionDefault Template
CustomerIdstring✅✅An optionally supplied customer ID field.✅
InteractionDateTimestring✅✅The date and time in SAST when the link was interacted with (dd/MMM/yyyy HH:mm:ss).❌
InteractionUtclong✅✅The UTC UNIX ticks timestamp when the link was interacted with.✅
LandingPageComponentIdstring✅✅The ID of the component on the landing page that triggered the webhook.✅
LandingPageNamestring✅✅The name of the landing page.✅
LandingPageVersionstring✅✅The version of the landing page.✅
PhoneNumberstring✅✅The mobile number the message was sent to.✅
Typestring✅✅This will either be "REDIRECT", "PREVIEW", "AUTHENTICATION" or "CONTENT", depending on how the user interacted with the landing page.✅

Deprecated Variables

VariableTypeGETPOSTRather Use
CustomerRefstring✅✅CustomerId
MsgNumTostring✅✅PhoneNumber



Did this page help you?