Menu

Expand
Rate this page:

Worker Channel Resource

Worker Channels show the Worker’s capacity for handling multiple concurrent Tasks. Workers receive Task reservation requests in parallel for each task type until the configured Task Channel capacity is reached. In addition, Worker Channels can also be marked as unavailable, which is useful for temporarily removing the capacity for a given Worker Channel and then restoring to the previous capacity when marking available again.

WorkerChannel properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the Worker resource.

assigned_tasks
integer Not PII

The total number of Tasks assigned to Worker for the TaskChannel type.

available
boolean Not PII

Whether the Worker should receive Tasks of the TaskChannel type.

available_capacity_percentage
integer Not PII

The current percentage of capacity the TaskChannel has available. Can be a number between 0 and 100. A value of 0 indicates that TaskChannel has no capacity available and a value of 100 means the Worker is available to receive any Tasks of this TaskChannel type.

configured_capacity
integer Not PII

The current configured capacity for the WorkerChannel. TaskRouter will not create any reservations after the assigned Tasks for the Worker reaches the value.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

sid
sid<WC> Not PII

The unique string that we created to identify the WorkerChannel resource.

task_channel_sid
sid<TC> Not PII

The SID of the TaskChannel.

task_channel_unique_name
string Not PII

The unique name of the TaskChannel, such as voice or sms.

worker_sid
sid<WK> Not PII

The SID of the Worker that contains the WorkerChannel.

workspace_sid
sid<WS> Not PII

The SID of the Workspace that contains the WorkerChannel.

url
url Not PII

The absolute URL of the WorkerChannel resource.

Fetch a WorkerChannel resource

get
https://taskrouter.twilio.com/v1/Workspaces/{WorkspaceSid}/Workers/{WorkerSid}/Channels/{Sid}

Returns a single Worker Channel resource identified by either WorkerChannelUniqueName or WorkerChannelSid

Parameters
Parameters in REST API format
workspace_sid
Path
get sid<WS> Not PII

The SID of the Workspace with the WorkerChannel to fetch.

worker_sid
Path
get sid<WK> Not PII

The SID of the Worker with the WorkerChannel to fetch.

sid
Path
get sid_like<WC> Not PII

The SID of the WorkerChannel to fetch.

Example 1
Loading Code Sample...
        
        

        Fetch Worker Channel

        Read multiple WorkerChannel resources

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

        The SID of the Workspace with the WorkerChannels to read.

        worker_sid
        Path
        get sid<WK> Not PII

        The SID of the Worker with the WorkerChannels to read.

        Example 1
        Loading Code Sample...
              
              

              Read Worker Channel

              Update a WorkerChannel resource

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

              The SID of the Workspace with the WorkerChannel to update.

              worker_sid
              Path
              post sid<WK> Not PII

              The SID of the Worker with the WorkerChannel to update.

              sid
              Path
              post sid_like<WC> Not PII

              The SID of the WorkerChannel to update.

              capacity
              Optional
              post integer Not PII

              The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created.

              available
              Optional
              post boolean Not PII

              Whether the WorkerChannel is available. Set to false to prevent the Worker from receiving any new Tasks of this TaskChannel type.

              Example 1
              Loading Code Sample...
                    
                    

                    Update Worker 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