Monitor REST API: Events

Events are a platform feature that provides comprehensive event-logging and change-tracking for Twilio resources.

For example, Events log when you provision a phone number, change your account's security settings, delete a recording, and so on. Events log virtually every action taken within Twilio, regardless of whether that action was taken through the API, by a user in the Twilio Console, or even by a Twilio employee.

The Events REST resource provides an API to retrieve this event-log. Each Event is like a log entry that captures:

  • the type of event;
  • the resource that the event relates to;
  • the actor that caused the event to happen;
  • the originating source for the event, including its IP address; and
  • any related event data (like what properties were changed).

Events work at any scale and across all Twilio products. They can be an instrumental tool in giving you full visibility into your Twilio applications. And the API can be used to retrieve your event log and push it into the log-aggregation or SIEM solution of your choice.

Event Instance Resource

Resource URI

Events are under the subdomain monitor.twilio.com, and are referenced by their Sid.

https://monitor.twilio.com/v1/Events/{EventSid}

Resource Properties

An Event is represented by the following properties:

Property Description
sid A 34 character string that uniquely identifies this event.
event_type The event's type, as a string. Event-types are typically of the form RESOURCE_TYPE.ACTION, where RESOURCE_TYPE is the type of resource that was affected and ACTION is what happened to it. For example, phone-number.created. For a full list of all event-types, look here.
account_sid A 34 character string identifying the Account for which this Event was recorded.
event_date The date-time the event was recorded, given as a UTC ISO 8601 Timestamp.
description A human-readable description of the event. May be null.
resource_type The type of resource that was affected. For a full list of all resource-types, look here.
resource_sid A 34 character string identifying the resource that was affected.
resource_url If available, the URL in the REST API of the resource that was affected. May be null.
actor_type The type of actor that caused this event. For instance, user for a change made by a logged-in user in the Twilio Console, account for an event caused by an API request by an authenticating Account, twilio-admin for an event caused by a Twilio employee, and so on.
actor_sid If available, a 34 character string identifying the actor that caused this event. May be null.
actor_url If availabile, the URL in the REST API of the actor that caused this event. May be null.
source The originating system or interface that caused the event. web for events caused by user action in the Twilio Console. api for events caused through a request to the REST API. twilio for 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. For instance, the ip address of an originating API request. Null for events with {"source": "twilio"}.
event_data A freeform json object encoding additional data about the event. The exact contents will vary based on event_type. For instance, for event-types of the form RESOURCE.updated, event_data will contain a resource_properties dictionary encoding the previous and updated properties of the resource.

These fields make it easy to build Event notifications or list pages. For example, you can display human-readable strings like "On {event_date}, a {event_type} event was generated for resource {resource_type} via {source} by {actor_type} {actor_sid} from {source_ip_address}".

Sources, Actor-Types, and Actor-Sids

Sources, actor-types, and actor-sids are closely interrelated. They all help to indicate who or what caused the event, and from where. Here's a table describing the most common combinations you're likely to see:

source actor_type actor_sid description
api account AC123 The Account AC123 authenticated against the API and caused the event.
web user US456 The User whose sid is US456 was logged in the Twilio Console and caused the event. The User’s Sid can be seen in the Manager Users page of the Twilio Console.
twilio twilio-admin null A Twilio Administrator made the change through Twilio’s administration interface.

HTTP GET

Returns a repesentation of the Event, including the properties above.

Example

An Event that records the modification of a phone number's VoiceUrl from the Twilio Console:

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

client.events('AE21f24380625e4aa4abec76e39b14458d').get(function(error, event) {
    process.stdout.write(event.eventType);
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1
  .events('AE21f24380625e4aa4abec76e39b14458d')
  .fetch()
  .then((data) => console.log(event.description));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var e = monitor.GetEvent("AE21f24380625e4aa4abec76e39b14458d");
    Console.WriteLine(e.Description);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$event = $client->events->get("AE21f24380625e4aa4abec76e39b14458d");
echo $event->description;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

event = @client.events.get('AE21f24380625e4aa4abec76e39b14458d')

puts event.description
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string eventSid = "AE21f24380625e4aa4abec76e39b14458d";

        TwilioClient.Init(accountSid, authToken);

        var e = EventResource.Fetch(eventSid);

        Console.WriteLine(e.Description);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$event = $client->monitor
    ->events("AE21f24380625e4aa4abec76e39b14458d")
    ->fetch();

echo $event->description;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

event = client.events.get("AE21f24380625e4aa4abec76e39b14458d")
print(event.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@event = @client.monitor.v1.events('AE21f24380625e4aa4abec76e39b14458d').fetch

puts @event.description
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Event e = client.getEvent("AE21f24380625e4aa4abec76e39b14458d");

    System.out.println(e.getDescription());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

event = client.monitor.events("AE21f24380625e4aa4abec76e39b14458d").fetch()
print(event.description)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    Event event = Event.fetcher("AE21f24380625e4aa4abec76e39b14458d").fetch();

    System.out.println(event.getDescription());
  }
}
$ curl -XGET https://monitor.twilio.com/v1/Events/AE21f24380625e4aa4abec76e39b14458d \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "links": {
    "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN4aa51b930717ea83c91971b86d99018f",
    "actor": null
  },
  "event_data": {
    "resource_properties": {
      "voice_fallback_url": {
        "previous": null,
        "updated": ""
      },
      "voice_url": {
        "previous": "http://www.example.com",
        "updated": "http://www.example.com/hello-jenny"
      }
    }
  },
  "source_ip_address": "73.189.144.70",
  "source": "web",
  "url": "https://monitor.twilio.com/v1/Events/AE21f24380625e4aa4abec76e39b14458d",
  "sid": "AE21f24380625e4aa4abec76e39b14458d",
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "actor_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
  "actor_type": "user",
  "description": null,
  "event_date": "2015-04-29T02:55:15Z",
  "event_type": "phone-number.updated",
  "resource_sid": "PN4aa51b930717ea83c91971b86d99018f",
  "resource_type": "phone-number"
}
Record VoiceUrl modification

HTTP POST

Not supported.

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

Events List Resource

Resource URI

The list resource for all Events is under the sub-domain monitor.twilio.com:

https://monitor.twilio.com/v1/Events

HTTP GET

Returns a list of Events in this account, sorted by event-date. This list includes paging information.

List Filters

By default, all Events are included. You can always filter your Events by event-date using the StartDate and EndDate parameters.

Query Parameter Description
StartDate Only show events on or after this date. Useful in combination with EndDate to define a date-range of events. Input is a UTC ISO 8601 Timestamp.
EndDate Only show events on or before this date. Useful in combination with StartDate to define a date-range of events. Input is a UTC ISO 8601 Timestamp.

In addition, you may filter by any one of the following fields. Filtering on more than one field in the same request is not supported and will result in a 400 Bad Request error.

Query Parameter Description
EventType Only include Events of this EventType.
ResourceSid Only include Events referring to this resource. Useful for discovering the history of a specific resource.
SourceIpAddress Only include Events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console.
ActorSid Only include Events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials.
Examples

An example that filters for all events in March, 2015:

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const MonitorClient = require('twilio').MonitorClient;
const client = new MonitorClient(accountSid, authToken);

const params = {
  startDate: '2015-03-01T00:00:00Z',
  endDate: '2015-04-01T00:00:00Z',
};
client.events.list(params, (error, events) => {
  for (const e in events) {
    process.stdout.write(e);
  }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events
  .list({
    startDate: '2015-03-01T00:00:00Z',
    endDate: '2015-04-01T00:00:00Z',
  })
  .then(response => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.StartDate = new DateTime(2015, 3, 1);
    options.EndDate = new DateTime(2015, 4, 1);
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'StartDate' => '2015-03-01T00:00:00Z',
    'EndDate' => '2015-04-01T00:00:00Z'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  start_date: "2015-03-01T00:00:00Z",
  end_date: "2015-04-01T00:00:00Z"
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(
            startDate: new DateTime(2015, 3, 1),
            endDate: new DateTime(2015, 4, 1));

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array(
        'startDate' => '2015-03-01T00:00:00Z',
        'endDate' => '2015-04-01T00:00:00Z'
    )
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(
    start_date=datetime(2015, 3, 1, tzinfo=pytz.UTC).isoformat(),
    end_date=datetime(2015, 4, 1, tzinfo=pytz.UTC).isoformat(),
)

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  start_date: Time.new('2015-03-01T00:00:00Z'),
  end_date: Time.new('2015-04-01T00:00:00Z')
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("StartDate", "2015-03-01T00:00:00Z");
    params.put("EndDate", "2015-04-01T00:00:00Z");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    start_date=datetime(2015, 3, 1, tzinfo=pytz.UTC),
    end_date=datetime(2015, 4, 1, tzinfo=pytz.UTC),
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setStartDate(LocalDate.parse("2015-03-01"))
        .setEndDate(LocalDate.parse("2015-04-01"))
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
curl -XGET "https://monitor.twilio.com/v1/Events?StartDate=2015-03-01T00:00:00Z&EndDate=2015-04-01T00:00:00Z" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "events": [
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "falkland_islands": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AEc997b108285f476abdfe93aff97e0175",
      "sid": "AEc997b108285f476abdfe93aff97e0175",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-13T22:17:27Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AE824a2c66ff5940398d561b2c875cec80",
      "sid": "AE824a2c66ff5940398d561b2c875cec80",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T23:42:46Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AEea2520d7439e4ed9aa2b3ddd532e04d3",
      "sid": "AEea2520d7439e4ed9aa2b3ddd532e04d3",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T22:41:34Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AEaf5242e4f10242a299649cc1c1df1849",
      "sid": "AEaf5242e4f10242a299649cc1c1df1849",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T21:25:15Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AE661752392a6e4bd5b8980471ab0b12aa",
      "sid": "AE661752392a6e4bd5b8980471ab0b12aa",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T20:38:20Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    }
  ],
  "meta": {
    "key": "events",
    "next_page_url": null,
    "url": "https://monitor.twilio.com/v1/Events?StartDate=2015-03-01T00%3A00%3A00Z&EndDate=2015-04-01T00%3A00%3A00Z&PageSize=50&Page=0",
    "previous_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Events?StartDate=2015-03-01T00%3A00%3A00Z&EndDate=2015-04-01T00%3A00%3A00Z&PageSize=50&Page=0",
    "page_size": 50,
    "page": 0
  }
}
Filter by date

Using the Events list resource and the ResourceSid filter to find out everything that happened a a specific phone-number:

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

var params = {
    resourceSid: 'PN4aa51b930717ea83c91971b86d99018f'
};
client.events.list(params, function(error, events) {
    for (var e in events) {
        process.stdout.write(e);
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events
  .list({
    resourceSid: 'PN4aa51b930717ea83c91971b86d99018f'
  })
  .then((response) => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.ResourceSid = "PN4aa51b930717ea83c91971b86d99018f";
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'ResourceSid' => 'PN4aa51b930717ea83c91971b86d99018f'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  resource_sid: "PN4aa51b930717ea83c91971b86d99018f"
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string resourceSid = "PN4aa51b930717ea83c91971b86d99018f";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(resourceSid: resourceSid);

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array('resourceSid' => 'PN4aa51b930717ea83c91971b86d99018f')
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(resource_sid="PN4aa51b930717ea83c91971b86d99018f")

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  resource_sid: 'PN4aa51b930717ea83c91971b86d99018f'
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("ResourceSid", "PN4aa51b930717ea83c91971b86d99018f");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    resource_sid="PN4aa51b930717ea83c91971b86d99018f"
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setResourceSid("PN4aa51b930717ea83c91971b86d99018f")
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
$ curl -XGET https://monitor.twilio.com/v1/Events?ResourceSid=PN4aa51b930717ea83c91971b86d99018f \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "events": [
    {
      "links": {
        "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN67652f4755e8c3a0bdf02a922949b888",
        "actor": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "event_data": null,
      "source_ip_address": "173.227.7.2",
      "source": "api",
      "url": "https://monitor.twilio.com/v1/Events/AE0e0751c03ed6439ea61c30c653f99680",
      "sid": "AE0e0751c03ed6439ea61c30c653f99680",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_type": "account",
      "description": null,
      "event_date": "2015-04-30T19:50:16Z",
      "event_type": "phone-number.deleted",
      "resource_sid": "PN67652f4755e8c3a0bdf02a922949b888",
      "resource_type": "phone-number"
    },
    {
      "links": {
        "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN67652f4755e8c3a0bdf02a922949b888",
        "actor": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "event_data": {
        "resource_properties": {
          "voice_url": {
            "previous": null,
            "updated": "http://www.example.com"
          }
        }
      },
      "source_ip_address": "73.189.144.70",
      "source": "api",
      "url": "https://monitor.twilio.com/v1/Events/AEb3377b7f3144406ab9b804cb8ef79ddd",
      "sid": "AEb3377b7f3144406ab9b804cb8ef79ddd",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_type": "account",
      "description": null,
      "event_date": "2015-04-19T22:21:04Z",
      "event_type": "phone-number.updated",
      "resource_sid": "PN67652f4755e8c3a0bdf02a922949b888",
      "resource_type": "phone-number"
    },
    {
      "links": {
        "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN67652f4755e8c3a0bdf02a922949b888",
        "actor": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "event_data": {
        "resource_properties": {
          "status_callback": {
            "updated": ""
          },
          "status_callback_method": {
            "updated": "POST"
          },
          "voice_fallback_method": {
            "updated": "POST"
          },
          "voice_application_sid": {
            "updated": ""
          },
          "friendly_name": {
            "updated": "(510) 500-9369"
          },
          "sms_fallback_url": {
            "updated": ""
          },
          "sms_application_sid": {
            "updated": ""
          },
          "sms_method": {
            "updated": "POST"
          },
          "voice_method": {
            "updated": "POST"
          },
          "sms_fallback_method": {
            "updated": "POST"
          },
          "sms_url": {
            "updated": ""
          }
        },
        "previous_properties": {}
      },
      "source_ip_address": "73.189.144.70",
      "source": "api",
      "url": "https://monitor.twilio.com/v1/Events/AE68bc35581b6c465b9c35a0187a9f78f1",
      "sid": "AE68bc35581b6c465b9c35a0187a9f78f1",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_type": "account",
      "description": null,
      "event_date": "2015-04-19T22:21:02Z",
      "event_type": "phone-number.created",
      "resource_sid": "PN67652f4755e8c3a0bdf02a922949b888",
      "resource_type": "phone-number"
    }
  ],
  "meta": {
    "key": "events",
    "next_page_url": null,
    "url": "https://monitor.twilio.com/v1/Events?ResourceSid=PN67652f4755e8c3a0bdf02a922949b888&PageSize=50&Page=0",
    "previous_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Events?ResourceSid=PN67652f4755e8c3a0bdf02a922949b888&PageSize=50&Page=0",
    "page_size": 50,
    "page": 0
  }
}
Filter for a phone number

Using the SourceIpAddress filter to track the activity of a particular IP address on a day in April:

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

var params = {
    sourceIpAddress: '104.14.155.29',
    startDate: '2015-04-25T00:00:00Z',
    endDate: '2015-04-25T23:59:59Z'
};
client.events.list(params, function(error, events) {
    for (var e in events) {
        process.stdout.write(e);
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events
  .list({
    sourceIpAddress: '104.14.155.29',
    startDate: '2015-04-25T00:00:00Z',
    endDate: '2015-04-25T23:59:59Z'
  })
  .then((response) => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.SourceIpAddress = "104.14.155.29";
    options.StartDate = new DateTime(2015, 4, 25);
    options.EndDate = new DateTime(2015, 4, 25, 23, 59, 59);
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'SourceIpAddress' => '104.14.155.29',
    'StartDate' => '2015-04-25T00:00:00Z',
    'EndDate' => '2015-04-25T23:59:59Z'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  source_ip_address: '104.14.155.29',
  start_date: '2015-04-25T00:00:00Z',
  end_date: '2015-04-25T23:59:59Z'
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(
            sourceIpAddress: "104.14.155.29",
            startDate: new DateTime(2015, 4, 25),
            endDate: new DateTime(2015, 4, 25, 23, 59, 59));

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array(
        'sourceIpAddress' => '104.14.155.29',
        'startDate' => '2015-04-25T00:00:00Z',
        'endDate' => '2015-04-25T23:59:59Z'
    )
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(
    source_ip_address="104.14.155.29",
    start_date=datetime(2015, 4, 25, tzinfo=pytz.UTC).isoformat(),
    end_date=datetime(2015, 4, 25, 23, 59, 59, tzinfo=pytz.UTC).isoformat(),
)

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  source_ip_address: '104.14.155.29',
  start_date: Time.new('2015-04-25T00:00:00Z'),
  end_date: Time.new('2015-04-25T23:59:59Z')
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("SourceIpAddress", "104.14.155.29");
    params.put("StartDate", "2015-04-25T00:00:00Z");
    params.put("EndDate", "2015-04-25T23:59:59Z");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    source_ip_address="104.14.155.29",
    start_date=datetime(2015, 4, 25, tzinfo=pytz.UTC),
    end_date=datetime(2015, 4, 25, 23, 59, 59, tzinfo=pytz.UTC)
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setSourceIpAddress("104.14.155.29")
        .setStartDate(LocalDate.parse("2015-04-25"))
        .setEndDate(LocalDate.parse("2015-04-25"))
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
curl -XGET "https://monitor.twilio.com/v1/Events?SourceIpAddress=104.14.155.29&StartDate=2015-04-25T00:00:00Z&EndDate=2015-04-25T23:59:59Z" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "events": [
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "friendly_name": {
            "previous": "tim+audittester1@twilio.com",
            "updated": "tim+audittester100@twilio.com"
          },
          "email_address": {
            "previous": "tim+audittester1@twilio.com",
            "updated": "tim+audittester100@twilio.com"
          }
        }
      },
      "source_ip_address": "12.130.117.96",
      "source": "web",
      "url": "https://monitor.twilio.com/v1/Events/AEd6373d5a8e9540ce9f697d2bae7a2c34",
      "sid": "AEd6373d5a8e9540ce9f697d2bae7a2c34",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "actor_type": "user",
      "description": null,
      "event_date": "2015-01-04T00:38:23Z",
      "event_type": "user.updated",
      "resource_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "resource_type": "user"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": null,
      "source_ip_address": "12.130.117.96",
      "source": "web",
      "url": "https://monitor.twilio.com/v1/Events/AEf98c1e62319846a791c62f982cb045f6",
      "sid": "AEf98c1e62319846a791c62f982cb045f6",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "actor_type": "user",
      "description": null,
      "event_date": "2015-01-04T00:38:22Z",
      "event_type": "user-session.created",
      "resource_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "resource_type": "user-session"
    }
  ],
  "meta": {
    "key": "events",
    "next_page_url": null,
    "url": "https://monitor.twilio.com/v1/Events?SourceIpAddress=12.130.117.96&PageSize=50&Page=0",
    "previous_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Events?SourceIpAddress=12.130.117.96&PageSize=50&Page=0",
    "page_size": 50,
    "page": 0
  }
}
Filter for an IP address

ActorSid, ResourceSid, and SourceIpAddress may only be used one-at-a-time, so this request that uses both ActorSid and ResourceSid returns an HTTP 400 error:

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

var params = {
    actorSid: 'USd0afd67cddff4ec7cb0022771a203cb1',
    resourceSid: 'PN4aa51b930717ea83c91971b86d99018f'
};
client.events.list(params, function(error, events) {
    for (var e in events) {
        process.stdout.write(e);
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events.list()
  .then((response) => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.ActorSid = "USd0afd67cddff4ec7cb0022771a203cb1";
    options.ResourceSid = "PN4aa51b930717ea83c91971b86d99018f";
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'ActorSid' => 'USd0afd67cddff4ec7cb0022771a203cb1',
    'ResourceSid' => 'PN4aa51b930717ea83c91971b86d99018f'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  actor_sid: "USd0afd67cddff4ec7cb0022771a203cb1",
  resource_sid: "PN4aa51b930717ea83c91971b86d99018f"
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string actorSid = "USd0afd67cddff4ec7cb0022771a203cb1";
        const string resourceSid = "PN4aa51b930717ea83c91971b86d99018f";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(actorSid, resourceSid: resourceSid);

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array(
        'actorSid' => 'USd0afd67cddff4ec7cb0022771a203cb1',
        'resourceSid' => 'PN4aa51b930717ea83c91971b86d99018f'
    )
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(
    actor_sid="USd0afd67cddff4ec7cb0022771a203cb1",
    resource_sid="PN4aa51b930717ea83c91971b86d99018f",
)

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  actor_sid: 'USd0afd67cddff4ec7cb0022771a203cb1',
  resource_sid: 'PN4aa51b930717ea83c91971b86d99018f'
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("ActorSid", "USd0afd67cddff4ec7cb0022771a203cb1");
    params.put("ResourceSid", "PN4aa51b930717ea83c91971b86d99018f");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    actor_sid="USd0afd67cddff4ec7cb0022771a203cb1",
    resource_sid="PN4aa51b930717ea83c91971b86d99018f",
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setActorSid("USd0afd67cddff4ec7cb0022771a203cb1")
        .setResourceSid("PN4aa51b930717ea83c91971b86d99018f")
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
curl -XGET "https://monitor.twilio.com/v1/Events?ActorSid=USd0afd67cddff4ec7cb0022771a203cb1&ResourceSid=PN4aa51b930717ea83c91971b86d99018f" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "status": 400,
  "more_info": "https://www.twilio.com/docs/errors/400",
  "message": "Invalid combination of AuditEvent filters, no combinations of ResourceSid, IpAddress, ActorSid, and ResourceType are supported.",
  "code": 400
}
Only use one filter property at a time!

HTTP POST

Not supported.

HTTP PUT

Not supported.

HTTP DELETE

Not supported.

Full List of All Supported Resource-Types and Event-Types

Events currently tracks the following resource types and associated event types:

Resource Type Event Types
account account.created
account.updated
account.deleted
application application.created
application.updated
application.deleted
authorized-connect-app authorized-connect-app.created
authorized-connect-app.deleted
call call.deleted
caller-id caller-id.created
caller-id.updated
caller-id.deleted
connect-app connect-app.created
connect-app.updated
connect-app.deleted
invoice-settings invoice-settings.updated
message message.updated
message.deleted
message-body message-body.deleted
message-media message-media.deleted
payment payment.created
payment-method payment-method.created
payment-method.updated
payment-method.deleted
payment-refund payment-refund.created
phone-number phone-number.created
phone-number.updated
phone-number.deleted
recharge-trigger recharge-trigger.created
recharge-trigger.updated
recharge-trigger.deleted
recording recording.deleted
shortcode shortcode.created
shortcode.updated
shortcode.deleted
sip-credential-list sip-credential-list.created
sip-credential-list.updated
sip-credential-list.deleted
sip-domain sip-domain.created
sip-domain.updated
sip-domain.deleted
sip-ip-access-control-list sip-ip-access-control-list.created
sip-ip-access-control-list.updated
sip-ip-access-control-list.deleted
support-plan support-plan.updated
sms-geographic-permissions sms-geographic-permissions.updated
transcription transcription.deleted
usage-trigger usage-trigger.created
usage-trigger.updated
usage-trigger.deleted
voice-geographic-permissions voice-geographic-permissions.updated
wireless-sim wireless-sim.updated

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

1 / 1
Loading Code Samples...
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

client.events('AE21f24380625e4aa4abec76e39b14458d').get(function(error, event) {
    process.stdout.write(event.eventType);
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1
  .events('AE21f24380625e4aa4abec76e39b14458d')
  .fetch()
  .then((data) => console.log(event.description));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var e = monitor.GetEvent("AE21f24380625e4aa4abec76e39b14458d");
    Console.WriteLine(e.Description);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$event = $client->events->get("AE21f24380625e4aa4abec76e39b14458d");
echo $event->description;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

event = @client.events.get('AE21f24380625e4aa4abec76e39b14458d')

puts event.description
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string eventSid = "AE21f24380625e4aa4abec76e39b14458d";

        TwilioClient.Init(accountSid, authToken);

        var e = EventResource.Fetch(eventSid);

        Console.WriteLine(e.Description);
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$event = $client->monitor
    ->events("AE21f24380625e4aa4abec76e39b14458d")
    ->fetch();

echo $event->description;
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

event = client.events.get("AE21f24380625e4aa4abec76e39b14458d")
print(event.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@event = @client.monitor.v1.events('AE21f24380625e4aa4abec76e39b14458d').fetch

puts @event.description
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Event e = client.getEvent("AE21f24380625e4aa4abec76e39b14458d");

    System.out.println(e.getDescription());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

event = client.monitor.events("AE21f24380625e4aa4abec76e39b14458d").fetch()
print(event.description)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    Event event = Event.fetcher("AE21f24380625e4aa4abec76e39b14458d").fetch();

    System.out.println(event.getDescription());
  }
}
$ curl -XGET https://monitor.twilio.com/v1/Events/AE21f24380625e4aa4abec76e39b14458d \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "links": {
    "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN4aa51b930717ea83c91971b86d99018f",
    "actor": null
  },
  "event_data": {
    "resource_properties": {
      "voice_fallback_url": {
        "previous": null,
        "updated": ""
      },
      "voice_url": {
        "previous": "http://www.example.com",
        "updated": "http://www.example.com/hello-jenny"
      }
    }
  },
  "source_ip_address": "73.189.144.70",
  "source": "web",
  "url": "https://monitor.twilio.com/v1/Events/AE21f24380625e4aa4abec76e39b14458d",
  "sid": "AE21f24380625e4aa4abec76e39b14458d",
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "actor_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
  "actor_type": "user",
  "description": null,
  "event_date": "2015-04-29T02:55:15Z",
  "event_type": "phone-number.updated",
  "resource_sid": "PN4aa51b930717ea83c91971b86d99018f",
  "resource_type": "phone-number"
}
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const MonitorClient = require('twilio').MonitorClient;
const client = new MonitorClient(accountSid, authToken);

const params = {
  startDate: '2015-03-01T00:00:00Z',
  endDate: '2015-04-01T00:00:00Z',
};
client.events.list(params, (error, events) => {
  for (const e in events) {
    process.stdout.write(e);
  }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events
  .list({
    startDate: '2015-03-01T00:00:00Z',
    endDate: '2015-04-01T00:00:00Z',
  })
  .then(response => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.StartDate = new DateTime(2015, 3, 1);
    options.EndDate = new DateTime(2015, 4, 1);
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'StartDate' => '2015-03-01T00:00:00Z',
    'EndDate' => '2015-04-01T00:00:00Z'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  start_date: "2015-03-01T00:00:00Z",
  end_date: "2015-04-01T00:00:00Z"
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(
            startDate: new DateTime(2015, 3, 1),
            endDate: new DateTime(2015, 4, 1));

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array(
        'startDate' => '2015-03-01T00:00:00Z',
        'endDate' => '2015-04-01T00:00:00Z'
    )
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(
    start_date=datetime(2015, 3, 1, tzinfo=pytz.UTC).isoformat(),
    end_date=datetime(2015, 4, 1, tzinfo=pytz.UTC).isoformat(),
)

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  start_date: Time.new('2015-03-01T00:00:00Z'),
  end_date: Time.new('2015-04-01T00:00:00Z')
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("StartDate", "2015-03-01T00:00:00Z");
    params.put("EndDate", "2015-04-01T00:00:00Z");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    start_date=datetime(2015, 3, 1, tzinfo=pytz.UTC),
    end_date=datetime(2015, 4, 1, tzinfo=pytz.UTC),
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setStartDate(LocalDate.parse("2015-03-01"))
        .setEndDate(LocalDate.parse("2015-04-01"))
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
curl -XGET "https://monitor.twilio.com/v1/Events?StartDate=2015-03-01T00:00:00Z&EndDate=2015-04-01T00:00:00Z" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "events": [
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "falkland_islands": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AEc997b108285f476abdfe93aff97e0175",
      "sid": "AEc997b108285f476abdfe93aff97e0175",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-13T22:17:27Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AE824a2c66ff5940398d561b2c875cec80",
      "sid": "AE824a2c66ff5940398d561b2c875cec80",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T23:42:46Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AEea2520d7439e4ed9aa2b3ddd532e04d3",
      "sid": "AEea2520d7439e4ed9aa2b3ddd532e04d3",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T22:41:34Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AEaf5242e4f10242a299649cc1c1df1849",
      "sid": "AEaf5242e4f10242a299649cc1c1df1849",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T21:25:15Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "south_sudan": {
            "previous": "disabled",
            "updated": "enabled"
          }
        }
      },
      "source_ip_address": null,
      "source": "twilio",
      "url": "https://monitor.twilio.com/v1/Events/AE661752392a6e4bd5b8980471ab0b12aa",
      "sid": "AE661752392a6e4bd5b8980471ab0b12aa",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": null,
      "actor_type": null,
      "description": null,
      "event_date": "2015-03-09T20:38:20Z",
      "event_type": "sms-geographic-permissions.updated",
      "resource_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "resource_type": "sms-geographic-permissions"
    }
  ],
  "meta": {
    "key": "events",
    "next_page_url": null,
    "url": "https://monitor.twilio.com/v1/Events?StartDate=2015-03-01T00%3A00%3A00Z&EndDate=2015-04-01T00%3A00%3A00Z&PageSize=50&Page=0",
    "previous_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Events?StartDate=2015-03-01T00%3A00%3A00Z&EndDate=2015-04-01T00%3A00%3A00Z&PageSize=50&Page=0",
    "page_size": 50,
    "page": 0
  }
}
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

var params = {
    resourceSid: 'PN4aa51b930717ea83c91971b86d99018f'
};
client.events.list(params, function(error, events) {
    for (var e in events) {
        process.stdout.write(e);
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events
  .list({
    resourceSid: 'PN4aa51b930717ea83c91971b86d99018f'
  })
  .then((response) => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.ResourceSid = "PN4aa51b930717ea83c91971b86d99018f";
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'ResourceSid' => 'PN4aa51b930717ea83c91971b86d99018f'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  resource_sid: "PN4aa51b930717ea83c91971b86d99018f"
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string resourceSid = "PN4aa51b930717ea83c91971b86d99018f";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(resourceSid: resourceSid);

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array('resourceSid' => 'PN4aa51b930717ea83c91971b86d99018f')
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(resource_sid="PN4aa51b930717ea83c91971b86d99018f")

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  resource_sid: 'PN4aa51b930717ea83c91971b86d99018f'
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("ResourceSid", "PN4aa51b930717ea83c91971b86d99018f");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    resource_sid="PN4aa51b930717ea83c91971b86d99018f"
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setResourceSid("PN4aa51b930717ea83c91971b86d99018f")
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
$ curl -XGET https://monitor.twilio.com/v1/Events?ResourceSid=PN4aa51b930717ea83c91971b86d99018f \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "events": [
    {
      "links": {
        "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN67652f4755e8c3a0bdf02a922949b888",
        "actor": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "event_data": null,
      "source_ip_address": "173.227.7.2",
      "source": "api",
      "url": "https://monitor.twilio.com/v1/Events/AE0e0751c03ed6439ea61c30c653f99680",
      "sid": "AE0e0751c03ed6439ea61c30c653f99680",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_type": "account",
      "description": null,
      "event_date": "2015-04-30T19:50:16Z",
      "event_type": "phone-number.deleted",
      "resource_sid": "PN67652f4755e8c3a0bdf02a922949b888",
      "resource_type": "phone-number"
    },
    {
      "links": {
        "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN67652f4755e8c3a0bdf02a922949b888",
        "actor": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "event_data": {
        "resource_properties": {
          "voice_url": {
            "previous": null,
            "updated": "http://www.example.com"
          }
        }
      },
      "source_ip_address": "73.189.144.70",
      "source": "api",
      "url": "https://monitor.twilio.com/v1/Events/AEb3377b7f3144406ab9b804cb8ef79ddd",
      "sid": "AEb3377b7f3144406ab9b804cb8ef79ddd",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_type": "account",
      "description": null,
      "event_date": "2015-04-19T22:21:04Z",
      "event_type": "phone-number.updated",
      "resource_sid": "PN67652f4755e8c3a0bdf02a922949b888",
      "resource_type": "phone-number"
    },
    {
      "links": {
        "resource": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IncomingPhoneNumbers/PN67652f4755e8c3a0bdf02a922949b888",
        "actor": "https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "event_data": {
        "resource_properties": {
          "status_callback": {
            "updated": ""
          },
          "status_callback_method": {
            "updated": "POST"
          },
          "voice_fallback_method": {
            "updated": "POST"
          },
          "voice_application_sid": {
            "updated": ""
          },
          "friendly_name": {
            "updated": "(510) 500-9369"
          },
          "sms_fallback_url": {
            "updated": ""
          },
          "sms_application_sid": {
            "updated": ""
          },
          "sms_method": {
            "updated": "POST"
          },
          "voice_method": {
            "updated": "POST"
          },
          "sms_fallback_method": {
            "updated": "POST"
          },
          "sms_url": {
            "updated": ""
          }
        },
        "previous_properties": {}
      },
      "source_ip_address": "73.189.144.70",
      "source": "api",
      "url": "https://monitor.twilio.com/v1/Events/AE68bc35581b6c465b9c35a0187a9f78f1",
      "sid": "AE68bc35581b6c465b9c35a0187a9f78f1",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_type": "account",
      "description": null,
      "event_date": "2015-04-19T22:21:02Z",
      "event_type": "phone-number.created",
      "resource_sid": "PN67652f4755e8c3a0bdf02a922949b888",
      "resource_type": "phone-number"
    }
  ],
  "meta": {
    "key": "events",
    "next_page_url": null,
    "url": "https://monitor.twilio.com/v1/Events?ResourceSid=PN67652f4755e8c3a0bdf02a922949b888&PageSize=50&Page=0",
    "previous_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Events?ResourceSid=PN67652f4755e8c3a0bdf02a922949b888&PageSize=50&Page=0",
    "page_size": 50,
    "page": 0
  }
}
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

var params = {
    sourceIpAddress: '104.14.155.29',
    startDate: '2015-04-25T00:00:00Z',
    endDate: '2015-04-25T23:59:59Z'
};
client.events.list(params, function(error, events) {
    for (var e in events) {
        process.stdout.write(e);
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events
  .list({
    sourceIpAddress: '104.14.155.29',
    startDate: '2015-04-25T00:00:00Z',
    endDate: '2015-04-25T23:59:59Z'
  })
  .then((response) => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.SourceIpAddress = "104.14.155.29";
    options.StartDate = new DateTime(2015, 4, 25);
    options.EndDate = new DateTime(2015, 4, 25, 23, 59, 59);
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'SourceIpAddress' => '104.14.155.29',
    'StartDate' => '2015-04-25T00:00:00Z',
    'EndDate' => '2015-04-25T23:59:59Z'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  source_ip_address: '104.14.155.29',
  start_date: '2015-04-25T00:00:00Z',
  end_date: '2015-04-25T23:59:59Z'
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(
            sourceIpAddress: "104.14.155.29",
            startDate: new DateTime(2015, 4, 25),
            endDate: new DateTime(2015, 4, 25, 23, 59, 59));

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array(
        'sourceIpAddress' => '104.14.155.29',
        'startDate' => '2015-04-25T00:00:00Z',
        'endDate' => '2015-04-25T23:59:59Z'
    )
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(
    source_ip_address="104.14.155.29",
    start_date=datetime(2015, 4, 25, tzinfo=pytz.UTC).isoformat(),
    end_date=datetime(2015, 4, 25, 23, 59, 59, tzinfo=pytz.UTC).isoformat(),
)

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  source_ip_address: '104.14.155.29',
  start_date: Time.new('2015-04-25T00:00:00Z'),
  end_date: Time.new('2015-04-25T23:59:59Z')
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("SourceIpAddress", "104.14.155.29");
    params.put("StartDate", "2015-04-25T00:00:00Z");
    params.put("EndDate", "2015-04-25T23:59:59Z");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from datetime import datetime

import pytz
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    source_ip_address="104.14.155.29",
    start_date=datetime(2015, 4, 25, tzinfo=pytz.UTC),
    end_date=datetime(2015, 4, 25, 23, 59, 59, tzinfo=pytz.UTC)
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import org.joda.time.LocalDate;

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setSourceIpAddress("104.14.155.29")
        .setStartDate(LocalDate.parse("2015-04-25"))
        .setEndDate(LocalDate.parse("2015-04-25"))
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
curl -XGET "https://monitor.twilio.com/v1/Events?SourceIpAddress=104.14.155.29&StartDate=2015-04-25T00:00:00Z&EndDate=2015-04-25T23:59:59Z" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "events": [
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": {
        "resource_properties": {
          "friendly_name": {
            "previous": "tim+audittester1@twilio.com",
            "updated": "tim+audittester100@twilio.com"
          },
          "email_address": {
            "previous": "tim+audittester1@twilio.com",
            "updated": "tim+audittester100@twilio.com"
          }
        }
      },
      "source_ip_address": "12.130.117.96",
      "source": "web",
      "url": "https://monitor.twilio.com/v1/Events/AEd6373d5a8e9540ce9f697d2bae7a2c34",
      "sid": "AEd6373d5a8e9540ce9f697d2bae7a2c34",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "actor_type": "user",
      "description": null,
      "event_date": "2015-01-04T00:38:23Z",
      "event_type": "user.updated",
      "resource_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "resource_type": "user"
    },
    {
      "links": {
        "resource": null,
        "actor": null
      },
      "event_data": null,
      "source_ip_address": "12.130.117.96",
      "source": "web",
      "url": "https://monitor.twilio.com/v1/Events/AEf98c1e62319846a791c62f982cb045f6",
      "sid": "AEf98c1e62319846a791c62f982cb045f6",
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "actor_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "actor_type": "user",
      "description": null,
      "event_date": "2015-01-04T00:38:22Z",
      "event_type": "user-session.created",
      "resource_sid": "USd0afd67cddff4ec7cb0022771a203cb1",
      "resource_type": "user-session"
    }
  ],
  "meta": {
    "key": "events",
    "next_page_url": null,
    "url": "https://monitor.twilio.com/v1/Events?SourceIpAddress=12.130.117.96&PageSize=50&Page=0",
    "previous_page_url": null,
    "first_page_url": "https://monitor.twilio.com/v1/Events?SourceIpAddress=12.130.117.96&PageSize=50&Page=0",
    "page_size": 50,
    "page": 0
  }
}
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var authToken = 'your_auth_token';
var MonitorClient = require('twilio').MonitorClient;
var client = new MonitorClient(accountSid, authToken);

var params = {
    actorSid: 'USd0afd67cddff4ec7cb0022771a203cb1',
    resourceSid: 'PN4aa51b930717ea83c91971b86d99018f'
};
client.events.list(params, function(error, events) {
    for (var e in events) {
        process.stdout.write(e);
    }
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.monitor.v1.events.list()
  .then((response) => console.log(response));
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Monitor;
class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    string AuthToken = "your_auth_token";
    var monitor = new MonitorClient(AccountSid, AuthToken);

    var options = new EventListRequest();
    options.ActorSid = "USd0afd67cddff4ec7cb0022771a203cb1";
    options.ResourceSid = "PN4aa51b930717ea83c91971b86d99018f";
    var events = monitor.ListEvents(options);
    foreach (var e in events.Events)
    {
      Console.WriteLine(e.Description);
    }
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Monitor_Services_Twilio($sid, $token);

$params = array(
    'ActorSid' => 'USd0afd67cddff4ec7cb0022771a203cb1',
    'ResourceSid' => 'PN4aa51b930717ea83c91971b86d99018f'
);
$events = $client->events->getIterator(0, 50, $params);
foreach ($events as $e) {
    echo $e->description;
}
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::MonitorClient.new account_sid, auth_token

@params = {
  actor_sid: "USd0afd67cddff4ec7cb0022771a203cb1",
  resource_sid: "PN4aa51b930717ea83c91971b86d99018f"
}
@client.events.list(@params).each do |e|
  puts e.description
end
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Monitor.V1;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";
        const string actorSid = "USd0afd67cddff4ec7cb0022771a203cb1";
        const string resourceSid = "PN4aa51b930717ea83c91971b86d99018f";

        TwilioClient.Init(accountSid, authToken);

        var events = EventResource.Read(actorSid, resourceSid: resourceSid);

        foreach (var e in events)
        {
            Console.WriteLine(e.Description);
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$events = $client->monitor->events->read(
    array(
        'actorSid' => 'USd0afd67cddff4ec7cb0022771a203cb1',
        'resourceSid' => 'PN4aa51b930717ea83c91971b86d99018f'
    )
);

foreach ($events as $event) {
    echo $event->description;
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.monitor import TwilioMonitorClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioMonitorClient(account_sid, auth_token)

events = client.events.list(
    actor_sid="USd0afd67cddff4ec7cb0022771a203cb1",
    resource_sid="PN4aa51b930717ea83c91971b86d99018f",
)

for e in events:
    print(e.description)
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'

# put your own credentials here
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'

# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new(account_sid, auth_token)

@params = {
  actor_sid: 'USd0afd67cddff4ec7cb0022771a203cb1',
  resource_sid: 'PN4aa51b930717ea83c91971b86d99018f'
}

@client.monitor.v1.events.list(@params).each do |e|
  puts e.description
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.TwilioMonitorClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.monitor.Event;
import com.twilio.sdk.resource.list.monitor.EventList;
import java.util.HashMap;
import java.util.Map;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    TwilioMonitorClient client = new TwilioMonitorClient(ACCOUNT_SID, AUTH_TOKEN);

    Map<String, String> params = new HashMap<String, String>();
    params.put("ActorSid", "USd0afd67cddff4ec7cb0022771a203cb1");
    params.put("ResourceSid", "PN4aa51b930717ea83c91971b86d99018f");
    EventList events = client.getEvents(params);

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

events = client.monitor.events.list(
    actor_sid="USd0afd67cddff4ec7cb0022771a203cb1",
    resource_sid="PN4aa51b930717ea83c91971b86d99018f",
)

for e in events:
    print(e.description)
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.monitor.v1.Event;

public class Example {
  /// Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    ResourceSet<Event> events = Event.reader()
        .setActorSid("USd0afd67cddff4ec7cb0022771a203cb1")
        .setResourceSid("PN4aa51b930717ea83c91971b86d99018f")
        .read();

    for (Event e : events) {
      System.out.println(e.getDescription());
    }
  }
}
curl -XGET "https://monitor.twilio.com/v1/Events?ActorSid=USd0afd67cddff4ec7cb0022771a203cb1&ResourceSid=PN4aa51b930717ea83c91971b86d99018f" \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "status": 400,
  "more_info": "https://www.twilio.com/docs/errors/400",
  "message": "Invalid combination of AuditEvent filters, no combinations of ResourceSid, IpAddress, ActorSid, and ResourceType are supported.",
  "code": 400
}