Skip to contentSkip to navigationSkip to topbar
Rate this Page:

Conversation Message Resource



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 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

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


ConversationMessage Properties

conversationmessage-properties page anchor
Resource properties
account_sidtype: SID<AC>Not PII

conversation_sidtype: SID<CH>Not PII

The unique ID of the Conversation(link takes you to an external page) for this message.


sidtype: SID<IM>Not PII

A 34 character string that uniquely identifies this resource.


indextype: integerNot PII

The index of the message within the Conversation(link takes you to an external page). Indices may skip numbers, but will always be in order of when the message was received.


authortype: stringPII MTL: 30 days

The channel specific identifier of the message's author. Defaults to system.


bodytype: stringPII MTL: 30 days

The content of the message, can be up to 1,600 characters long.


mediatype: arrayPII MTL: 30 days

An array of objects that describe the Message's media, if the message contains media. Each object contains these fields: content_type with the MIME type of the media, filename with the name of the media, sid with the SID of the Media resource, and size with the media object's file size in bytes. If the Message has no media, this value is null.


attributestype: stringPII MTL: 30 days

A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.


participant_sidtype: SID<MB>Not PII

The unique ID of messages's author participant. Null in case of system sent message.


date_createdtype: string<DATE TIME>Not PII

The date that this resource was created.


date_updatedtype: string<DATE TIME>Not PII

The date that this resource was last updated. null if the message has not been edited.


urltype: string<URI>Not PII

An absolute API resource API URL for this message.


deliverytype: objectNot PII

An object that contains the summary of delivery statuses for the message to non-chat participants.


linkstype: object<URI MAP>Not PII

Contains an absolute API resource URL to access the delivery & read receipts of this message.


content_sidtype: SID<HX>Not PII

The unique ID of the multi-channel Rich Content(link takes you to an external page) template.


Create a ConversationMessage resource

create-a-conversationmessage-resource page anchor
POST https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages

Parameters

create-parameters page anchor
URI parameters
ConversationSidtype: stringNot PII
Path Parameter

The unique ID of the Conversation(link takes you to an external page) for this message.


X-Twilio-Webhook-Enabledtype: enum<STRING>Not PII
Header Parameter

The X-Twilio-Webhook-Enabled HTTP request header

Possible values:
truefalse

Request body parameters
Authortype: stringPII MTL: 30 days

The channel specific identifier of the message's author. Defaults to system.


Bodytype: stringPII MTL: 30 days

The content of the message, can be up to 1,600 characters long.


DateCreatedtype: string<DATE TIME>Not PII

The date that this resource was created.


DateUpdatedtype: string<DATE TIME>Not PII

The date that this resource was last updated. null if the message has not been edited.


Attributestype: stringPII MTL: 30 days

A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.


MediaSidtype: SID<ME>Not PII

The Media SID to be attached to the new Message.


ContentSidtype: SID<HX>Not PII

The unique ID of the multi-channel Rich Content(link takes you to an external page) template, required for template-generated messages. Note that if this field is set, Body and MediaSid parameters are ignored.


ContentVariablestype: stringNot PII

A structurally valid JSON string that contains values to resolve Rich Content template variables.


Subjecttype: stringNot PII

The subject of the message, can be up to 256 characters long.

Create a Conversation Message

create-a-conversation-message page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.messages
_11
.create({author: 'smee', body: 'Ahoy there!'})
_11
.then(message => console.log(message.sid));

Output

_29
{
_29
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"body": "Ahoy there!",
_29
"media": null,
_29
"author": "smee",
_29
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"attributes": {
_29
"importance": "high"
_29
},
_29
"date_created": "2015-12-16T22:18:37Z",
_29
"date_updated": "2015-12-16T22:18:38Z",
_29
"index": 0,
_29
"delivery": {
_29
"total": 2,
_29
"sent": "all",
_29
"delivered": "some",
_29
"read": "some",
_29
"failed": "none",
_29
"undelivered": "none"
_29
},
_29
"content_sid": null,
_29
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"links": {
_29
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_29
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_29
}
_29
}


Fetch a ConversationMessage resource

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

URI parameters
ConversationSidtype: stringNot PII
Path Parameter

The unique ID of the Conversation(link takes you to an external page) for this message.


Sidtype: SID<IM>Not PII
Path Parameter

A 34 character string that uniquely identifies this resource.

Fetch a Conversation Message

fetch-a-conversation-message page anchor

Fetch a Conversation Message by SID

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.messages('IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(message => console.log(message.conversationSid));

Output

_29
{
_29
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"body": "Welcome!",
_29
"media": null,
_29
"author": "system",
_29
"participant_sid": null,
_29
"attributes": {
_29
"importance": "high"
_29
},
_29
"date_created": "2016-03-24T20:37:57Z",
_29
"date_updated": "2016-03-24T20:37:57Z",
_29
"index": 0,
_29
"delivery": {
_29
"total": 2,
_29
"sent": "all",
_29
"delivered": "some",
_29
"read": "some",
_29
"failed": "none",
_29
"undelivered": "none"
_29
},
_29
"content_sid": null,
_29
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"links": {
_29
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_29
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_29
}
_29
}


List all Conversation Message(s)

list-all-conversation-messages page anchor
GET https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages

URI parameters
ConversationSidtype: stringNot PII
Path Parameter

The unique ID of the Conversation(link takes you to an external page) for messages.


Ordertype: enum<STRING>Not PII
Query Parameter

The sort order of the returned messages. Can be: asc (ascending) or desc (descending), with asc as the default.

Possible values:
ascdesc

PageSizetype: integerNot PII
Query Parameter

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


Pagetype: integerNot PII
Query Parameter

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


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

List all Conversation Messages

list-all-conversation-messages-1 page anchor

List all messages in a Conversation

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.messages
_11
.list({limit: 20})
_11
.then(messages => messages.forEach(m => console.log(m.sid)));

Output

_107
{
_107
"meta": {
_107
"page": 0,
_107
"page_size": 50,
_107
"first_page_url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?PageSize=50&Page=0",
_107
"previous_page_url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?PageSize=50&Page=0",
_107
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?PageSize=50&Page=0",
_107
"next_page_url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?PageSize=50&Page=1",
_107
"key": "messages"
_107
},
_107
"messages": [
_107
{
_107
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"body": "I like pie.",
_107
"media": null,
_107
"author": "pie_preferrer",
_107
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"attributes": {
_107
"importance": "high"
_107
},
_107
"date_created": "2016-03-24T20:37:57Z",
_107
"date_updated": "2016-03-24T20:37:57Z",
_107
"index": 0,
_107
"delivery": {
_107
"total": 2,
_107
"sent": "all",
_107
"delivered": "some",
_107
"read": "some",
_107
"failed": "none",
_107
"undelivered": "none"
_107
},
_107
"content_sid": null,
_107
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"links": {
_107
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_107
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_107
}
_107
},
_107
{
_107
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"body": "Cake is my favorite!",
_107
"media": null,
_107
"author": "cake_lover",
_107
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"attributes": {
_107
"importance": "high"
_107
},
_107
"date_created": "2016-03-24T20:38:21Z",
_107
"date_updated": "2016-03-24T20:38:21Z",
_107
"index": 5,
_107
"delivery": {
_107
"total": 2,
_107
"sent": "all",
_107
"delivered": "some",
_107
"read": "some",
_107
"failed": "none",
_107
"undelivered": "none"
_107
},
_107
"content_sid": null,
_107
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"links": {
_107
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_107
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_107
}
_107
},
_107
{
_107
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"body": null,
_107
"media": [
_107
{
_107
"sid": "MEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"size": 42056,
_107
"content_type": "image/jpeg",
_107
"filename": "car.jpg"
_107
}
_107
],
_107
"author": "cake_lover",
_107
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"attributes": {
_107
"importance": "high"
_107
},
_107
"date_created": "2016-03-24T20:38:21Z",
_107
"date_updated": "2016-03-24T20:38:21Z",
_107
"index": 9,
_107
"delivery": {
_107
"total": 2,
_107
"sent": "all",
_107
"delivered": "some",
_107
"read": "some",
_107
"failed": "none",
_107
"undelivered": "none"
_107
},
_107
"content_sid": null,
_107
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_107
"links": {
_107
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_107
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_107
}
_107
}
_107
]
_107
}

Fetch the latest Conversation Message

fetch-the-latest-conversation-message page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.messages
_11
.list({order: 'desc', limit: 20})
_11
.then(messages => messages.forEach(m => console.log(m.sid)));

Output

_49
{
_49
"meta": {
_49
"page": 0,
_49
"page_size": 1,
_49
"first_page_url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?Order=desc&PageSize=1&Page=0",
_49
"previous_page_url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?Order=desc&PageSize=1&Page=0",
_49
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?Order=desc&PageSize=1&Page=0",
_49
"next_page_url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages?Order=desc&PageSize=1&Page=1&PageToken=PAIMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"key": "messages"
_49
},
_49
"messages": [
_49
{
_49
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"body": null,
_49
"media": [
_49
{
_49
"sid": "MEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"size": 42056,
_49
"content_type": "image/jpeg",
_49
"filename": "car.jpg"
_49
}
_49
],
_49
"author": "cake_lover",
_49
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"attributes": {
_49
"importance": "high"
_49
},
_49
"date_created": "2016-03-24T20:38:21Z",
_49
"date_updated": "2016-03-24T20:38:21Z",
_49
"index": 9,
_49
"delivery": {
_49
"total": 2,
_49
"sent": "all",
_49
"delivered": "some",
_49
"read": "some",
_49
"failed": "none",
_49
"undelivered": "none"
_49
},
_49
"content_sid": null,
_49
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_49
"links": {
_49
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_49
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_49
}
_49
}
_49
]
_49
}


Update a ConversationMessage resource

update-a-conversationmessage-resource page anchor
POST https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}

URI parameters
ConversationSidtype: stringNot PII
Path Parameter

The unique ID of the Conversation(link takes you to an external page) for this message.


Sidtype: SID<IM>Not PII
Path Parameter

A 34 character string that uniquely identifies this resource.


X-Twilio-Webhook-Enabledtype: enum<STRING>Not PII
Header Parameter

The X-Twilio-Webhook-Enabled HTTP request header

Possible values:
truefalse

Request body parameters
Authortype: stringPII MTL: 30 days

The channel specific identifier of the message's author. Defaults to system.


Bodytype: stringPII MTL: 30 days

The content of the message, can be up to 1,600 characters long.


DateCreatedtype: string<DATE TIME>Not PII

The date that this resource was created.


DateUpdatedtype: string<DATE TIME>Not PII

The date that this resource was last updated. null if the message has not been edited.


Attributestype: stringPII MTL: 30 days

A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned.


Subjecttype: stringNot PII

The subject of the message, can be up to 256 characters long.

Update a Conversation Message

update-a-conversation-message page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_14
// Download the helper library from https://www.twilio.com/docs/node/install
_14
// Find your Account SID and Auth Token at twilio.com/console
_14
// and set the environment variables. See http://twil.io/secure
_14
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_14
const authToken = process.env.TWILIO_AUTH_TOKEN;
_14
const client = require('twilio')(accountSid, authToken);
_14
_14
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.messages('IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_14
.update({
_14
author: 'regretfulUser',
_14
body: 'I take back what I said'
_14
})
_14
.then(message => console.log(message.conversationSid));

Output

_29
{
_29
"sid": "IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"body": "I take back what I said",
_29
"media": null,
_29
"author": "regretfulUser",
_29
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"attributes": {
_29
"importance": "high"
_29
},
_29
"date_created": "2015-12-16T22:18:37Z",
_29
"date_updated": "2015-12-16T22:18:38Z",
_29
"index": 0,
_29
"delivery": {
_29
"total": 2,
_29
"sent": "all",
_29
"delivered": "some",
_29
"read": "some",
_29
"failed": "none",
_29
"undelivered": "none"
_29
},
_29
"content_sid": null,
_29
"url": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"links": {
_29
"delivery_receipts": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Receipts",
_29
"channel_metadata": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Messages/IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelMetadata"
_29
}
_29
}


Delete a ConversationMessage resource

delete-a-conversationmessage-resource page anchor
DELETE https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Messages/{Sid}

URI parameters
ConversationSidtype: stringNot PII
Path Parameter

The unique ID of the Conversation(link takes you to an external page) for this message.


Sidtype: SID<IM>Not PII
Path Parameter

A 34 character string that uniquely identifies this resource.


X-Twilio-Webhook-Enabledtype: enum<STRING>Not PII
Header Parameter

The X-Twilio-Webhook-Enabled HTTP request header

Possible values:
truefalse

Delete a Conversation Message

delete-a-conversation-message page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.messages('IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.remove();


Rate this Page: