Webhooks
View the expected webhook event payloads to your custom defined endpoints
Here you can see the data that is sent in notification requests to your customer provided endpoints. The only requirement for a customer defined endpoint is that the response has a 200
HTTP status code.
Webhooks first must be registered, see Setting up Webhooks to learn more.
Webhooks Event Payloads
The payloads documented below describe the expected data to the endpoints you (as an MTA customer) must implement in order to successfully receive notifications.
Versions
Our latest webhook version is V3. If you haven't specifically requested to use or remain on an earlier version, you will receive this latest version of 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 E164 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 the following payloads have the optional tags
field which is an object of any tags provided by the customer when the message was sent.
Example:
"tags": {
"key": "value"
}
Delivery Status
MTA Delivery Status Codes
One of the fields of the delivery status webhook is status
which will return a code that is associated with the following statuses:
QUEUED = 1,
SENDING = 2,
SENT = 3, // provider sent to carrier
DELIVERED = 4,
SENDING_FAILED = 5, // something failed on the provider end
DELIVERY_FAILED = 6, // sent to carrier, but failed to deliver
DELIVERY_UNCONFIRMED = 7, // no response from carrier
DELIVERY_REJECTED = 8, // blocked by carrier
UNDELIVERED = 9, // handset is turned off, out of coverage, or something else of that nature
INVALID_NUMBER = 10,
STOPPED_NUMBER = 11,
LANDLINE = 12,
SEND_REJECTED = 13, // blocked by provider
QUEUEING_FAILED = 14 // carrier failed to acknowledge message
Message Reply
Message Send
Number Opt-In
Number Opt-In Types
One of the fields of the number opt-in webhook is optInType
which will return one of the following types, used to indicate the method used to opt-in:
enum NumberOptInType {
SMS = 'sms',
EMAIL = 'email',
IMessage = 'imessage',
RCS = 'rcs',
}
Last updated
Was this helpful?