Skip to contentSkip to navigationSkip to topbar
On this page

Interaction Channel Participants


(information)

Info

Flex Conversations requires Flex UI 2.0.x. If you are on Flex UI 1.x.x, refer to the Messaging in Flex pages.

The Interaction Channel Participant subresource represents the actors communicating in an interaction channel. Typically, a channel will include people like agents, customers, and supervisors.


Participant Properties

participant-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<UT>

Optional

Not PII

The unique string created by Twilio to identify an Interaction Channel Participant resource.

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

typeenum<string>

Optional

Participant type. Can be: agent, customer, supervisor, external, unknown

Possible values:
supervisorcustomerexternalagentunknown

interaction_sidSID<KD>

Optional

The Interaction Sid for this channel.

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

channel_sidSID<UO>

Optional

The Channel Sid for this Participant.

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

urlstring<uri>

Optional


routing_propertiesobject

Optional

The Participant's routing properties.


Fetch Channel Participants

fetch-channel-participants page anchor
GET https://flex-api.twilio.com/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants

Path parameters

path-parameters page anchor
Property nameTypeRequiredPIIDescription
InteractionSidSID<KD>required

The Interaction Sid for this channel.

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

ChannelSidSID<UO>required

The Channel Sid for this Participant.

Pattern: ^UO[0-9a-fA-F]{32}$Min length: 34Max length: 34
Property nameTypeRequiredPIIDescription
PageSizeinteger

Optional

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

Minimum: 1Maximum: 1000

Pageinteger

Optional

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

Minimum: 0

PageTokenstring

Optional

The page token. This is provided by the API.

Fetch Channel ParticipantsLink to code sample: Fetch Channel Participants
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listInteractionChannelParticipant() {
11
const participants = await client.flexApi.v1
12
.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
14
.participants.list({ limit: 20 });
15
16
participants.forEach((p) => console.log(p.sid));
17
}
18
19
listInteractionChannelParticipant();

Output

1
{
2
"participants": [
3
{
4
"sid": "UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
5
"channel_sid": "UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
6
"interaction_sid": "KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"type": "customer",
8
"routing_properties": null,
9
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1"
10
},
11
{
12
"sid": "UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2",
13
"channel_sid": "UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
14
"interaction_sid": "KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
15
"type": "agent",
16
"routing_properties": {
17
"task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
18
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
19
"reservation_sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
20
},
21
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2"
22
}
23
],
24
"meta": {
25
"page": 0,
26
"page_size": 50,
27
"first_page_url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants?PageSize=50&Page=0",
28
"previous_page_url": null,
29
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants?PageSize=50&Page=0",
30
"next_page_url": null,
31
"key": "participants"
32
}
33
}

Modify a Channel Participant

modify-a-channel-participant page anchor
POST https://flex-api.twilio.com/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants/{Sid}

Property nameTypeRequiredPIIDescription
InteractionSidSID<KD>required

The Interaction Sid for this channel.

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

ChannelSidSID<UO>required

The Channel Sid for this Participant.

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

SidSID<UT>required

The unique string created by Twilio to identify an Interaction Channel resource.

Pattern: ^UT[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
Statusenum<string>required

The Participant's status. Can be: closed or wrapup. Participant must be an agent.

Possible values:
closedwrapup
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateInteractionChannelParticipant() {
11
const participant = await client.flexApi.v1
12
.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
14
.participants("UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
15
.update({ status: "wrapup" });
16
17
console.log(participant.sid);
18
}
19
20
updateInteractionChannelParticipant();

Output

1
{
2
"sid": "UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"channel_sid": "UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
4
"interaction_sid": "KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"type": "agent",
6
"routing_properties": {
7
"task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"reservation_sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
10
},
11
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1"
12
}
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateInteractionChannelParticipant() {
11
const participant = await client.flexApi.v1
12
.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
13
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
14
.participants("UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
15
.update({ status: "closed" });
16
17
console.log(participant.sid);
18
}
19
20
updateInteractionChannelParticipant();

Output

1
{
2
"sid": "UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
3
"channel_sid": "UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
4
"interaction_sid": "KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
5
"type": "agent",
6
"routing_properties": {
7
"task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
"reservation_sid": "WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
10
},
11
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Participants/UTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1"
12
}

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.