Path parameters
-
The SID of the Workspace with the Worker 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 resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WK[0-9a-fA-F]{32}$
.
Body
-
The SID of a valid Activity that will describe the Worker's initial state. See Activities for more information.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WA[0-9a-fA-F]{32}$
. -
The JSON string that describes the Worker. For example:
{ "email": "Bob@example.com", "phone": "+5095551234" }
. This data is passed to theassignment_callback_url
when TaskRouter assigns a Task to the Worker. Defaults to {}. -
A descriptive string that you create to describe the Worker. It can be up to 64 characters long.
-
Whether to reject the Worker's pending reservations. This option is only valid if the Worker's new Activity resource has its
availability
property set toFalse
.
curl \
--request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "If-Match: string" \
--data 'Attributes=attributes&ActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Concurrency=5&FriendlyName=friendly_name&OperatingUnitSid=OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
{"Attributes"=>"attributes", "ActivitySid"=>"WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "Concurrency"=>5, "FriendlyName"=>"friendly_name", "OperatingUnitSid"=>"OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
{
"sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
"workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics",
"reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations",
"worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",
"worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",
"real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics",
"cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics"
},
"available": false,
"attributes": "{}",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2017-05-30T23:32:22Z",
"date_updated": "2017-05-31T00:05:57Z",
"activity_name": "Offline",
"friendly_name": "blah",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"consumed_attention": 0,
"operating_unit_sid": "OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_status_changed": "2017-05-30T23:32:22Z",
"consumed_concurrency": 0,
"configured_concurrency": -1
}