Skip to contentSkip to navigationSkip to topbar
Rate this page:
On 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

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

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

chat_service_sidtype: SID<IS>

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

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

conversation_sidtype: SID<CH>

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

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

sidtype: SID<IM>

A 34 character string that uniquely identifies this resource.

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

indextype: integer

The index of the message within the Conversation(link takes you to an external page).


authortype: string

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


bodytype: string

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


mediatype: array

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

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>

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

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

date_createdtype: string<date-time>

The date that this resource was created.


date_updatedtype: string<date-time>

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


deliverytype: object

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


urltype: string<uri>

An absolute API resource URL for this message.


linkstype: object<uri-map>

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


content_sidtype: SID<HX>

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

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

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
Request headers
X-Twilio-Webhook-Enabledtype: enum<string>

The X-Twilio-Webhook-Enabled HTTP request header

Possible values:
truefalse

URI parameters
ChatServiceSidtype: SID<IS>
Path ParameterNot PII

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

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

ConversationSidtype: string
Path ParameterNot PII

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


Request body parameters
Authortype: string

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


Bodytype: string

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


DateCreatedtype: string<date-time>

The date that this resource was created.


DateUpdatedtype: string<date-time>

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


Attributestype: string

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>

The Media SID to be attached to the new Message.

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

ContentSidtype: SID<HX>

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.

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

ContentVariablestype: string

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


Subjecttype: string

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>
Path ParameterNot PII

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

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

ConversationSidtype: string
Path ParameterNot PII

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


Sidtype: SID<IM>
Path ParameterNot PII

A 34 character string that uniquely identifies this resource.

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

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>
Path ParameterNot PII

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

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

ConversationSidtype: string
Path ParameterNot PII

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


Ordertype: enum<string>
Query ParameterNot PII

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

Possible values:
ascdesc

PageSizetype: integer
Query ParameterNot PII

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

Minimum:
1

Pagetype: integer
Query ParameterNot PII

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

Minimum:
0

PageTokentype: string
Query ParameterNot PII

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}

Request headers
X-Twilio-Webhook-Enabledtype: enum<string>

The X-Twilio-Webhook-Enabled HTTP request header

Possible values:
truefalse

URI parameters
ChatServiceSidtype: SID<IS>
Path ParameterNot PII

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

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

ConversationSidtype: string
Path ParameterNot PII

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


Sidtype: SID<IM>
Path ParameterNot PII

A 34 character string that uniquely identifies this resource.

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

Request body parameters
Authortype: string

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


Bodytype: string

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


DateCreatedtype: string<date-time>

The date that this resource was created.


DateUpdatedtype: string<date-time>

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


Attributestype: string

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

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}

Request headers
X-Twilio-Webhook-Enabledtype: enum<string>

The X-Twilio-Webhook-Enabled HTTP request header

Possible values:
truefalse

URI parameters
ChatServiceSidtype: SID<IS>
Path ParameterNot PII

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

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

ConversationSidtype: string
Path ParameterNot PII

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


Sidtype: SID<IM>
Path ParameterNot PII

A 34 character string that uniquely identifies this resource.

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

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: