Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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.

TaskChannel properties

Names in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the TaskChannel 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 TaskChannel resource.

unique_name
string Not PII

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

workspace_sid
sid<WS> Not PII

The SID of the Workspace that contains the TaskChannel.

channel_optimized_routing
boolean Not PII

Whether the TaskChannel 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 TaskChannel 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
Names in REST API format
workspace_sid
Path
post sid<WS> Not PII

The SID of the Workspace that the new TaskChannel belongs to.

friendly_name
Required
post string Not PII

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

unique_name
Required
post string Not PII

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

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
        
        
        
        

        Fetch a TaskChannel resource

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

        The SID of the Workspace with the TaskChannel to fetch.

        sid
        Path
        get sid_like<TC> Not PII

        The SID of the TaskChannel resource to fetch.

        Example
              
              
              
              

              Read multiple TaskChannel resources

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

              The SID of the Workspace with the TaskChannel to read.

              Example
                    
                    
                    
                    

                    Update a TaskChannel resource

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

                    The SID of the Workspace with the TaskChannel to update.

                    sid
                    Path
                    post sid_like<TC> Not PII

                    The SID of the TaskChannel resource to update.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you create to describe the TaskChannel. 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
                          
                          
                          
                          

                          Delete a TaskChannel resource

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

                          The SID of the Workspace with the TaskChannel to delete.

                          sid
                          Path
                          delete sid_like<TC> Not PII

                          The SID of the TaskChannel resource to delete.

                          Example
                                
                                
                                
                                
                                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 browsing the Twilio tag on Stack Overflow.