NAME

Twilio::Rest::Api::V2010::Account::Call::UserDefinedMessageSubscription - The UserDefinedMessageSubscription resource

SYNOPSIS

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

my $user_defined_message_subscription = $client->calls($call_sid)->user_defined_message_subscriptions->create($callback, \%options);
$client->calls($call_sid)->user_defined_message_subscriptions($sid)->delete;

DESCRIPTION

Subscription for server-side application access to messages sent from the Voice SDK for an active Call.

This file holds UserDefinedMessageSubscriptionList, UserDefinedMessageSubscriptionContext and UserDefinedMessageSubscriptionInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

UserDefinedMessageSubscriptionList

Returned by $client->calls($call_sid)->user_defined_message_subscriptions. See also Twilio::ListResource.

create

my $user_defined_message_subscription = $client->calls($call_sid)->user_defined_message_subscriptions->create($callback, \%options);

Subscribe to User Defined Messages for a given Call SID. Returns a UserDefinedMessageSubscriptionInstance.

The required values are:

$callback

The URL we should call using the method to send user defined events to your application. URLs must contain a valid hostname (underscores are not permitted).

The options are:

idempotency_key

A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.

method

The HTTP method Twilio will use when requesting the above Url. Either GET or POST. Default is POST. One of GET or POST.

get_context

my $context = $client->calls($call_sid)->user_defined_message_subscriptions->get_context($sid);

Returns a UserDefinedMessageSubscriptionContext, and makes no request.

UserDefinedMessageSubscriptionContext

Returned by $client->calls($call_sid)->user_defined_message_subscriptions($sid). It makes no request until one of these methods is called.

delete

$client->calls($call_sid)->user_defined_message_subscriptions($sid)->delete;

Delete a specific User Defined Message Subscription. Returns true.

UserDefinedMessageSubscriptionInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The SID of the Account that subscribed to the User Defined Messages.

call_sid

The SID of the Call the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages.

date_created

The date that this User Defined Message Subscription was created, given in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

sid

The SID that uniquely identifies this User Defined Message Subscription.

uri

The URI of the User Defined Message Subscription Resource, relative to https://api.twilio.com.

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.