Skip to contentSkip to navigationSkip to topbar
Rate this Page:

Participant


A Participant is a single individual communicating in a Session. There is a limit of two Participants per Session.

You can create a Proxy Participant in two ways:

  1. By specifying the private Phone Number of the Participant (Identifier) and relying on Proxy to select an appropriate Phone Number from the Proxy Number pool. The Proxy Number returned (Proxy Identifier) is the Phone Number that the Participant should call to reach the other party.
  2. By specifying both the Identifier and the Proxy Identifier. In this case, Proxy will attempt to use the Twilio Phone Number provided. Note: The Twilio Phone Number specified must already be added to the Proxy Number pool in order to be accepted.

Participant Properties

participant-properties page anchor
Resource properties
sidtype: SID<KP>Not PII

The unique string that we created to identify the Participant resource.


service_sidtype: SID<KS>Not PII

The SID of the resource's parent Service(link takes you to an external page) resource.


account_sidtype: SID<AC>Not PII

The SID of the Account(link takes you to an external page) that created the Participant resource.


friendly_nametype: stringNot PII

The string that you assigned to describe the participant. This value must be 255 characters or fewer. Supports UTF-8 characters. This value should not have PII.


identifiertype: stringPII MTL: 30 days

The phone number or channel identifier of the Participant. This value must be 191 characters or fewer. Supports UTF-8 characters.


proxy_identifiertype: stringNot PII

The phone number or short code (masked number) of the participant's partner. The participant will call or message the partner participant at this number.


proxy_identifier_sidtype: SID<PN>Not PII

The SID of the Proxy Identifier assigned to the Participant.


date_deletedtype: string<DATE TIME>Not PII

The ISO 8601(link takes you to an external page) date when the Participant was removed from the session.


date_createdtype: string<DATE TIME>Not PII

The ISO 8601(link takes you to an external page) date and time in GMT when the resource was created.


date_updatedtype: string<DATE TIME>Not PII

The ISO 8601(link takes you to an external page) date and time in GMT when the resource was last updated.


urltype: string<URI>Not PII

The absolute URL of the Participant resource.


linkstype: object<URI MAP>Not PII

The URLs to resources related the participant.


Create a Participant resource

create-a-participant-resource page anchor
POST https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants

Parameters

create-parameters page anchor
URI parameters
ServiceSidtype: SID<KS>Not PII
Path Parameter

The SID of the parent Service(link takes you to an external page) resource.


SessionSidtype: SID<KC>Not PII
Path Parameter

The SID of the parent Session(link takes you to an external page) resource.


Request body parameters
Identifiertype: stringPII MTL: 30 days
Required

The phone number of the Participant.


FriendlyNametype: stringNot PII

The string that you assigned to describe the participant. This value must be 255 characters or fewer. This value should not have PII.


ProxyIdentifiertype: stringNot PII

The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool.


ProxyIdentifierSidtype: SID<PN>Not PII

The SID of the Proxy Identifier to assign to the Participant.

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.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.sessions('KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.participants
_12
.create({friendlyName: 'Alice', identifier: '+15558675310'})
_12
.then(participant => console.log(participant.proxyIdentifier));

Output

_17
{
_17
"sid": "KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"session_sid": "KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"service_sid": "KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identifier": "+15558675310",
_17
"proxy_identifier": "+14155559999",
_17
"proxy_identifier_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"friendly_name": "Alice",
_17
"date_deleted": "2015-07-30T20:00:00Z",
_17
"date_updated": "2015-07-30T20:00:00Z",
_17
"date_created": "2015-07-30T20:00:00Z",
_17
"url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"links": {
_17
"message_interactions": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/MessageInteractions"
_17
}
_17
}


Fetch a Participant resource

fetch-a-participant-resource page anchor
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}

URI parameters
ServiceSidtype: SID<KS>Not PII
Path Parameter

The SID of the parent Service(link takes you to an external page) of the resource to fetch.


SessionSidtype: SID<KC>Not PII
Path Parameter

The SID of the parent Session(link takes you to an external page) of the resource to fetch.


Sidtype: SID<KP>Not PII
Path Parameter

The Twilio-provided string that uniquely identifies the Participant resource to fetch.

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.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.sessions('KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.participants('KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.fetch()
_12
.then(participant => console.log(participant.friendlyName));

Output

_17
{
_17
"sid": "KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"session_sid": "KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"service_sid": "KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"identifier": "+14155551212",
_17
"proxy_identifier": "+14155559999",
_17
"proxy_identifier_sid": "PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"friendly_name": "friendly_name",
_17
"date_deleted": "2015-07-30T20:00:00Z",
_17
"date_updated": "2015-07-30T20:00:00Z",
_17
"date_created": "2015-07-30T20:00:00Z",
_17
"url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17
"links": {
_17
"message_interactions": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/MessageInteractions"
_17
}
_17
}


Read multiple Participant resources

read-multiple-participant-resources page anchor
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants

URI parameters
ServiceSidtype: SID<KS>Not PII
Path Parameter

The SID of the parent Service(link takes you to an external page) of the resources to read.


SessionSidtype: SID<KC>Not PII
Path Parameter

The SID of the parent Session(link takes you to an external page) of the resources to read.


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.


In order to add a new Participant in a Session, you can DELETE an existing Participant and then add a new one.

(error)

Danger

Adding a participant that was removed is not possible.

Proxy will return with error 80103 if the new participant's identifier matches the deleted participant's identifier.

List multiple Participants

list-multiple-participants 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.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.sessions('KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.participants
_12
.list({limit: 20})
_12
.then(participants => participants.forEach(p => console.log(p.sid)));

Output

_12
{
_12
"meta": {
_12
"previous_page_url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants?PageSize=50&Page=0",
_12
"next_page_url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants?PageSize=50&Page=1",
_12
"url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants?PageSize=50&Page=0",
_12
"page": 0,
_12
"first_page_url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants?PageSize=50&Page=0",
_12
"page_size": 50,
_12
"key": "participants"
_12
},
_12
"participants": []
_12
}


Delete a Participant resource

delete-a-participant-resource page anchor
DELETE https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}

URI parameters
ServiceSidtype: SID<KS>Not PII
Path Parameter

The SID of the parent Service(link takes you to an external page) of the resource to delete.


SessionSidtype: SID<KC>Not PII
Path Parameter

The SID of the parent Session(link takes you to an external page) of the resource to delete.


Sidtype: SID<KP>Not PII
Path Parameter

The Twilio-provided string that uniquely identifies the Participant resource to delete.

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.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.sessions('KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.participants('KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.remove();


Rate this Page: