Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Participant Conversation Resource


The ParticipantConversation resource lists all the Conversations for a specific participant. It performs the lookup using an exact match to the participant identifier.
This resource supports the lookup of conversations for a specific participant based on two types of query parameters:

  • Identity: for Chat users,
  • Address: for non-Chat members, e.g., SMS or WhatsApp addresses.

Users can provide only one parameter at a time, i.e. either identity or address. The returned data will be sorted by the conversationSid alphabetically.


ParticipantConversation Properties

participantconversation-properties page anchor

Each Participant Conversation resource contains these properties.

account_sidSID<AC>
Not PII

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

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

chat_service_sidSID<IS>

The unique ID of the Conversation Service(link takes you to an external page) this conversation belongs to.

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

participant_sidSID<MB>

The unique ID of the Participant(link takes you to an external page).

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

participant_user_sidSID<US>

The unique string that identifies the conversation participant as Conversation User(link takes you to an external page).

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

participant_identitystring
PII MTL: 30 days

A unique string identifier for the conversation participant as Conversation User(link takes you to an external page). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.


participant_messaging_bindingobject

Information about how this participant exchanges messages with the conversation. A JSON parameter consisting of type and address fields of the participant.


conversation_sidSID<CH>

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

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

conversation_unique_namestring

An application-defined string that uniquely identifies the Conversation resource.


conversation_friendly_namestring

The human-readable name of this conversation, limited to 256 characters. Optional.


conversation_attributesstring

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


conversation_date_createdstring<date-time>

The date that this conversation was created, given in ISO 8601 format.


conversation_date_updatedstring<date-time>

The date that this conversation was last updated, given in ISO 8601 format.


conversation_created_bystring

Identity of the creator of this Conversation.


conversation_stateenum<string>

The current state of this User Conversation. One of inactive, active or closed.

Possible values:
inactiveactiveclosed

conversation_timersobject

Timer date values representing state update for this conversation.


linksobject<uri-map>

Contains absolute URLs to access the participant(link takes you to an external page) and conversation(link takes you to an external page) of this conversation.


List All of a Participant's Conversations

list-all-of-a-participants-conversations page anchor
GET https://conversations.twilio.com/v1/ParticipantConversations

The ParticipantConversation resource also supports pagination via additional parameters like: PageSize and PageToken.

(information)

Info

It's expected that you will encode the url for the ParticipantConversations endpoint, for example, if a phone number is passed as an address parameter the + character should be encoded as %2B.

(warning)

Warning

In the Group MMS use case, it may happen that the participant might not have an identifier (no address and no identity). So, this endpoint will not return conversations for this participant. Similarly if the identity of this participant with Projected Address is created later then this endpoint will not return conversations to which this participant was added when it was without identity.

Query parameters

query-parameters page anchor
Identitystring

A unique string identifier for the conversation participant as Conversation User(link takes you to an external page). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.


Addressstring

A unique string identifier for the conversation participant who's not a Conversation User. This parameter could be found in messaging_binding.address field of Participant resource. It should be url-encoded.


PageSizeinteger

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

Minimum: 1Maximum: 1000

Pageinteger

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

Minimum: 0

PageTokenstring

The page token. This is provided by the API.

List All of a Participant's Conversations

list-all-of-a-participants-conversations-1 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.participantConversations
_10
.list({address: '+375255555555', limit: 20})
_10
.then(participantConversations => participantConversations.forEach(p => console.log(p.conversationUniqueName)));

Output

_44
{
_44
"conversations": [
_44
{
_44
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_44
"chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_44
"conversation_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_44
"participant_sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_44
"conversation_friendly_name": "friendly_name",
_44
"conversation_state": "inactive",
_44
"conversation_timers": {
_44
"date_inactive": "2015-12-16T22:19:38Z",
_44
"date_closed": "2015-12-16T22:28:38Z"
_44
},
_44
"conversation_attributes": {},
_44
"conversation_date_created": "2015-07-30T20:00:00Z",
_44
"conversation_date_updated": "2015-07-30T20:00:00Z",
_44
"conversation_created_by": "created_by",
_44
"conversation_unique_name": "unique_name",
_44
"participant_user_sid": null,
_44
"participant_identity": null,
_44
"participant_messaging_binding": {
_44
"address": "+375255555555",
_44
"proxy_address": "+12345678910",
_44
"type": "sms",
_44
"level": null,
_44
"name": null,
_44
"projected_address": null
_44
},
_44
"links": {
_44
"participant": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_44
"conversation": "https://conversations.twilio.com/v1/Conversations/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_44
}
_44
}
_44
],
_44
"meta": {
_44
"page": 0,
_44
"page_size": 50,
_44
"first_page_url": "https://conversations.twilio.com/v1/ParticipantConversations?Address=%2B375255555555&PageSize=50&Page=0",
_44
"previous_page_url": "https://conversations.twilio.com/v1/ParticipantConversations?Address=%2B375255555555&PageSize=50&Page=0",
_44
"url": "https://conversations.twilio.com/v1/ParticipantConversations?Address=%2B375255555555&PageSize=50&Page=0",
_44
"next_page_url": "https://conversations.twilio.com/v1/ParticipantConversations?Address=%2B375255555555&PageSize=50&Page=1",
_44
"key": "conversations"
_44
}
_44
}


Rate this page: