NAME
Twilio::Rest::Monitor::V1::Event - The Event resource
SYNOPSIS
my $client = Twilio::Rest::Client->new($account_sid, $auth_token);
for my $event ($client->monitor->v1->events->read({}, 20)) {
...
}
my $event = $client->monitor->v1->events($sid)->fetch;
DESCRIPTION
Debugger events
This file holds EventList, EventPage, EventContext and EventInstance. Methods that make a request throw Twilio::Exceptions::RestException on an error response.
EventList
Returned by $client->monitor->v1->events. See also Twilio::ListResource.
read
my @records = $client->monitor->v1->events->read(\%options, $limit, $page_size);
Returns a list of events in the account, sorted by event-date. Returns the records as a list, fetching as many pages as it needs.
The options are:
actor_sid-
Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials.
end_date-
Only include events that occurred on or before this date. Specify the date in GMT and ISO 8601 format. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize. event_type-
Only include events of this Event Type.
resource_sid-
Only include events that refer to this resource. Useful for discovering the history of a specific resource.
source_ip_address-
Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console.
start_date-
Only include events that occurred on or after this date. Specify the date in GMT and ISO 8601 format. A string, or an object with an
epochmethod. See "iso8601_date_time" in Twilio::Serialize.
stream
my $stream = $client->monitor->v1->events->stream(\%options, $limit, $page_size);
Takes the same arguments as "read", and returns a Twilio::Stream.
page
my $page = $client->monitor->v1->events->page(\%options, $page_size, $page_token, $page_number);
Fetches one page, and returns a Twilio::Page.
get_page
my $page = $client->monitor->v1->events->get_page($url);
Fetches the page at a URL given by Twilio.
get_context
my $context = $client->monitor->v1->events->get_context($sid);
Returns a EventContext, and makes no request.
EventPage
A Twilio::Page of EventInstance objects.
records_key
build_instance
Used by Twilio::Page.
EventContext
Returned by $client->monitor->v1->events($sid). It makes no request until one of these methods is called.
fetch
my $event = $client->monitor->v1->events($sid)->fetch;
Returns a EventInstance.
EventInstance
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 Event resource.
- actor_sid
-
The SID of the actor that caused the event, if available. This can be either a User ID (matching the pattern
^US[0-9a-fA-F]{32}$) or an Account SID (matching the pattern^AC[0-9a-fA-F]{32}$). If the actor's SID isn't available, this field will benull. - actor_type
-
The type of actor that caused the event. Can be:
userfor a change made by a logged-in user in the Twilio Console,accountfor an event caused by an API request by an authenticating Account,twilio-adminfor an event caused by a Twilio employee, and so on. - description
-
A description of the event. Can be
null. - event_data
-
An object with additional data about the event. The contents depend on
event_type. For example, event-types of the formRESOURCE.updated, this value contains aresource_propertiesdictionary that describes the previous and updated properties of the resource. - event_date
-
The date and time in GMT when the event was recorded specified in ISO 8601 format. A Time::Piece object in UTC. See "date_time" in Twilio::Deserialize.
- event_type
-
The event's type. Event-types are typically in the form:
RESOURCE_TYPE.ACTION, whereRESOURCE_TYPEis the type of resource that was affected andACTIONis what happened to it. For example,phone-number.created. For a full list of all event-types, see the Monitor Event Types. - links
-
The absolute URLs of related resources.
- resource_sid
-
The SID of the resource that was affected.
- resource_type
-
The type of resource that was affected. For a full list of all resource-types, see the Monitor Event Types.
- sid
-
The unique string that we created to identify the Event resource.
- source
-
The originating system or interface that caused the event. Can be:
webfor events caused by user action in the Twilio Console,apifor events caused by a request to our API, ortwiliofor events caused by an automated or internal Twilio system. - source_ip_address
-
The IP address of the source, if the source is outside the Twilio cloud. This value is
nullfor events withsourceoftwilio - url
-
The absolute URL of the resource that was affected. Can be
null.
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.