NAME

Twilio::Rest::Conversations::V1::Service::Binding - The Binding resource

SYNOPSIS

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

for my $binding ($client->conversations->v1->services($chat_service_sid)->bindings->read({}, 20)) {
  ...
}
my $binding = $client->conversations->v1->services($chat_service_sid)->bindings($sid)->fetch;
$client->conversations->v1->services($chat_service_sid)->bindings($sid)->delete;

DESCRIPTION

A Binding resource represents a push notification binding and its configuration, for delivering conversation events to mobile or web endpoints.

This file holds BindingList, BindingPage, BindingContext and BindingInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

BindingList

Returned by $client->conversations->v1->services($chat_service_sid)->bindings. See also Twilio::ListResource.

read

my @records = $client->conversations->v1->services($chat_service_sid)->bindings->read(\%options, $limit, $page_size);

Retrieve a list of all push notification bindings in the conversation service. Returns the records as a list, fetching as many pages as it needs.

The options are:

binding_type

The push technology used by the Binding resources to read. Can be: apn, gcm, fcm, or twilsock. See push notification configuration for more info. One of apn, gcm, fcm or twilsock. An array reference.

identity

The identity of a Conversation User this binding belongs to. See access tokens for more details. An array reference.

stream

my $stream = $client->conversations->v1->services($chat_service_sid)->bindings->stream(\%options, $limit, $page_size);

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

page

my $page = $client->conversations->v1->services($chat_service_sid)->bindings->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->conversations->v1->services($chat_service_sid)->bindings->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->conversations->v1->services($chat_service_sid)->bindings->get_context($sid);

Returns a BindingContext, and makes no request.

BindingPage

A Twilio::Page of BindingInstance objects.

records_key

build_instance

Used by Twilio::Page.

BindingContext

Returned by $client->conversations->v1->services($chat_service_sid)->bindings($sid). It makes no request until one of these methods is called.

fetch

my $binding = $client->conversations->v1->services($chat_service_sid)->bindings($sid)->fetch;

Fetch a push notification binding from the conversation service. Returns a BindingInstance.

delete

$client->conversations->v1->services($chat_service_sid)->bindings($sid)->delete;

Remove a push notification binding from the conversation service. Returns true.

BindingInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The unique ID of the Account responsible for this binding.

binding_type

One of apn, gcm, fcm or twilsock.

chat_service_sid

The SID of the Conversation Service the Binding resource is associated with.

credential_sid

The SID of the Credential for the binding. See push notification configuration for more info.

date_created

The date that this resource was created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

date_updated

The date that this resource was last updated. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

endpoint

The unique endpoint identifier for the Binding. The format of this value depends on the binding_type.

identity

The application-defined string that uniquely identifies the Conversation User within the Conversation Service. See access tokens for more info.

message_types

The Conversation message types the binding is subscribed to.

sid

A 34 character string that uniquely identifies this resource.

url

An absolute API resource URL for this binding.

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.