Skip to contentSkip to navigationSkip to topbar
Rate this Page:

Service-Scoped Conversation Message Resource


Use the Service-scoped Conversation Message resource to interact with messages in Conversations that belong to a non-default, service-scoped Conversation resource.

Please see the Conversation Message Resource API Reference page for Messages that belong to Conversations in the default Conversation Service.


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

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


Service-Scoped Conversation Message Properties

service-scoped-conversation-message-properties page anchor
Resource properties
account_sidtype: SID<AC>Not PII

chat_service_sidtype: SID<IS>Not PII

The SID of the Conversation Service(link takes you to an external page) the Participant resource is associated with.


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


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.


deliverytype: objectNot PII

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


urltype: string<URI>Not PII

An absolute API resource URL for this message.


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 Service-Scoped Conversation Message resource

create-a-service-scoped-conversation-message-resource page anchor
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages

Parameters

create-parameters page anchor
URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Conversation Service(link takes you to an external page) the Participant resource is associated with.


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 ServiceConversationMessage

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

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

Output

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


Fetch a Service-Scoped Conversation Message resource

fetch-a-service-scoped-conversation-message-resource page anchor
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}

URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Conversation Service(link takes you to an external page) the Participant resource is associated with.


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 ServiceConversationMessage

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

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

Output

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


Read all Service-Scoped Conversation Message resources

read-all-service-scoped-conversation-message-resources page anchor
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages

URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Conversation Service(link takes you to an external page) the Participant resource is associated with.


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

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

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

Output

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


Update a Service-Scoped Conversation Message resource

update-a-service-scoped-conversation-message-resource page anchor
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}

URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Conversation Service(link takes you to an external page) the Participant resource is associated with.


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 ServiceConversationMessage

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

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

Output

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


Delete a Service-Scoped Conversation Message resource

delete-a-service-scoped-conversation-message-resource page anchor
DELETE https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}

URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Conversation Service(link takes you to an external page) the Participant resource is associated with.


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 ServiceConversationMessage

delete-a-serviceconversationmessage 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.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.conversations('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.messages('IMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.remove();


Rate this Page: