Headers
-
If provided, applies this mutation if (and only if) the ETag header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP If-Match header.
Path parameters
-
The SID of the Workspace with the Task 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 Task resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^WT[0-9a-fA-F]{32}$
.
Body
-
The JSON string that describes the custom attributes of the task.
-
The current status of the Task's assignment. Can be:
pending
,reserved
,assigned
,canceled
,wrapping
, orcompleted
.Values are
pending
,reserved
,assigned
,canceled
,completed
, orwrapping
. -
The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
-
The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 231^ (2,147,483,647).
-
When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its
unique_name
, such asvoice
,sms
, ordefault
. -
The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
curl \
--request POST 'https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "If-Match: string" \
--data 'Reason=reason&Priority=1&Attributes=attributes&AssignmentStatus=pending&VirtualStartTime=2023-08-02T12%3A34%3A56Z&RequiredAttention=0'
{"Reason"=>"reason", "Priority"=>1, "Attributes"=>"attributes", "AssignmentStatus"=>"pending", "VirtualStartTime"=>"2023-08-02T12:34:56Z", "RequiredAttention"=>0}
{
"age": 25200,
"sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
"workflow": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workflows/WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"task_queue": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/TaskQueues/WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations"
},
"addons": "{}",
"reason": "Test Reason",
"timeout": 60,
"priority": 0,
"attributes": "{\"body\": \"hello\"}",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2014-05-14T18:50:02Z",
"date_updated": "2014-05-15T07:26:06Z",
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"task_queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"ignore_capacity": false,
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"assignment_status": "pending",
"required_attention": 0,
"virtual_start_time": "2023-08-02T12:34:56Z",
"workflow_friendly_name": "Test Workflow",
"task_queue_entered_date": "2014-05-14T18:50:02Z",
"task_channel_unique_name": "task-channel",
"task_queue_friendly_name": "Test Queue"
}