Body
-
The SID of the Flex Flow.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^FO[0-9a-fA-F]{32}$
. -
The
identity
value that uniquely identifies the new resource's chat User. -
The chat participant's friendly name.
-
The chat channel's friendly name.
-
The Target Contact Identity, for example the phone number of an SMS.
-
The chat channel's unique name.
-
The pre-engagement data.
-
The SID of the TaskRouter Task. Only valid when integration type is
task
.null
for integration typesstudio
&external
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WT[0-9a-fA-F]{32}$
. -
The Task attributes to be added for the TaskRouter Task.
-
Whether to create the channel as long-lived.
POST
/v1/Channels
curl \
--request POST 'https://flex-api.twilio.com/v1/Channels' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Target=def&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Identity=abc&LongLived=true&FlexFlowSid=FOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&ChatUniqueName=unique&TaskAttributes=%7B%7D&ChatFriendlyName=friendly1&PreEngagementData=%7B%7D&ChatUserFriendlyName=friendly2'
Request example
{"Target"=>"def", "TaskSid"=>"WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Identity"=>"abc", "LongLived"=>true, "FlexFlowSid"=>"FOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "ChatUniqueName"=>"unique", "TaskAttributes"=>"{}", "ChatFriendlyName"=>"friendly1", "PreEngagementData"=>"{}", "ChatUserFriendlyName"=>"friendly2"}
Response examples (201)
{
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://flex-api.twilio.com/v1/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-08-01T22:10:40Z",
"date_updated": "2016-08-01T22:10:40Z",
"flex_flow_sid": "FOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}