Headers
-
If-Match string
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.
-
The SID of the Task resource to update.
Body
-
AssignmentStatus string
The new status of the task. Can be:
canceled
, to cancel a Task that is currentlypending
orreserved
;wrapping
, to move the Task to wrapup state; orcompleted
, to move a Task to the completed state.Values are
pending
,reserved
,assigned
,canceled
,completed
, orwrapping
. -
Attributes string
The JSON string that describes the custom attributes of the task.
-
Priority integer
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).
-
Reason string
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.
-
TaskChannel string
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
.
curl \
-X POST https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Tasks/{Sid} \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "If-Match: string" \
-d 'AssignmentStatus=pending&Attributes=string&Priority=42&Reason=string&TaskChannel=string'
# Headers
If-Match: string
# Payload
{
"AssignmentStatus": "pending",
"Attributes": "string",
"Priority": 42,
"Reason": "string",
"TaskChannel": "string"
}
# Headers
If-Match: string
# Payload
{
"AssignmentStatus": "pending",
"Attributes": "string",
"Priority": 42,
"Reason": "string",
"TaskChannel": "string"
}
{
"account_sid": "string",
"addons": "string",
"age": 42,
"assignment_status": "pending",
"attributes": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"links": {},
"priority": 42,
"reason": "string",
"sid": "string",
"task_channel_sid": "string",
"task_channel_unique_name": "string",
"task_queue_entered_date": "2023-05-04T09:42:00+00:00",
"task_queue_friendly_name": "string",
"task_queue_sid": "string",
"timeout": 42,
"url": "https://example.com",
"workflow_friendly_name": "string",
"workflow_sid": "string",
"workspace_sid": "string"
}
{
"account_sid": "string",
"addons": "string",
"age": 42,
"assignment_status": "pending",
"attributes": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"links": {},
"priority": 42,
"reason": "string",
"sid": "string",
"task_channel_sid": "string",
"task_channel_unique_name": "string",
"task_queue_entered_date": "2024-05-04T09:42:00+00:00",
"task_queue_friendly_name": "string",
"task_queue_sid": "string",
"timeout": 42,
"url": "https://example.com",
"workflow_friendly_name": "string",
"workflow_sid": "string",
"workspace_sid": "string"
}