Path parameters
-
The SID of the Workspace that the new TaskQueue belongs to.
Body
-
AssignmentActivitySid string
The SID of the Activity to assign Workers when a task is assigned to them.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WA[0-9a-fA-F]{32}$
. -
A descriptive string that you create to describe the TaskQueue. For example
Support-Tier 1
,Sales
, orEscalation
. -
MaxReservedWorkers integer
The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1.
-
ReservationActivitySid string
The SID of the Activity to assign Workers when a task is reserved for them.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WA[0-9a-fA-F]{32}$
. -
TargetWorkers string
A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example,
'"language" == "spanish"'
. The default value is1==1
. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see Describing Worker selection criteria. -
TaskOrder string
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 first. Default isFIFO
. Click here to learn more.Values are
FIFO
orLIFO
.
curl \
-X POST https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskQueues \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'AssignmentActivitySid=string&FriendlyName=string&MaxReservedWorkers=42&ReservationActivitySid=string&TargetWorkers=string&TaskOrder=FIFO'
{
"AssignmentActivitySid": "string",
"FriendlyName": "string",
"MaxReservedWorkers": 42,
"ReservationActivitySid": "string",
"TargetWorkers": "string",
"TaskOrder": "FIFO"
}
{
"AssignmentActivitySid": "string",
"FriendlyName": "string",
"MaxReservedWorkers": 42,
"ReservationActivitySid": "string",
"TargetWorkers": "string",
"TaskOrder": "FIFO"
}
{
"account_sid": "string",
"assignment_activity_name": "string",
"assignment_activity_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"friendly_name": "string",
"links": {},
"max_reserved_workers": 42,
"reservation_activity_name": "string",
"reservation_activity_sid": "string",
"sid": "string",
"target_workers": "string",
"task_order": "FIFO",
"url": "https://example.com",
"workspace_sid": "string"
}
{
"account_sid": "string",
"assignment_activity_name": "string",
"assignment_activity_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"friendly_name": "string",
"links": {},
"max_reserved_workers": 42,
"reservation_activity_name": "string",
"reservation_activity_sid": "string",
"sid": "string",
"target_workers": "string",
"task_order": "FIFO",
"url": "https://example.com",
"workspace_sid": "string"
}