Each service-scoped Participant in a Conversation represents one real (probably human) participant in a non-default, service-scoped Conversation.
All URLs in the reference documentation use the following base URL:
_10https://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 (ISxx
) and the Conversation SID (CHxx
) in the REST API call:
_10GET /v1/Services/ISxx/Conversations/CHxx/Messages
account_sid
type: SID<AC>The unique ID of the Account responsible for this participant.
^AC[0-9a-fA-F]{32}$
34
34
chat_service_sid
type: SID<IS>The SID of the Conversation Service the Participant resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
conversation_sid
type: SID<CH>The unique ID of the Conversation for this participant.
^CH[0-9a-fA-F]{32}$
34
34
sid
type: SID<MB>A 34 character string that uniquely identifies this resource.
^MB[0-9a-fA-F]{32}$
34
34
identity
type: stringA unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters.
attributes
type: stringAn optional 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.
messaging_binding
type: objectInformation about how this participant exchanges messages with the conversation. A JSON parameter consisting of type and address fields of the participant.
role_sid
type: SID<RL>The SID of a conversation-level Role to assign to the participant.
^RL[0-9a-fA-F]{32}$
34
34
last_read_message_index
type: integerIndex of last “read” message in the Conversation for the Participant.
last_read_timestamp
type: stringTimestamp of last “read” message in the Conversation for the Participant.
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants
Creating a Participant joins them to the Conversation, and the connected person will receive all subsequent messages.
X-Twilio-Webhook-Enabled
type: enum<string>The X-Twilio-Webhook-Enabled HTTP request header
true
false
ChatServiceSid
type: SID<IS>The SID of the Conversation Service the Participant resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
ConversationSid
type: stringThe unique ID of the Conversation for this participant.
Identity
type: stringA unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters.
MessagingBinding.Address
type: stringThe address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address
) is only null when the participant is interacting from an SDK endpoint (see the identity
field).
MessagingBinding.ProxyAddress
type: stringThe address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the identity
field).
Attributes
type: stringAn optional 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.
MessagingBinding.ProjectedAddress
type: stringThe address of the Twilio phone number that is used in Group MMS.
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}
ChatServiceSid
type: SID<IS>The SID of the Conversation Service the Participant resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
ConversationSid
type: stringThe unique ID of the Conversation for this participant.
Sid
type: stringA 34 character string that uniquely identifies this resource. Alternatively, you can pass a Participant's identity
rather than the SID.
Fetch a Service-Scoped Participant resource by SID
You can also fetch a Service-Scoped Conversation Participant by their identity
. Pass their identity
as the value for the sid
argument.
Fetch a Service-Scoped Participant resource by identity
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants
ChatServiceSid
type: SID<IS>The SID of the Conversation Service the Participant resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}
X-Twilio-Webhook-Enabled
type: enum<string>The X-Twilio-Webhook-Enabled HTTP request header
true
false
ChatServiceSid
type: SID<IS>The SID of the Conversation Service the Participant resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
ConversationSid
type: stringThe unique ID of the Conversation for this participant.
Identity
type: stringA unique string identifier for the conversation participant as Conversation User. This parameter is non-null if (and only if) the participant is using the Conversation SDK to communicate. Limited to 256 characters.
Attributes
type: stringAn optional 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.
RoleSid
type: SID<RL>The SID of a conversation-level Role to assign to the participant.
^RL[0-9a-fA-F]{32}$
34
34
MessagingBinding.ProxyAddress
type: stringThe address of the Twilio phone number that the participant is in contact with. 'null' value will remove it.
MessagingBinding.ProjectedAddress
type: stringThe address of the Twilio phone number that is used in Group MMS. 'null' value will remove it.
LastReadMessageIndex
type: integerIndex of last “read” message in the Conversation for the Participant.
LastReadTimestamp
type: stringTimestamp of last “read” message in the Conversation for the Participant.
DELETE https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Participants/{Sid}
Deleting a participant removes them from the Conversation; they will receive no new messages after that point.
X-Twilio-Webhook-Enabled
type: enum<string>The X-Twilio-Webhook-Enabled HTTP request header
true
false
ChatServiceSid
type: SID<IS>The SID of the Conversation Service the Participant resource is associated with.
^IS[0-9a-fA-F]{32}$
34
34
ConversationSid
type: stringThe unique ID of the Conversation for this participant.