Path parameters
-
The SID of the Workspace with the WorkerChannel to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WS[0-9a-fA-F]{32}$
. -
The SID of the Worker with the WorkerChannel to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WK[0-9a-fA-F]{32}$
. -
The SID of the WorkerChannel to update.
Body
-
The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created.
-
Whether the WorkerChannel is available. Set to
false
to prevent the Worker from receiving any new Tasks of this TaskChannel type.
POST
/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}
curl \
--request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Capacity=3'
Request example
{"Capacity"=>3}
Response examples (200)
{
"sid": "WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"available": true,
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-04-14T17:35:54Z",
"date_updated": "2016-04-14T17:35:54Z",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"assigned_tasks": 0,
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"configured_capacity": 3,
"task_channel_unique_name": "default",
"available_capacity_percentage": 100
}