NAME

Twilio::Rest::Taskrouter::V1::Workspace::TaskChannel - The TaskChannel resource

SYNOPSIS

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

my $task_channel = $client->taskrouter->v1->workspaces($workspace_sid)->task_channels->create($friendly_name, $unique_name, \%options);
for my $task_channel ($client->taskrouter->v1->workspaces($workspace_sid)->task_channels->read({}, 20)) {
  ...
}
my $task_channel = $client->taskrouter->v1->workspaces($workspace_sid)->task_channels($sid)->fetch;
$client->taskrouter->v1->workspaces($workspace_sid)->task_channels($sid)->update(\%options);
$client->taskrouter->v1->workspaces($workspace_sid)->task_channels($sid)->delete;

DESCRIPTION

Types of tasks

This file holds TaskChannelList, TaskChannelPage, TaskChannelContext and TaskChannelInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

TaskChannelList

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

create

my $task_channel = $client->taskrouter->v1->workspaces($workspace_sid)->task_channels->create($friendly_name, $unique_name, \%options);

Returns a TaskChannelInstance.

The required values are:

$friendly_name

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

$unique_name

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

The options are:

channel_optimized_routing

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

read

my @records = $client->taskrouter->v1->workspaces($workspace_sid)->task_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)->task_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)->task_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)->task_channels->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

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

Returns a TaskChannelContext, and makes no request.

TaskChannelPage

A Twilio::Page of TaskChannelInstance objects.

records_key

build_instance

Used by Twilio::Page.

TaskChannelContext

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

fetch

my $task_channel = $client->taskrouter->v1->workspaces($workspace_sid)->task_channels($sid)->fetch;

Returns a TaskChannelInstance.

update

my $task_channel = $client->taskrouter->v1->workspaces($workspace_sid)->task_channels($sid)->update(\%options);

Returns a TaskChannelInstance.

The options are:

channel_optimized_routing

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

friendly_name

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

delete

$client->taskrouter->v1->workspaces($workspace_sid)->task_channels($sid)->delete;

Returns true.

TaskChannelInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

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

channel_optimized_routing

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

date_created

The date and time in GMT when the resource was created specified in ISO 8601 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 ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

friendly_name

The string that you assigned to describe the resource.

The URLs of related resources.

sid

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

unique_name

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

url

The absolute URL of the Task Channel resource.

workspace_sid

The SID of the Workspace that contains the Task Channel.

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.