Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Conversation Message Receipt Resource


Delivery Receipts in Conversations provide visibility into the status of Conversation Messages sent across different channels.

Using Delivery Receipts, you can verify that Messages have been sent, delivered, or even read (for OTT) by Conversations Participants.


API Base URL

api-base-url page anchor

All URLs in the reference documentation use the following base URL:


_10
https://conversations.twilio.com/v1

Using the shortened base URL

using-the-shortened-base-url page anchor

Using the REST API, you can interact with Conversation Message Receipt resources in the default Conversation Service instance via a "shortened" URL that does not include the Conversation Service instance SID ("ISXXX..."). If you are only using one Conversation Service (the default), you do not need to include the Conversation Service SID in your URL, e.g.


_10
GET /v1/Conversations/CHxx/Messages/IMXXX/Receipts

For Conversations applications that build on more than one Conversation Service instance, you will need to specify the Conversation Service SID in the REST API call:


_10
GET /v1/Services/ISxx/Conversations/CHxx/Messages/IMXXX/Receipts


ConversationMessageReceipt Properties

conversationmessagereceipt-properties page anchor
Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The unique ID of the Account responsible for this participant.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

conversation_sidSID<CH>

The unique ID of the Conversation for this message.

Pattern: ^CH[0-9a-fA-F]{32}$Min length: 34Max length: 34

sidSID<DY>

A 34 character string that uniquely identifies this resource.

Pattern: ^DY[0-9a-fA-F]{32}$Min length: 34Max length: 34

message_sidSID<IM>

The SID of the message within a Conversation the delivery receipt belongs to

Pattern: ^IM[0-9a-fA-F]{32}$Min length: 34Max length: 34

channel_message_sidSID

A messaging channel-specific identifier for the message delivered to participant e.g. SMxx for SMS, WAxx for Whatsapp etc.

Pattern: ^[a-zA-Z]{2}[0-9a-fA-F]{32}$Min length: 34Max length: 34

participant_sidSID<MB>

The unique ID of the participant the delivery receipt belongs to.

Pattern: ^MB[0-9a-fA-F]{32}$Min length: 34Max length: 34

statusenum<string>

The message delivery status, can be read, failed, delivered, undelivered, sent or null.

Possible values:
readfaileddeliveredundeliveredsent

error_codeinteger

The message delivery error code for a failed status,


date_createdstring<date-time>

The date that this resource was created.


date_updatedstring<date-time>

The date that this resource was last updated. null if the delivery receipt has not been updated.


urlstring<uri>

An absolute API resource URL for this delivery receipt.


Fetch a ConversationMessageReceipt resource

fetch-a-conversationmessagereceipt-resource page anchor
GET https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}

Property nameTypeRequiredPIIDescription
ConversationSidstringrequired

The unique ID of the Conversation for this message.


MessageSidSID<IM>required

The SID of the message within a Conversation the delivery receipt belongs to.

Pattern: ^IM[0-9a-fA-F]{32}$Min length: 34Max length: 34

SidSID<DY>required

A 34 character string that uniquely identifies this resource.

Pattern: ^DY[0-9a-fA-F]{32}$Min length: 34Max length: 34

Fetch a ConversationMessageReceipt

fetch-a-conversationmessagereceipt page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_20
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = twilio(accountSid, authToken);
_20
_20
async function fetchConversationMessageReceipt() {
_20
const deliveryReceipt = await client.conversations.v1
_20
.conversations("ConversationSid")
_20
.messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.deliveryReceipts("DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_20
.fetch();
_20
_20
console.log(deliveryReceipt.accountSid);
_20
}
_20
_20
fetchConversationMessageReceipt();

Output

_13
{
_13
"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"conversation_sid": "ConversationSid",
_13
"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"status": "failed",
_13
"error_code": 3000,
_13
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_13
"date_created": "2016-03-24T20:37:57Z",
_13
"date_updated": "2016-03-24T20:37:57Z",
_13
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_13
}


Read multiple ConversationMessageReceipt resources

read-multiple-conversationmessagereceipt-resources page anchor
GET https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts

Property nameTypeRequiredPIIDescription
ConversationSidstringrequired

The unique ID of the Conversation for this message.


MessageSidSID<IM>required

The SID of the message within a Conversation the delivery receipt belongs to.

Pattern: ^IM[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.

List multiple ConversationMessageReceipts

list-multiple-conversationmessagereceipts page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function listConversationMessageReceipt() {
_19
const deliveryReceipts = await client.conversations.v1
_19
.conversations("ConversationSid")
_19
.messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
_19
.deliveryReceipts.list({ limit: 20 });
_19
_19
deliveryReceipts.forEach((d) => console.log(d.accountSid));
_19
}
_19
_19
listConversationMessageReceipt();

Output

_52
{
_52
"meta": {
_52
"page": 0,
_52
"page_size": 50,
_52
"first_page_url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts?PageSize=50&Page=0",
_52
"previous_page_url": null,
_52
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts?PageSize=50&Page=0",
_52
"next_page_url": null,
_52
"key": "delivery_receipts"
_52
},
_52
"delivery_receipts": [
_52
{
_52
"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"status": "failed",
_52
"error_code": 3000,
_52
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"date_created": "2016-03-24T20:37:57Z",
_52
"date_updated": "2016-03-24T20:37:57Z",
_52
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_52
},
_52
{
_52
"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"status": "failed",
_52
"error_code": 3000,
_52
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"date_created": "2016-03-24T20:37:57Z",
_52
"date_updated": "2016-03-24T20:37:57Z",
_52
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_52
},
_52
{
_52
"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"status": "failed",
_52
"error_code": 3000,
_52
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_52
"date_created": "2016-03-24T20:37:57Z",
_52
"date_updated": "2016-03-24T20:37:57Z",
_52
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_52
}
_52
]
_52
}


Rate this page: