TaskrouterWorker

Update Worker

POST
/v1/Workspaces/{WorkspaceSid}/Workers/{Sid}

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Path Parameters

WorkspaceSid*string

The SID of the Workspace with the Worker to update.

Match^WS[0-9a-fA-F]{32}$
Length34 <= length <= 34
Sid*string

The SID of the Worker resource to update.

Match^WK[0-9a-fA-F]{32}$
Length34 <= length <= 34

Header Parameters

If-Match?string

The If-Match HTTP request header

Request Body

application/x-www-form-urlencoded

ActivitySid?string

The SID of a valid Activity that will describe the Worker's initial state. See Activities for more information.

Match^WA[0-9a-fA-F]{32}$
Length34 <= length <= 34
Attributes?string

The JSON string that describes the Worker. For example: { "email": "Bob@example.com", "phone": "+5095551234" }. This data is passed to the assignment_callback_url when TaskRouter assigns a Task to the Worker. Defaults to {}.

FriendlyName?string

A descriptive string that you create to describe the Worker. It can be up to 64 characters long.

RejectPendingReservations?boolean

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 to False.

Response Body

application/json

curl -X POST "https://example.com/v1/Workspaces/stringstringstringstringstringstri/Workers/stringstringstringstringstringstri" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'ActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Attributes=attributes&FriendlyName=friendly_name&OperatingUnitSid=OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&Concurrency=5'
{  "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "friendly_name": "blah",  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "activity_name": "Offline",  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "attributes": "{}",  "available": false,  "date_created": "2017-05-30T23:32:22Z",  "date_updated": "2017-05-31T00:05:57Z",  "date_status_changed": "2017-05-30T23:32:22Z",  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "links": {    "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",    "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",    "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",    "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics",    "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/RealTimeStatistics",    "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/CumulativeStatistics",    "worker_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",    "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels",    "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations"  }}