webhookWebhooks

View the expected webhook event payloads to your custom-defined endpoints

Here you can see the data sent in notification requests to your customer-provided endpoints. The only requirement for a customer-defined endpoint is that it responds with a 200 HTTP status code.

Webhooks must be registered first. See Setting up Webhooks to learn more.

Webhooks Event Payloads

circle-info

Optional Fields

Some fields may not always be included in the webhook payload. These are indicated with: *. These fields may be missing from the payload or have a NULL value.

All other fields below are always expected in the webhook payload.

The payloads documented below describe the data sent to the endpoints you (as a Mobile Text Alerts customer) must implement to successfully receive notifications.

Versions

Our latest webhook version is V3. If you haven't specifically requested an earlier version, you will receive the V3 payloads. Previous versions (V1, V2) are also included below.

Formats Dynamic fields may also include the following format specifications:

  • phone_national - A phone number in the national format. (Ex: 5555555555)

  • phone_e164 - A phone number in E.164 format. (Ex: [+] [country code] [subscriber number including area code], max 15 digits)

  • enum - A field with a pre-defined list of values.

  • date - A date string. The timezone and format are specified.

Tags

Many of the payloads below include an optional tags field. This is an object of tags provided by the customer when the message was sent.

Example:

Delivery Status

chevron-rightV1 Delivery Status Payloadhashtag
Field
Type
Description

destinationNumber

string

The number the message was sent to.

messageId

number

The MTA internal id of the outbound message.

externalId

string

The id provided by the customer when the message was sent.

status

MTADeliveryStatus

The delivery status. See MTA Delivery Status Codes.

tags *

<string, string>

An object of any tags provided by the customer when the message was sent.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTAWebhook.DELIVERY_STATUS

The webhook event type, identifying it as delivery status.

chevron-rightV2 Delivery Status Payloadhashtag
Field
Type
Description

destinationNumber

string

The number the message was sent to.

messageId

number

The MTA internal id of the outbound message.

externalId

string

The id provided by the customer when the message was sent.

status

MTADeliveryStatus

The delivery status. See MTA Delivery Status Codes.

tags *

<string, string>

An object of any tags provided by the customer when the message was sent.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTAWebhook.DELIVERY_STATUS

The webhook event type, identifying it as delivery status.

chevron-rightV3 Delivery Status Payloadhashtag
Field
Type
Description

fromNumber *

string |phone_e164

The number that the message was sent from.

toNumber

string |phone_e164

The number the message was sent to.

messageId

string

The MTA internal id of the outbound message.

externalId *

string

The id provided by the customer when the message was sent.

timestamp

string | date:UTC:ISO-8601

A date string. The timezone and format are specified.

status

number |MTADeliveryStatus

The delivery status code. See MTA Delivery Status Codes.

tags *

<string, string>

An object of any tags provided by the customer when the message was sent.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTADeliveryStatus

The webhook event type, identifying it as delivery status.

Mobile Text Alerts Delivery Status Codes

One of the fields in the delivery-status webhook is status. It returns a code associated with the following statuses:

Message Reply

chevron-rightV1 Message Reply Payloadhashtag
Field
Type
Description

originationNumber

string

The number that the inbound message was sent from.

destinationNumber

number

The number that the inbound message was sent to.

message

string

The content of the inbound message.

messageId

number

The internal MTA id for the inbound message.

externalId

string

The customer provided id from the last outbound message sent to the origination number.

previousMessageId

string

The internal MTA id for the last interaction with the outbound number. This could be an outbound id or an inbound id, whichever happened last.

isOptOutMessage

boolean

If true, indicates the inbound message is considered an opt-out request.

tags *

<string, string>

An object of any tags provided by the customer from the last outbound message sent to the origination number.

url *

string

The URL of the message, if it was an MMS and had an image attached.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTAWebhook.MESSAGE_REPLY

The webhook event type, identifying it as message reply.

chevron-rightV2 Message Reply Payloadhashtag
Field
Type
Description

originationNumber

string

The number that the inbound message was sent from.

destinationNumber

string

The number that the inbound message was sent to.

message

string

The content of the inbound message.

messageId

number

The internal MTA id for the inbound message.

externalId

string

The customer provided id from the last outbound message sent to the origination number.

previousMessageId

string

The internal MTA id for the last interaction with the outbound number. This could be an outbound id or an inbound id, whichever happened last.

isOptOutMessage

boolean

If true, indicates the inbound message is considered an opt-out request.

tags *

<string, string>

An object of any tags provided by the customer from the last outbound message sent to the origination number.

url *

string

The URL of the message, if it was an MMS and had an image attached.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTAWebhook.MESSAGE_REPLY

The webhook event type, identifying it as message reply.

chevron-rightV3 Message Reply Payloadhashtag
Field
Type
Description

fromNumber

string |phone_e164

The number that the inbound message was sent from.

toNumber *

string |phone_e164

The number that the inbound message was sent to.

replyId

string

The MTA internal id of the message reply.

externalId *

string

The customer provided id from the last outbound message sent to the origination number.

message

string

The content of the inbound message.

messageId *

number

The internal MTA id for the inbound message.

url *

string

The URL of the message, if it was an MMS and had an image attached.

timestamp

string | date:UTC:ISO-8601

A date string. The timezone and format are specified.

tags *

<string, string>

An object of any tags provided by the customer from the last outbound message sent to the origination number.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

Message Send

chevron-rightV1 Message Send Payloadhashtag
Field
Type
Description

destinationNumber

string

The number the message was sent to.

messageId

string | number

The MTA internal id of the outbound message.

externalId

string

The id provided by the customer when the message was sent.

message

string

The content of the outbound message.

url

string

The URL of the message, if it was an MMS and had an image attached.

tags *

<string, string>

An object of any tags provided by the customer when the message was sent.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTAWebhook.MESSAGE_SEND

The webhook event type, identifying it as message send.

chevron-rightV2 Message Send Payloadhashtag
Field
Type
Description

destinationNumber

string

The number the message was sent to.

messageId

number

The MTA internal id of the outbound message.

externalId

string

The id provided by the customer when the message was sent.

message

string

The content of the outbound message.

url

string

The URL of the message, if it was an MMS and had an image attached.

tags *

<string, string>

An object of any tags provided by the customer when the message was sent.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

MTAWebhook.MESSAGE_SEND

The webhook event type, identifying it as message send.

chevron-rightV3 Message Send Payloadhashtag
Field
Type
Description

fromNumber *

string |phone_e164

The number that the message was sent from.

toNumber

string |phone_e164

The number the message was sent to.

messageId

string

The MTA internal id of the outbound message.

externalId *

string

The id provided by the customer when the message was sent.

message

string

The content of the outbound message.

url *

string

The URL of the message, if it was an MMS and had an image attached.

timestamp

string | date:UTC:ISO-8601

A date string. The timezone and format are specified.

tags *

<string, string>

An object of any tags provided by the customer when the message was sent.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

Number Opt-In

chevron-rightV1 Number Opt-In Payloadhashtag
Field
Type
Description

originationNumber

string

The number the message was sent from.

destinationNumber

string

The number the message was sent to.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

optInType

enum NumberOptInType

Identifies how the method used to opt-in, see Number Opt-In Types.

type

type: MTAWebhook.NUMBER_OPT_IN

The webhook event type, identifying it as number opt-in.

chevron-rightV2 Number Opt-In Payloadhashtag
Field
Type
Description

originationNumber

string

The number the message was sent from.

destinationNumber *

string

The number the message was sent to.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

optInType

enum NumberOptInType

Identifies how the method used to opt-in, see Number Opt-In Types.

type

MTAWebhook.NUMBER_OPT_IN

The webhook event type, identifying it as number opt-in.

chevron-rightV3 Number Opt-In Payloadhashtag
Field
Type
Description

fromNumber

string

The number the message was sent from.

toNumber *

string

The number the message was sent to.

senderName *

string

The sender name used to pre-populate the "To:" field for iMessages.

type

enum NumberOptInType

The webhook event type, identifying it as number opt-in.

timestamp

string | date:UTC:ISO-8601

A date string. The timezone and format are specified.

Number Opt-In Types

One of the fields in the number opt-in webhook is optInType. It returns one of the following values, which indicates the method used to opt in:

Last updated

Was this helpful?