Interaction Channel Participants
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.
The unique string created by Twilio to identify an Interaction Channel Participant resource.
^UT[0-9a-fA-F]{32}$Min length: 34Max length: 34Participant type. Can be: agent, customer, supervisor, external, unknown
supervisorcustomerexternalagentunknownThe Interaction Sid for this channel.
^KD[0-9a-fA-F]{32}$Min length: 34Max length: 34The Channel Sid for this Participant.
^UO[0-9a-fA-F]{32}$Min length: 34Max length: 34The Participant's routing properties.
GET https://flex-api.twilio.com/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1Maximum: 1000The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function listInteractionChannelParticipant() {14const participants = await client.flexApi.v115.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")17.participants.list({ limit: 20 });1819participants.forEach((p) => console.log(p.sid));20}2122listInteractionChannelParticipant();
Response
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}
POST https://flex-api.twilio.com/v1/Interactions/{InteractionSid}/Channels/{ChannelSid}/Participants/{Sid}
The Interaction Sid for this channel.
^KD[0-9a-fA-F]{32}$Min length: 34Max length: 34The Channel Sid for this Participant.
^UO[0-9a-fA-F]{32}$Min length: 34Max length: 34The unique string created by Twilio to identify an Interaction Channel resource.
^UT[0-9a-fA-F]{32}$Min length: 34Max length: 34application/x-www-form-urlencodedclosedwrapup1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function updateInteractionChannelParticipant() {14const participant = await client.flexApi.v115.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")17.participants("UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")18.update({ status: "wrapup" });1920console.log(participant.sid);21}2223updateInteractionChannelParticipant();
Response
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/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function updateInteractionChannelParticipant() {14const participant = await client.flexApi.v115.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")16.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")17.participants("UTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")18.update({ status: "closed" });1920console.log(participant.sid);21}2223updateInteractionChannelParticipant();
Response
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}