TaskrouterTask Queue

Update Task Queue

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

Authorization

accountSid_authToken
AuthorizationBasic <token>

In: header

Path Parameters

WorkspaceSid*string

The SID of the Workspace with the TaskQueue to update.

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

The SID of the TaskQueue resource to update.

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

Request Body

application/x-www-form-urlencoded

FriendlyName?string

A descriptive string that you create to describe the TaskQueue. For example Support-Tier 1, Sales, or Escalation.

TargetWorkers?string

A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '"language" == "spanish"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below.

ReservationActivitySid?string

The SID of the Activity to assign Workers when a task is reserved for them.

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

The SID of the Activity to assign Workers when a task is assigned for them.

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

The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50.

TaskOrder?TaskQueueTaskOrder

How Tasks will be assigned to Workers. Set this parameter to LIFO to assign most recently created Task first or FIFO to assign the oldest Task. Default is FIFO. Click here to learn more.

Value in

  • "FIFO"
  • "LIFO"

Response Body

application/json

curl -X POST "https://example.com/v1/Workspaces/stringstringstringstringstringstri/TaskQueues/stringstringstringstringstringstri" \  -H "Content-Type: application/x-www-form-urlencoded" \  -d 'AssignmentActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&FriendlyName=friendly_name&MaxReservedWorkers=1&ReservationActivitySid=WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&TargetWorkers=target_workers&OperatingUnitSid=OUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
{  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "assignment_activity_name": "817ca1c5-3a05-11e5-9292-98e0d9a1eb73",  "assignment_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "date_created": "2015-08-04T01:31:41Z",  "date_updated": "2015-08-04T01:31:41Z",  "friendly_name": "81f96435-3a05-11e5-9f81-98e0d9a1eb73",  "max_reserved_workers": 1,  "links": {    "assignment_activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",    "reservation_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/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Statistics",    "real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RealTimeStatistics",    "cumulative_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/CumulativeStatistics",    "list_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/Statistics",    "bulk_real_time_statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/RealTimeStatistics"  },  "reservation_activity_name": "80fa2beb-3a05-11e5-8fc8-98e0d9a1eb73",  "reservation_activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "target_workers": null,  "task_order": "FIFO",  "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",  "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}