NAME

Twilio::Rest::Api::V2010::Account::Notification - The Notification resource

SYNOPSIS

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

for my $notification ($client->notifications->read({}, 20)) {
  ...
}
my $notification = $client->notifications($sid)->fetch;

DESCRIPTION

[DEPRECATED] Log entries

This file holds NotificationList, NotificationPage, NotificationContext and NotificationInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.

NotificationList

Returned by $client->notifications. See also Twilio::ListResource.

read

my @records = $client->notifications->read(\%options, $limit, $page_size);

Retrieve a list of notifications belonging to the account used to make the request. Returns the records as a list, fetching as many pages as it needs.

The options are:

log

Only read notifications of the specified log level. Can be: 0 to read only ERROR notifications or 1 to read only WARNING notifications. By default, all notifications are read.

message_date

Only show notifications for the specified date, formatted as YYYY-MM-DD. You can also specify an inequality, such as <=YYYY-MM-DD for messages logged at or before midnight on a date, or >=YYYY-MM-DD for messages logged at or after midnight on a date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

message_date_before

Only show notifications for the specified date, formatted as YYYY-MM-DD. You can also specify an inequality, such as <=YYYY-MM-DD for messages logged at or before midnight on a date, or >=YYYY-MM-DD for messages logged at or after midnight on a date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

message_date_after

Only show notifications for the specified date, formatted as YYYY-MM-DD. You can also specify an inequality, such as <=YYYY-MM-DD for messages logged at or before midnight on a date, or >=YYYY-MM-DD for messages logged at or after midnight on a date. A string, or an object with an epoch method. See "iso8601_date_time" in Twilio::Serialize.

stream

my $stream = $client->notifications->stream(\%options, $limit, $page_size);

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

page

my $page = $client->notifications->page(\%options, $page_size, $page_token, $page_number);

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

get_page

my $page = $client->notifications->get_page($url);

Fetches the page at a URL given by Twilio.

get_context

my $context = $client->notifications->get_context($sid);

Returns a NotificationContext, and makes no request.

NotificationPage

A Twilio::Page of NotificationInstance objects.

records_key

build_instance

Used by Twilio::Page.

NotificationContext

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

fetch

my $notification = $client->notifications($sid)->fetch;

Fetch a notification belonging to the account used to make the request. Returns a NotificationInstance.

NotificationInstance

See also Twilio::InstanceResource.

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

Its fields are:

account_sid

The SID of the Account that created the Notification resource.

api_version

The API version used to generate the notification. Can be empty for events that don't have a specific API version, such as incoming phone calls.

call_sid

The SID of the Call the Notification resource is associated with.

date_created

The date and time in GMT that 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 that the resource was last updated specified in RFC 2822 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

error_code

A unique error code for the error condition that is described in our Error Dictionary.

log

An integer log level that corresponds to the type of notification: 0 is ERROR, 1 is WARNING.

message_date

The date the notification was actually generated in RFC 2822 format. Message buffering can cause this value to differ from date_created. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.

message_text

The text of the notification.

more_info

The URL for more information about the error condition. This value is a page in our Error Dictionary.

request_method

The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers. One of GET or POST.

request_url

The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called.

request_variables

The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API.

response_body

The HTTP body returned by your server.

response_headers

The HTTP headers returned by your server.

sid

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

uri

The URI of the 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.