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.
All URLs in the reference documentation use the following base URL:
https://conversations.twilio.com/v1
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.
1GET /v1/Conversations/CHxx/Messages/IMXXX/Receipts2
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:
GET /v1/Services/ISxx/Conversations/CHxx/Messages/IMXXX/Receipts
The unique ID of the Account responsible for this participant.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique ID of the Conversation for this message.
^CH[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
A 34 character string that uniquely identifies this resource.
^DY[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the message within a Conversation the delivery receipt belongs to
^IM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
A messaging channel-specific identifier for the message delivered to participant e.g. SMxx
for SMS, WAxx
for Whatsapp etc.
^[a-zA-Z]{2}[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique ID of the participant the delivery receipt belongs to.
^MB[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The message delivery status, can be read
, failed
, delivered
, undelivered
, sent
or null.
read
failed
delivered
undelivered
sent
The date that this resource was last updated. null
if the delivery receipt has not been updated.
An absolute API resource URL for this delivery receipt.
GET https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts/{Sid}
The SID of the message within a Conversation the delivery receipt belongs to.
^IM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
A 34 character string that uniquely identifies this resource.
^DY[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchConversationMessageReceipt() {11const deliveryReceipt = await client.conversations.v112.conversations("ConversationSid")13.messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.deliveryReceipts("DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")15.fetch();1617console.log(deliveryReceipt.accountSid);18}1920fetchConversationMessageReceipt();
1{2"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"conversation_sid": "ConversationSid",5"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",7"status": "failed",8"error_code": 3000,9"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",10"date_created": "2016-03-24T20:37:57Z",11"date_updated": "2016-03-24T20:37:57Z",12"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"13}
GET https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{MessageSid}/Receipts
The SID of the message within a Conversation the delivery receipt belongs to.
^IM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listConversationMessageReceipt() {11const deliveryReceipts = await client.conversations.v112.conversations("ConversationSid")13.messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")14.deliveryReceipts.list({ limit: 20 });1516deliveryReceipts.forEach((d) => console.log(d.accountSid));17}1819listConversationMessageReceipt();
1{2"meta": {3"page": 0,4"page_size": 50,5"first_page_url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts?PageSize=50&Page=0",6"previous_page_url": null,7"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts?PageSize=50&Page=0",8"next_page_url": null,9"key": "delivery_receipts"10},11"delivery_receipts": [12{13"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",16"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",18"status": "failed",19"error_code": 3000,20"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",21"date_created": "2016-03-24T20:37:57Z",22"date_updated": "2016-03-24T20:37:57Z",23"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"24},25{26"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",28"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",29"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",30"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",31"status": "failed",32"error_code": 3000,33"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"date_created": "2016-03-24T20:37:57Z",35"date_updated": "2016-03-24T20:37:57Z",36"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"37},38{39"sid": "DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",40"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",41"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",42"message_sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",43"channel_message_sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",44"status": "failed",45"error_code": 3000,46"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",47"date_created": "2016-03-24T20:37:57Z",48"date_updated": "2016-03-24T20:37:57Z",49"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Receipts/DYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"50}51]52}