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
identityvalue 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.nullfor integration typesstudio&externalMinimum 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 'FlexFlowSid=FOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Target=def&Identity=abc&ChatUserFriendlyName=friendly2&ChatFriendlyName=friendly1&ChatUniqueName=unique&PreEngagementData=%7B%7D&TaskSid=WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TaskAttributes=%7B%7D&LongLived=true'
Request example
{"FlexFlowSid" => "FOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Target" => "def", "Identity" => "abc", "ChatUserFriendlyName" => "friendly2", "ChatFriendlyName" => "friendly1", "ChatUniqueName" => "unique", "PreEngagementData" => "{}", "TaskSid" => "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "TaskAttributes" => "{}", "LongLived" => true}
Response examples (201)
{
"flex_flow_sid": "FOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"task_sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-08-01T22:10:40Z",
"date_updated": "2016-08-01T22:10:40Z",
"url": "https://flex-api.twilio.com/v1/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}