Retrieve a list of usage-triggers belonging to the account used to make the request

GET /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json

Webhooks that notify you of usage thresholds

Retrieve a list of usage-triggers belonging to the account used to make the request

Path parameters

  • AccountSid string Required

    The SID of the Account that created the UsageTrigger resources to read.

Query parameters

  • The frequency of recurring UsageTriggers to read. Can be: daily, monthly, or yearly to read recurring UsageTriggers. An empty value or a value of alltime reads non-recurring UsageTriggers.

    Values are daily, monthly, yearly, or alltime.

  • The trigger field of the UsageTriggers to read. Can be: count, usage, or price as described in the UsageRecords documentation.

    Values are count, usage, or price.

  • The usage category of the UsageTriggers to read. Must be a supported usage categories.

  • PageSize integer

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

Responses

  • OK

    Hide response attributes Show response attributes object
    • end integer
    • first_page_uri string(uri)
    • next_page_uri string(uri)
    • page integer
    • page_size integer
    • start integer
    • uri string(uri)
    • usage_triggers array[object]
      Hide usage_triggers attributes Show usage_triggers attributes array[object]
      • account_sid string | null

        The SID of the Account that this trigger monitors

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

      • api_version string | null

        The API version used to create the resource

      • callback_method string(http-method) | null

        The HTTP method we use to call callback_url

        Values are HEAD, GET, POST, PATCH, PUT, or DELETE.

      • callback_url string(uri) | null

        he URL we call when the trigger fires

      • current_value string | null

        The current value of the field the trigger is watching

      • date_created string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that the resource was created

      • date_fired string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that the trigger was last fired

      • date_updated string(date-time-rfc-2822) | null

        The RFC 2822 date and time in GMT that the resource was last updated

      • friendly_name string | null

        The string that you assigned to describe the trigger

      • recurring string | null

        The frequency of a recurring UsageTrigger

        Values are daily, monthly, yearly, or alltime.

      • sid string | null

        The unique string that identifies the resource

        Minimum length is 34, maximum length is 34. Format should match the following pattern: ^UT[0-9a-fA-F]{32}$.

      • trigger_by string | null

        The field in the UsageRecord resource that fires the trigger

        Values are count, usage, or price.

      • trigger_value string | null

        The value at which the trigger will fire

      • uri string(uri) | null

        The URI of the resource, relative to https://api.twilio.com

      • usage_category string | null

        The usage category the trigger watches

      • usage_record_uri string | null

        The URI of the UsageRecord resource this trigger watches

GET /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json \
 --user "username:password"
Response examples (200)
{
  "end": 42,
  "first_page_uri": "https://example.com",
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "start": 42,
  "uri": "https://example.com",
  "usage_triggers": [
    {
      "account_sid": "string",
      "api_version": "string",
      "callback_method": "HEAD",
      "callback_url": "https://example.com",
      "current_value": "string",
      "date_created": "string",
      "date_fired": "string",
      "date_updated": "string",
      "friendly_name": "string",
      "recurring": "daily",
      "sid": "string",
      "trigger_by": "count",
      "trigger_value": "string",
      "uri": "https://example.com",
      "usage_category": "a2p-registration-fees",
      "usage_record_uri": "string"
    }
  ]
}
Response examples (200)
{
  "end": 42,
  "first_page_uri": "https://example.com",
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "start": 42,
  "uri": "https://example.com",
  "usage_triggers": [
    {
      "account_sid": "string",
      "api_version": "string",
      "callback_method": "HEAD",
      "callback_url": "https://example.com",
      "current_value": "string",
      "date_created": "string",
      "date_fired": "string",
      "date_updated": "string",
      "friendly_name": "string",
      "recurring": "daily",
      "sid": "string",
      "trigger_by": "count",
      "trigger_value": "string",
      "uri": "https://example.com",
      "usage_category": "a2p-registration-fees",
      "usage_record_uri": "string"
    }
  ]
}