provider Api20100401Trigger POST /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json
@utdk/twilio /2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json
Create a new UsageTrigger
Create a new UsageTrigger
AccountSid path required
The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
string

Try it

Authentication
Configure credentials for Twilio - Api
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

createusagetrigger
POST/2010-04-01/Accounts/{AccountSid}/Usage/Triggers.json
Create a new UsageTrigger

Parameters

required

The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.

Input

required

The URL we should call using `callback_method` when the trigger fires.

required

The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`.

required

The usage category that the trigger should watch. Use one of the supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) for this value.

The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

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.

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).

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import twilio from '@utdk/twilio';

await twilio.createusagetrigger()