Sample - Twilio API
GET/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json

Retrieve a usage trigger

Retrieves a specific usage trigger belonging to the account identified by AccountSid. Use Sid to identify the trigger you want to inspect, including its callback configuration, monitored usage field, threshold, and firing history. The response includes the trigger's account, API version, timestamps, and resource URI.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
AccountSidstringrequired
The account SID that created the usage trigger. The value must be 34 characters and match the `AC` followed by 32 hexadecimal characters pattern.
Sidstringrequired
The unique usage-trigger SID to retrieve. The value must be 34 characters and match the `UT` followed by 32 hexadecimal characters pattern.

1 status code
200Returns the usage trigger object, including its callback configuration, current value, firing dates, recurrence, monitored field, threshold, usage category, SID, and resource URI.
account_sidstringoptional
The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the trigger monitors.
api_versionstringoptional
The API version used to create the resource.
callback_methodstringoptional
The HTTP method we use to call `callback_url`. Can be: `GET` or `POST`.
Allowed:GETPOST
callback_urlstringoptional
The URL we call using the `callback_method` when the trigger fires.
current_valuestringoptional
The current value of the field the trigger is watching.
date_createdstringoptional
The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
date_firedstringoptional
The date and time in GMT that the trigger was last fired specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
date_updatedstringoptional
The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
friendly_namestringoptional
The string that you assigned to describe the trigger.
recurringstringoptional
The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT.
Allowed:dailymonthlyyearlyalltime
sidstringoptional
The unique string that that we created to identify the UsageTrigger resource.
trigger_bystringoptional
The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that fires the trigger. Can be: `count`, `usage`, or `price`, as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
Allowed:countusageprice
trigger_valuestringoptional
The value at which the trigger will fire. Must be a positive, numeric value.
uristringoptional
The URI of the resource, relative to `https://api.twilio.com`.
usage_categorystringoptional
The usage category the trigger watches. Must be one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
usage_record_uristringoptional
The URI of the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource this trigger watches, relative to `https://api.twilio.com`.

Error handling

AccountSid must be a 34-character account SID matching the AC prefix pattern, and Sid must be a 34-character usage-trigger SID matching the UT prefix pattern. The returned trigger uses GET or POST for callback_method, and its recurring value is one of daily, monthly, yearly, or alltime when present.