Skip to content

TwilioMessageStatusPayload

Defined in: lib/webhook/twilio-webhook.payloads.ts:226

Body of a message StatusCallback request, sent as an outbound message moves through its lifecycle.

No callback is sent for a message’s initial status; the first you receive reflects a change after creation.

@Post('webhooks/message-status')
@TwilioWebhook()
handleStatus(@Body() payload: TwilioMessageStatusPayload) {
if (payload.MessageStatus === 'failed' || payload.MessageStatus === 'undelivered') {
this.logger.warn(`${payload.MessageSid} failed with ${payload.ErrorCode}`);
}
}

https://www.twilio.com/docs/messaging/guides/track-outbound-message-status

Property Modifier Type Description Inherited from Defined in
AccountSid readonly string - - lib/webhook/twilio-webhook.payloads.ts:228
ChannelInstallSid? readonly string SID of the Installed Channel used, on non-SMS channels. - lib/webhook/twilio-webhook.payloads.ts:238
ChannelPrefix? readonly string Channel-specific prefix identifying the messaging channel. - lib/webhook/twilio-webhook.payloads.ts:242
ChannelStatusMessage? readonly string Error message from the channel, present only when delivery failed. - lib/webhook/twilio-webhook.payloads.ts:240
ErrorCode? readonly string Twilio error code, present when delivery failed. A string, e.g. '30008'. - lib/webhook/twilio-webhook.payloads.ts:234
EventType? readonly string Post-delivery event. 'READ' once a read receipt arrives. - lib/webhook/twilio-webhook.payloads.ts:244
From readonly string - - lib/webhook/twilio-webhook.payloads.ts:229
FromCity? readonly string - TwilioGeoParams.FromCity lib/webhook/twilio-webhook.payloads.ts:76
FromCountry? readonly string - TwilioGeoParams.FromCountry lib/webhook/twilio-webhook.payloads.ts:79
FromState? readonly string - TwilioGeoParams.FromState lib/webhook/twilio-webhook.payloads.ts:77
FromZip? readonly string - TwilioGeoParams.FromZip lib/webhook/twilio-webhook.payloads.ts:78
MessageSid readonly string - - lib/webhook/twilio-webhook.payloads.ts:227
MessageStatus readonly TwilioMessageStatus Status of the Message when the callback was sent. - lib/webhook/twilio-webhook.payloads.ts:232
RawDlrDoneDate? readonly string Carrier’s done-date from the delivery receipt, in YYMMDDhhmm format. - lib/webhook/twilio-webhook.payloads.ts:236
SmsSid? readonly string :::caution[Deprecated] Identical to MessageSid; kept for compatibility. ::: - lib/webhook/twilio-webhook.payloads.ts:246
SmsStatus? readonly TwilioMessageStatus :::caution[Deprecated] Identical to MessageStatus; kept for compatibility. ::: - lib/webhook/twilio-webhook.payloads.ts:248
To? readonly string - - lib/webhook/twilio-webhook.payloads.ts:230
ToCity? readonly string - TwilioGeoParams.ToCity lib/webhook/twilio-webhook.payloads.ts:80
ToCountry? readonly string - TwilioGeoParams.ToCountry lib/webhook/twilio-webhook.payloads.ts:83
ToState? readonly string - TwilioGeoParams.ToState lib/webhook/twilio-webhook.payloads.ts:81
ToZip? readonly string - TwilioGeoParams.ToZip lib/webhook/twilio-webhook.payloads.ts:82