API Reference
Log In
API Reference

Update a New AI Anomaly

Updates a new AI Anomaly.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the AI anomaly to update. This is the Revenium-generated hashid returned when the anomaly was created. Format: URL-safe encoded string.

Body Params
string
required

The name of the anomaly alert

string
required

The unique identifier of the team that owns this anomaly alert. The teamId can be found in the developer section of the Revenium web application.

string
enum
required

The type of alert monitoring strategy. THRESHOLD monitors for absolute values exceeding a threshold, RELATIVE_CHANGE monitors for percentage changes between periods, CUMULATIVE_USAGE monitors for total usage over a period

Allowed:
string
enum
required

The AI metric to monitor. Cost metrics track spending, token metrics track usage, performance metrics track latency and duration, error metrics track failures

string
enum
required

The comparison operator used to evaluate the threshold. Comparison operators (GREATER_THAN, LESS_THAN, EQUAL_TO, NOT_EQUAL_TO, GREATER_THAN_OR_EQUAL_TO, LESS_THAN_OR_EQUAL_TO) compare absolute values. Change operators (PERCENT_INCREASE, PERCENT_DECREASE, INCREASES_BY, DECREASES_BY) compare relative changes between periods

number
required

The numeric threshold value that triggers the alert. For percentage-based alerts (when isPercentage is true), this represents the percentage value (e.g., 50 for 50%). For absolute value alerts, this is the metric value to compare against

boolean

Whether the threshold value represents a percentage. When true, the threshold is interpreted as a percentage value. When false or null, the threshold is an absolute value

notificationAddresses
array of strings
required

Email addresses to notify when the alert is triggered. Multiple addresses can be specified. Each address will receive an email notification when the anomaly condition is met

notificationAddresses*
slackConfigurations
array of strings
required

Slack configuration IDs to notify when the alert is triggered. Each configuration represents a Slack workspace and channel where notifications will be posted

slackConfigurations*
string

Optional description providing additional context about the alert's purpose and configuration

string
enum
required

The time period over which the metric is evaluated. For THRESHOLD and RELATIVE_CHANGE alerts, this determines the evaluation window. For CUMULATIVE_USAGE alerts, this determines the accumulation period

boolean
required

Whether the anomaly alert is active. When false, the alert is disabled without being deleted from the database. Disabled alerts do not evaluate conditions or send notifications

filters
array of objects

Filter criteria to limit the scope of anomaly monitoring. Each filter specifies a dimension (e.g., ORGANIZATION, PRODUCT, MODEL), an operator (e.g., IS, CONTAINS), and a value to match. Only metrics matching all filters are evaluated

filters
webhookConfigurations
array of strings
required

Webhook configuration IDs to notify when the alert is triggered. Each configuration represents a webhook endpoint that will receive a POST request with alert details

webhookConfigurations*
string
enum

The dimension by which to group anomaly monitoring. When specified, separate alerts are evaluated for each unique value of this dimension (e.g., per ORGANIZATION, per MODEL, per PRODUCT)

string
enum

The duration the anomaly condition must persist before triggering the alert. This prevents false positives from transient spikes. If null, the alert triggers immediately when the condition is met

boolean
_links
object
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
*/*