NAME
Twilio::Rest::Notify::V1::Service - The Service resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
my $service = $client->notify->v1->services->create(\%options);
for my $service ($client->notify->v1->services->read({}, 20)) {
...
}
my $service = $client->notify->v1->services($sid)->fetch;
$client->notify->v1->services($sid)->update(\%options);
$client->notify->v1->services($sid)->delete;
DESCRIPTION
This file holds ServiceList, ServicePage, ServiceContext and ServiceInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
ServiceList
Returned by $client->notify->v1->services. See also Twilio::ListResource.
create
my $service = $client->notify->v1->services->create(\%options);
Returns a ServiceInstance.
The options are:
alexa_skill_id-
Deprecated.
apn_credential_sid-
The SID of the Credential to use for APN Bindings.
default_alexa_notification_protocol_version-
Deprecated.
default_apn_notification_protocol_version-
The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
default_fcm_notification_protocol_version-
The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
default_gcm_notification_protocol_version-
The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
delivery_callback_enabled-
Callback configuration that enables delivery callbacks, default false
delivery_callback_url-
URL to send delivery status callback.
facebook_messenger_page_id-
Deprecated.
fcm_credential_sid-
The SID of the Credential to use for FCM Bindings.
friendly_name-
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
gcm_credential_sid-
The SID of the Credential to use for GCM Bindings.
log_enabled-
Whether to log notifications. Can be:
trueorfalseand the default istrue. messaging_service_sid-
The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
read
my @records = $client->notify->v1->services->read(\%options, $limit, $page_size);
Returns the records as a list, fetching as many pages as it needs.
The options are:
friendly_name-
The string that identifies the Service resources to read.
stream
my $stream = $client->notify->v1->services->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->notify->v1->services->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->notify->v1->services->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->notify->v1->services->get_context($sid);
Returns a ServiceContext, and makes no request.
ServicePage
A Twilio::Page of ServiceInstance objects.
records_key
build_instance
Used by Twilio::Page.
ServiceContext
Returned by $client->notify->v1->services($sid). It makes no request until one of these methods is called.
fetch
my $service = $client->notify->v1->services($sid)->fetch;
Returns a ServiceInstance.
update
my $service = $client->notify->v1->services($sid)->update(\%options);
Returns a ServiceInstance.
The options are:
alexa_skill_id-
Deprecated.
apn_credential_sid-
The SID of the Credential to use for APN Bindings.
default_alexa_notification_protocol_version-
Deprecated.
default_apn_notification_protocol_version-
The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
default_fcm_notification_protocol_version-
The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
default_gcm_notification_protocol_version-
The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
delivery_callback_enabled-
Callback configuration that enables delivery callbacks, default false
delivery_callback_url-
URL to send delivery status callback.
facebook_messenger_page_id-
Deprecated.
fcm_credential_sid-
The SID of the Credential to use for FCM Bindings.
friendly_name-
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
gcm_credential_sid-
The SID of the Credential to use for GCM Bindings.
log_enabled-
Whether to log notifications. Can be:
trueorfalseand the default istrue. messaging_service_sid-
The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
delete
$client->notify->v1->services($sid)->delete;
Returns true.
bindings
my $list = $object->bindings;
my $context = $object->bindings($sid);
See Twilio::Rest::Notify::V1::Service::Binding.
notifications
my $list = $object->notifications;
See Twilio::Rest::Notify::V1::Service::Notification.
ServiceInstance
See also Twilio::InstanceResource.
It has fetch, update, delete, bindings and notifications, which work as they do on the context.
Its fields are:
- account_sid
-
The SID of the Account that created the Service resource.
- alexa_skill_id
-
Deprecated.
- apn_credential_sid
-
The SID of the Credential to use for APN Bindings.
- 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.
- default_alexa_notification_protocol_version
-
Deprecated.
- default_apn_notification_protocol_version
-
The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
- default_fcm_notification_protocol_version
-
The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
- default_gcm_notification_protocol_version
-
The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource.
- delivery_callback_enabled
-
Callback configuration that enables delivery callbacks, default false
- delivery_callback_url
-
URL to send delivery status callback.
- facebook_messenger_page_id
-
Deprecated.
- fcm_credential_sid
-
The SID of the Credential to use for FCM Bindings.
- friendly_name
-
The string that you assigned to describe the resource.
- gcm_credential_sid
-
The SID of the Credential to use for GCM Bindings.
- links
-
The URLs of the Binding, Notification, Segment, and User resources related to the service.
- log_enabled
-
Whether to log notifications. Can be:
trueorfalseand the default istrue. - messaging_service_sid
-
The SID of the Messaging Service to use for SMS Bindings. In order to send SMS notifications this parameter has to be set.
- sid
-
The unique string that we created to identify the Service resource.
- url
-
The absolute URL of the Service resource.
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.