Skip to Content
veriom

Update usage alert settings

Choose the processing and plan-limit thresholds that alert admins, and the channels used.

PUT
/v1/workspaces/{workspace_id}/usage-alerts

Choose the processing and plan-limit thresholds that alert admins, and the channels used.

Authorization

workspaceToken
headerAuthorizationBearer <vat_<opaque-token>>

Expiring, hashed workspace token with explicit scopes.

Path Parameters

workspace_id*Workspace Id
Formatuuid

Request Body

application/json
  1. body
customer_spend_cap_usd?||

Monthly cap on spend through the workspace's own model keys, which never uses the plan's processing units. New work on those keys waits once the month's spend reaches it. Omit to keep the current cap; null removes it.

email_enabled*Email Enabled

Email admins and owners who turned on workspace email notifications.

expected_version?|

The version that was read (0 for the defaults). The change is refused with 409 when someone saved the settings since.

in_app_enabled*In App Enabled

Show alerts in admins' notification center.

limit_metrics*array<>

Plan limits that warn: repositories, audits_per_month, api_tokens. A retired seats entry is ignored.

limit_thresholds*array<integer>

Percentages (1-100) of each chosen plan limit; empty turns them off.

Itemsitems <= 6
spend_thresholds*array<integer>

Percentages (1-100) of the month's processing allowance, and of the cap on your own model keys when one is set; empty turns them off.

Itemsitems <= 6

Response Body

Successful Response

application/json
  1. response
can_manage*Can Manage

Whether the caller may change the settings.

customer_reached?array<>

Thresholds of the cap on the workspace's own model keys reached this month (metric customer_model_spend); kept apart from the plan's alerts.

customer_spend_cap_usd?|

Monthly cap on spend through the workspace's own model keys; null for none.

email_enabled*Email Enabled
in_app_enabled*In App Enabled
limit_metrics*array<>
limit_thresholds*array<integer>
period*Period

The UTC month the reached alerts belong to (YYYY-MM).

reached*array<>

Thresholds of the plan's processing allowance and limits reached this month, by metric and threshold.

spend_thresholds*array<integer>
updated_at*|null
version*Version

0 while the workspace uses the default settings.

Example Request
curl -X PUT 'https://api.veriom.ai/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage-alerts' \  -H 'Content-Type: application/json' \  -d '{  "email_enabled": true,  "in_app_enabled": true,  "limit_metrics": [    "repositories"  ],  "limit_thresholds": [    0  ],  "spend_thresholds": [    0  ]}'
Example Response
{  "can_manage": true,  "customer_reached": [    {      "limit": "string",      "metric": "model_spend",      "notified": true,      "reached_at": "2019-08-24T14:15:22Z",      "threshold": 0,      "used": "string"    }  ],  "customer_spend_cap_usd": "string",  "email_enabled": true,  "in_app_enabled": true,  "limit_metrics": [    "repositories"  ],  "limit_thresholds": [    0  ],  "period": "string",  "reached": [    {      "limit": "string",      "metric": "model_spend",      "notified": true,      "reached_at": "2019-08-24T14:15:22Z",      "threshold": 0,      "used": "string"    }  ],  "spend_thresholds": [    0  ],  "updated_at": "2019-08-24T14:15:22Z",  "version": 0}