# Update task **POST /v1/Workspaces/{WorkspaceSid}/Tasks/{Sid}** ## Servers - https://taskrouter.twilio.com: https://taskrouter.twilio.com () ## Authentication methods - Account sid auth token ## Parameters ### Headers - **If-Match** (string) If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match). ### Path parameters - **WorkspaceSid** (string) The SID of the Workspace with the Task to update. - **Sid** (string) The SID of the Task resource to update. ### Body: application/x-www-form-urlencoded (object) - **Attributes** (string) The JSON string that describes the custom attributes of the task. - **AssignmentStatus** (string) The current status of the Task's assignment. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. - **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. - **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 2^31^ (2,147,483,647). - **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 as `voice`, `sms`, or `default`. - **VirtualStartTime** (string(date-time)) 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. ## Responses ### 200 OK #### Headers - **ETag** (string) - **X-Rate-Limit-Limit** (string) - **X-Rate-Limit-Remaining** (string) - **X-Rate-Limit-Config** (string) - **Access-Control-Allow-Origin** (string) Specify the origin(s) allowed to access the resource - **Access-Control-Allow-Methods** (string) Specify the HTTP methods allowed when accessing the resource - **Access-Control-Allow-Headers** (string) Specify the headers allowed when accessing the resource - **Access-Control-Allow-Credentials** (boolean) Indicates whether the browser should include credentials - **Access-Control-Expose-Headers** (string) Headers exposed to the client #### Body: application/json (object) - **account_sid** (string | null) The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Task resource. - **age** (integer) The number of seconds since the Task was created. - **assignment_status** (string) The current status of the Task's assignment. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. - **attributes** (string | null) The JSON string with custom attributes of the work. **Note** If this property has been assigned a value, it will only be displayed in FETCH action that returns a single resource. Otherwise, it will be null. - **addons** (string | null) An object that contains the [Add-on](https://www.twilio.com/docs/add-ons) data for all installed Add-ons. - **date_created** (string(date-time) | null) The date and time in GMT when the resource was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **date_updated** (string(date-time) | null) The date and time in GMT when the resource was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **task_queue_entered_date** (string(date-time) | null) The date and time in GMT when the Task entered the TaskQueue, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **priority** (integer) The current priority score of the Task as assigned to a Worker by the workflow. Tasks with higher priority values will be assigned before Tasks with lower values. - **reason** (string | null) The reason the Task was canceled or completed, if applicable. - **sid** (string | null) The unique string that we created to identify the Task resource. - **task_queue_sid** (string | null) The SID of the TaskQueue. - **task_queue_friendly_name** (string | null) The friendly name of the TaskQueue. - **task_channel_sid** (string | null) The SID of the TaskChannel. - **task_channel_unique_name** (string | null) The unique name of the TaskChannel. - **timeout** (integer) The amount of time in seconds that the Task can live before being assigned. - **workflow_sid** (string | null) The SID of the Workflow that is controlling the Task. - **workflow_friendly_name** (string | null) The friendly name of the Workflow that is controlling the Task. - **workspace_sid** (string | null) The SID of the Workspace that contains the Task. - **url** (string(uri) | null) The absolute URL of the Task resource. - **links** (object(uri-map) | null) The URLs of related resources. - **virtual_start_time** (string(date-time) | null) The date and time in GMT indicating the ordering for routing of the Task specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - **ignore_capacity** (boolean | null) A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID. - **routing_target** (string | null) A SID of a Worker, Queue, or Workflow to route a Task to [Powered by Bump.sh](https://bump.sh)