Task Channel Resource
Task Channels provide a mechanism to separate tasks of different types.
You can specify different concurrent capacity for tasks of each type. For example, one Worker might be able to handle 10 SMS Tasks at any given time, but only a single phone call Task. When MultiTasking is enabled, you can specify the task type by passing the Unique Name or SID of the Task Channel. For details on limitations around the Task Channel Unique Name, see the FAQ on the Multitasking page.
TaskChannel properties
Pagination is not supported under this resource. Please avoid usage of the page
query parameter.
Resource Properties in REST API format | |
---|---|
account_sid
|
The SID of the Account that created the Task Channel resource. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
friendly_name
|
The string that you assigned to describe the resource. |
sid
|
The unique string that we created to identify the Task Channel resource. |
unique_name
|
An application-defined string that uniquely identifies the Task Channel, such as |
workspace_sid
|
The SID of the Workspace that contains the Task Channel. |
channel_optimized_routing
|
Whether the Task Channel will prioritize Workers that have been idle. When |
url
|
The absolute URL of the Task Channel resource. |
links
|
The URLs of related resources. |
Create a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace that the new Task Channel belongs to. |
friendly_name
Required
|
A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. |
unique_name
Required
|
An application-defined string that uniquely identifies the Task Channel, such as |
channel_optimized_routing
Optional
|
Whether the Task Channel should prioritize Workers that have been idle. If |
Example 1
Fetch a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to fetch. |
sid
Path
|
The SID of the Task Channel resource to fetch. |
Example 1
Read multiple TaskChannel resources
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to read. |
Example 1
Update a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to update. |
sid
Path
|
The SID of the Task Channel resource to update. |
friendly_name
Optional
|
A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long. |
channel_optimized_routing
Optional
|
Whether the TaskChannel should prioritize Workers that have been idle. If |
Example 1
Delete a TaskChannel resource
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
Parameters
Parameters in REST API format | |
---|---|
workspace_sid
Path
|
The SID of the Workspace with the Task Channel to delete. |
sid
Path
|
The SID of the Task Channel resource to delete. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.