API referenceAlerts
POST /v2/alerts
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/v2/alerts" \ -H "Content-Type: application/json" \ -d '{ "destination": "string", "destinationType": "email", "metric": "error_count", "name": "string", "operator": "gt", "threshold": 0.1 }'{ "$schema": "https://example.com/schemas/AlertRuleDTO.json", "alertRuleId": "string", "appId": "string", "createdAt": "string", "destination": "string", "destinationType": "string", "enabled": true, "environmentId": "string", "metric": "string", "model": "string", "name": "string", "operator": "string", "orgId": "string", "release": "string", "service": "string", "threshold": 0.1, "updatedAt": "string"}appId?string
destination*string
Length
1 <= lengthdestinationType*string
Value in
- "email"
- "webhook"
enabled?boolean
environmentId?string
metric*string
Value in
- "error_count"
- "error_rate"
- "latency_ms"
- "cost_usd"
model?string
name*string
Alert rule display name
Length
1 <= lengthoperator*string
Value in
- "gt"
- "gte"
- "lt"
- "lte"
release?string
service?string
threshold*number
Format
double