Update a usage trigger:

POST /usage/triggers/{triggerId}

Change the settings of an existing trigger.


See also:
Create a Usage Trigger
Get Usage Triggers
Delete a Usage Trigger

Uses and Requirements

NOTE: This method uses the /subsc/v1 basepath, not /loc/v1 used by other Device Location API requests.

Request Components

HTTP Request

POST https://thingspace.verizon.com/api/subsc/v1/usage/triggers/{triggerId}

Resource Path and Query Parameters

You must include the unique ID of the trigger that you want to update in the path.

Parameter Name Data Type Description
string The unique ID of the trigger to update. The ID was returned in the response when the trigger was created, and you can also find it in the GET /triggers response.

Header Parameters

The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.

Parameter Name Data Type Description
string HTTP Authorization bearer token.
string A valid session token returned by POST /api/m2m/v1/session/login using the primary account’s UWS credentials.
string Must be application/json.

Request Body

The request body contains the account name and the trigger parameters that you want to change.

Parameter Name Data Type Description
string The Verizon billing account that the trigger belongs to. You cannot move a trigger to a different account.
string A new, unique name of the trigger.
thresholdValueoptional string The percent of subscribed usage required to activate the trigger, such as 90 or 100.
smsPhoneNumbersoptional string A comma-separated list of phone numbers to send SMS alerts to. Digits only; no dashes or parentheses, etc. This list will replace any existing list of phone numbers.
emailAddressesoptional string A comma-separated list of email address to send email alerts to. This list will replace any existing list of email addresses.

Example Request Body

Update a usage trigger to change the thresholdValue.

  "accountName": "1000012345-00001",
  "thresholdValue": "95"

Success Responses

Status 200

A success response contains the complete settings of the trigger resource.

Example Success Response

  "triggerId": "595f5c44-c31c-4552-8670-020a1545a84d",
  "triggerName": "Location usage warning",
  "accountName": "1234567890-00001",
  "serviceName": "Location",
  "thresholdValue": "95",
  "allowExcess": true,
  "sendSmsNotification": true,
  "smsPhoneNumbers": "5558794321",
  "sendEmailNotification": false,
  "emailAddresses": "",
  "createDate": "2018-06-11",
  "updateDate": "2018-06-12"

Failure Responses

Status 400

All error messages are returned in this format:

  "errorCode": "error code string",
  "errorMessage": "error message string"

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.