Update an instance of a usage trigger

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

Webhooks that notify you of usage thresholds

Update an instance of a usage trigger

Path parameters

  • AccountSid string Required

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

  • Sid string Required

    The Twilio-provided string that uniquely identifies the UsageTrigger resource to update.

Body

  • CallbackMethod string(http-method)

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

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

  • CallbackUrl string(uri)

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

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

Responses

  • OK

    Hide response attributes Show response attributes object
    • usage_category string | null

      The usage category the trigger watches

    • usage_record_uri string | null

      The URI of the UsageRecord resource this trigger watches

    • 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

POST /2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json
curl \
 -X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Usage/Triggers/{Sid}.json \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'CallbackMethod=HEAD&CallbackUrl=https%3A%2F%2Fexample.com&FriendlyName=string'
Request example
{
  "CallbackMethod": "HEAD",
  "CallbackUrl": "https://example.com",
  "FriendlyName": "string"
}
Request examples
{
  "CallbackMethod": "HEAD",
  "CallbackUrl": "https://example.com",
  "FriendlyName": "string"
}
Response examples (200)
{
  "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)
{
  "usage_category": "a2p-registration-fees",
  "usage_record_uri": "string",
  "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"
}