Menu

Expand
Rate this page:

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
sid<AC> Not PII

The SID of the Account that created the Task Channel resource.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

friendly_name
string Not PII

The string that you assigned to describe the resource.

sid
sid<TC> Not PII

The unique string that we created to identify the Task Channel resource.

unique_name
string Not PII

An application-defined string that uniquely identifies the Task Channel, such as voice or sms.

workspace_sid
sid<WS> Not PII

The SID of the Workspace that contains the Task Channel.

channel_optimized_routing
boolean Not PII

Whether the Task Channel will prioritize Workers that have been idle. When true, Workers that have been idle the longest are prioritized.

url
url Not PII

The absolute URL of the Task Channel resource.

links
uri_map Not PII

The URLs of related resources.

Create a TaskChannel resource

post
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels
Parameters
Parameters in REST API format
workspace_sid
Path
post sid<WS> Not PII

The SID of the Workspace that the new Task Channel belongs to.

friendly_name
Required
post string Not PII

A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.

unique_name
Required
post string Not PII

An application-defined string that uniquely identifies the Task Channel, such as voice or sms.

channel_optimized_routing
Optional
post boolean Not PII

Whether the Task Channel should prioritize Workers that have been idle. If true, Workers that have been idle the longest are prioritized.

Example 1
Loading Code Sample...
        
        

        Create Task Channel

        Fetch a TaskChannel resource

        get
        https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
        Parameters
        Parameters in REST API format
        workspace_sid
        Path
        get sid<WS> Not PII

        The SID of the Workspace with the Task Channel to fetch.

        sid
        Path
        get sid_like<TC> Not PII

        The SID of the Task Channel resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch Task Channel

              Read multiple TaskChannel resources

              get
              https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels
              Parameters
              Parameters in REST API format
              workspace_sid
              Path
              get sid<WS> Not PII

              The SID of the Workspace with the Task Channel to read.

              Example 1
              Loading Code Sample...
                    
                    

                    Read Task Channel

                    Update a TaskChannel resource

                    post
                    https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
                    Parameters
                    Parameters in REST API format
                    workspace_sid
                    Path
                    post sid<WS> Not PII

                    The SID of the Workspace with the Task Channel to update.

                    sid
                    Path
                    post sid_like<TC> Not PII

                    The SID of the Task Channel resource to update.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.

                    channel_optimized_routing
                    Optional
                    post boolean Not PII

                    Whether the TaskChannel should prioritize Workers that have been idle. If true, Workers that have been idle the longest are prioritized.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Update Task Channel

                          Delete a TaskChannel resource

                          delete
                          https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/TaskChannels/{Sid}
                          Parameters
                          Parameters in REST API format
                          workspace_sid
                          Path
                          delete sid<WS> Not PII

                          The SID of the Workspace with the Task Channel to delete.

                          sid
                          Path
                          delete sid_like<TC> Not PII

                          The SID of the Task Channel resource to delete.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete Task Channel

                                Rate this page:

                                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.

                                Loading Code Sample...
                                      
                                      
                                      

                                      Thank you for your feedback!

                                      Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      thanks-feedback-gif