Flex Chat Channel Resource
Info This guide is for Flex UI 1.x and channels that use Programmable Chat and Proxy. If you are using Flex UI 2.x or you are starting out, we recommend that you build with Flex Conversations .
Flex Chat Channels allow agents to communicate with your customers across multiple channels like Webchat, SMS, and WhatsApp through a single chat interface. You can create a chat channel in Flex whenever you want to initiate a new communication flow between an agent and a customer. The Flex Chat Channel is an implementation of the Chat Channel Resource orchestrated for Flex.
Resource properties The SID of the Flex Flow.
The unique string that we created to identify the Channel resource.
The SID of the chat user.
The SID of the TaskRouter Task. Only valid when integration type is task
. null
for integration types studio
& external
The absolute URL of the Flex chat channel resource.
date_created
type: string<DATE TIME> Not PIIdate_updated
type: string<DATE TIME> Not PII
POST https://flex-api.twilio.com/v1/Channels
Request body parameters Required
The SID of the Flex Flow.
Required
The identity
value that uniquely identifies the new resource's chat User.
ChatUserFriendlyName
type: string Not PIIRequired
The chat participant's friendly name.
ChatFriendlyName
type: string Not PIIRequired
The chat channel's friendly name.
The Target Contact Identity, for example the phone number of an SMS.
The chat channel's unique name.
PreEngagementData
type: string Not PIIThe SID of the TaskRouter Task. Only valid when integration type is task
. null
for integration types studio
& external
The Task attributes to be added for the TaskRouter Task.
Whether to create the channel as long-lived.
_15 // Download the helper library from https://www.twilio.com/docs/node/install
_15 // Find your Account SID and Auth Token at twilio.com/console
_15 // and set the environment variables. See http://twil.io/secure
_15 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_15 const authToken = process.env.TWILIO_AUTH_TOKEN;
_15 const client = require('twilio')(accountSid, authToken);
_15 client.flexApi.v1.channel
_15 flexFlowSid: 'FOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_15 identity: 'identity',
_15 chatUserFriendlyName: 'chat_user_friendly_name',
_15 chatFriendlyName: 'chat_friendly_name'
_15 .then(channel => console.log(channel.sid));
_10 "flex_flow_sid": "FOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "task_sid": "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "user_sid": "USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "date_created": "2016-08-01T22:10:40Z",
_10 "date_updated": "2016-08-01T22:10:40Z",
_10 "url": "https://flex-api.twilio.com/v1/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://flex-api.twilio.com/v1/Channels/{Sid}
URI parameters Path Parameter
The SID of the Flex chat channel resource to fetch.
_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 client.flexApi.v1.channel('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10 .then(channel => console.log(channel.flexFlowSid));
_10 "flex_flow_sid": "FOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "task_sid": "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "user_sid": "USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "date_created": "2016-08-01T22:10:40Z",
_10 "date_updated": "2016-08-01T22:10:40Z",
_10 "url": "https://flex-api.twilio.com/v1/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://flex-api.twilio.com/v1/Channels
URI parameters Query Parameter
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Query Parameter
The page index. This value is simply for client state.
Query Parameter
The page token. This is provided by the API.
_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 client.flexApi.v1.channel
_10 .then(channel => channel.forEach(c => console.log(c.sid)));
_23 "first_page_url": "https://flex-api.twilio.com/v1/Channels?PageSize=50&Page=0",
_23 "previous_page_url": "https://flex-api.twilio.com/v1/Channels?PageSize=50&Page=0",
_23 "url": "https://flex-api.twilio.com/v1/Channels?PageSize=50&Page=0",
_23 "next_page_url": "https://flex-api.twilio.com/v1/Channels?PageSize=50&Page=1",
_23 "key": "flex_chat_channels"
_23 "flex_chat_channels": [
_23 "flex_flow_sid": "FOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "task_sid": "WTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "user_sid": "USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_23 "date_created": "2016-08-01T22:10:40Z",
_23 "date_updated": "2016-08-01T22:10:40Z",
_23 "url": "https://flex-api.twilio.com/v1/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DELETE https://flex-api.twilio.com/v1/Channels/{Sid}
URI parameters Path Parameter
The SID of the Flex chat channel resource to delete.
_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 client.flexApi.v1.channel('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').remove();