Path parameters
-
The SID of the Workspace that the new Task Channel belongs to.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WS[0-9a-fA-F]{32}$
.
Body
-
A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.
-
An application-defined string that uniquely identifies the Task Channel, such as
voice
orsms
. -
Whether the Task Channel should prioritize Workers that have been idle. If
true
, Workers that have been idle the longest are prioritized.
POST
/v1/Workspaces/{WorkspaceSid}/TaskChannels
curl \
--request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'UniqueName=ovoice&FriendlyName=Outbound+Voice&RequiredAttention=0'
Request example
{"UniqueName"=>"ovoice", "FriendlyName"=>"Outbound Voice", "RequiredAttention"=>0}
Response examples (201)
{
"sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskChannels/TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"unique_name": "ovoice",
"date_created": "2016-04-14T17:35:54Z",
"date_updated": "2016-04-14T17:35:54Z",
"friendly_name": "Outbound Voice",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_optimized_routing": true
}