NAME
Twilio::Rest::Api::V2010::Account::Call::Notification - The Notification resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $notification ($client->calls($call_sid)->notifications->read({}, 20)) {
...
}
my $notification = $client->calls($call_sid)->notifications($sid)->fetch;
DESCRIPTION
Error notifications for calls
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->calls($call_sid)->notifications. See also Twilio::ListResource.
read
my @records = $client->calls($call_sid)->notifications->read(\%options, $limit, $page_size);
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:
0to read only ERROR notifications or1to 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-DDfor messages logged at or before midnight on a date, or>=YYYY-MM-DDfor messages logged at or after midnight on a date. A string, or an object with anepochmethod. 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-DDfor messages logged at or before midnight on a date, or>=YYYY-MM-DDfor messages logged at or after midnight on a date. A string, or an object with anepochmethod. 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-DDfor messages logged at or before midnight on a date, or>=YYYY-MM-DDfor messages logged at or after midnight on a date. A string, or an object with anepochmethod. See "iso8601_date_time" in Twilio::Serialize.
stream
my $stream = $client->calls($call_sid)->notifications->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->calls($call_sid)->notifications->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->calls($call_sid)->notifications->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->calls($call_sid)->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->calls($call_sid)->notifications($sid). It makes no request until one of these methods is called.
fetch
my $notification = $client->calls($call_sid)->notifications($sid)->fetch;
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 Call Notification resource.
- api_version
-
The API version used to create the Call Notification resource.
- call_sid
-
The SID of the Call the Call 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:
0is ERROR,1is 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
GETorPOST. - 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 Call 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.