Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

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?

Worker Channel Resource

Workers Channels shows 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

Names in PHP format
accountSid
sid<AC> Not PII

The SID of the Account that created the Worker resource.

assignedTasks
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.

availableCapacityPercentage
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.

configuredCapacity
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.

dateCreated
date_time<iso8601> Not PII

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

dateUpdated
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.

taskChannelSid
sid<TC> Not PII

The SID of the TaskChannel.

taskChannelUniqueName
string Not PII

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

workerSid
sid<WK> Not PII

The SID of the Worker that contains the WorkerChannel.

workspaceSid
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
Names in None format
workspace_sid
Required
get sid<WS> Not PII

The SID of the Workspace with the WorkerChannel to fetch.

worker_sid
Required
get sid<WK> Not PII

The SID of the Worker with the WorkerChannel to fetch.

sid
Required
get sid_like<WC> Not PII

The SID of the WorkerChannel to fetch.

Example
        
        
        
        

        Read multiple WorkerChannel resources

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

        The SID of the Workspace with the WorkerChannels to read.

        worker_sid
        Required
        get sid<WK> Not PII

        The SID of the Worker with the WorkerChannels to read.

        Example
              
              
              
              

              Update a WorkerChannel resource

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

              The SID of the Workspace with the WorkerChannel to update.

              worker_sid
              Required
              post sid<WK> Not PII

              The SID of the Worker with the WorkerChannel to update.

              sid
              Required
              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
                    
                    
                    
                    
                    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.