NAME

Twilio::Rest::Taskrouter::V1::Workspace::Worker::WorkerChannel - The WorkerChannel resource

SYNOPSIS

my $client = Twilio::Rest::Client->new($account_sid, $auth_token);

for my $worker_channel ($client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels->read({}, 20)) {
  ...
}
my $worker_channel = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels($sid)->fetch;
$client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels($sid)->update(\%options);

DESCRIPTION

This file holds WorkerChannelList, WorkerChannelPage, WorkerChannelContext and WorkerChannelInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

WorkerChannelList

Returned by $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels. See also Twilio::ListResource.

read

my @records = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels->read(\%options, $limit, $page_size);

Returns the records as a list, fetching as many pages as it needs.

stream

my $stream = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels->stream(\%options, $limit, $page_size);

Takes the same arguments as "read", and returns a Twilio::Stream.

page

my $page = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels->page(\%options, $page_size, $page_token, $page_number);

Fetches one page, and returns a Twilio::Page.

get_page

my $page = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels->get_context($sid);

Returns a WorkerChannelContext, and makes no request.

WorkerChannelPage

A Twilio::Page of WorkerChannelInstance objects.

records_key

build_instance

Used by Twilio::Page.

WorkerChannelContext

Returned by $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels($sid). It makes no request until one of these methods is called.

fetch

my $worker_channel = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels($sid)->fetch;

Returns a WorkerChannelInstance.

update

my $worker_channel = $client->taskrouter->v1->workspaces($workspace_sid)->workers($worker_sid)->worker_channels($sid)->update(\%options);

Returns a WorkerChannelInstance.

The options are:

available

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

capacity

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.

WorkerChannelInstance

See also Twilio::InstanceResource.

It has fetch and update, which work as they do on the context.

Its fields are:

account_sid

The SID of the Account that created the Worker resource.

assigned_tasks

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

available

Whether the Worker should receive Tasks of the TaskChannel type.

available_capacity_percentage

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

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

The date and time in GMT when the resource was created specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date and time in GMT when the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

sid

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

task_channel_sid

The SID of the TaskChannel.

task_channel_unique_name

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

url

The absolute URL of the WorkerChannel resource.

worker_sid

The SID of the Worker that contains the WorkerChannel.

workspace_sid

The SID of the Workspace that contains the WorkerChannel.

CONSTRUCTORS

new

Objects here come from the methods above, so there is no need to call new directly.

LICENSE

Copyright (c) 2026 Francisco Zarabozo. Released under the MIT License.