Message status changes occur throughout the lifecycle of an outbound message from creation, through sending, to delivery, and even read receipt for supporting messaging channels.
Twilio allows you to programmatically track these status changes for outbound messages sent with Programmable Messaging through the use of status callbacks.
This guide explains for which changes in outbound message status Twilio sends status callback requests.
The provided information applies to:
If your use case involves the sending of high volumes of messages or message scheduling, you may use a Messaging Service. Use of a Messaging Service has implications for the relevant message status changes as described in the following sections.
When you create a Message resource for an outbound message, it is created with an initial status
value.
The following two tables show this initial status
value, depending on how you created the Message:
Message created without a Messaging Service: |
---|
queued |
Message created with a Messaging Service | |
---|---|
for immediate sending (non-scheduled): accepted | for scheduled sending at a later time: scheduled |
A status callback request is not sent for the initial status
of a newly created Message resource.
If you use the REST API to create the Message Resource, you can obtain the initial status
value from the API response to the create action.
Twilio sends status callback requests when the Message resource's status
changes after creation.
The diagram below shows the status
transitions of outbound messages for which Twilio sends a status callback request. The Message resource API Reference contains the full list of possible status values and their descriptions.