On this page
Update an alert rule
Change an alert rule using its current revision.
Operation ID: alerts.update.
Request
PATCH /api/v1/alerts/{alert_id}
- TypeScript SDK:
client.alerts.update(path arguments usepath). - MCP tool:
sdk_client_callwithoperationId: "alerts.update"(path arguments useinput.path). Legacy alias:alerts_update. Connect to your authenticated/mcpendpoint with an API key for the same environment. - Minimum API key role: admin.
- Idempotency: No header required; the resource or revision identifies the change.
Read resource IDs from earlier responses and use a key for the same environment.
Request example
Read alerts.list for the alert ID, current revision and rule. This raises the hourly spend threshold to USD 20 while retaining its existing destination. Send the complete desired rule with the current expected_revision.
Set CUMULUS_BASE_URL to your workspace API URL and CUMULUS_API_KEY to a key for that environment. Example values are synthetic.
cURL
curl --fail-with-body -sS -X PATCH "${CUMULUS_BASE_URL%/}/api/v1/alerts/${ALERT_ID}" \
-H "Authorization: Bearer $CUMULUS_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"expected_revision": 1,
"rule": {
"metric": "spend_usd_per_hour",
"threshold": "20.00",
"enabled": true,
"destination": {
"action": "keep"
}
}
}'
TypeScript
import { Cumulus } from "@cumulus/sdk";
const baseUrl = process.env.CUMULUS_BASE_URL;
const apiKey = process.env.CUMULUS_API_KEY;
if (!baseUrl || !apiKey) throw new Error("Set CUMULUS_BASE_URL and CUMULUS_API_KEY");
const client = new Cumulus({ baseUrl, apiKey });
const response = await client.alerts.update({
"path": {
"alert_id": "<alert_id>"
},
"body": {
"expected_revision": 1,
"rule": {
"metric": "spend_usd_per_hour",
"threshold": "20.00",
"enabled": true,
"destination": {
"action": "keep"
}
}
}
});
Input schema
Path, query and header parameters
alert_id
path parameter · Required.
Type: string (uuid). pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$.
JSON request body
| Field | Type or values | Required | Description and limits |
|---|---|---|---|
expected_revision | integer | Required | Revision you last read. A stale revision is refused so another edit is not overwritten. Greater than 0. At most 9007199254740991. |
rule | object | Required | — |
rule.metric | "spend_usd_per_hour" · "p95_latency_ms_1h" · "call_error_rate_24h" · "recording_failure_rate_24h" | Required | — |
rule.threshold | string | Required | pattern: ^(0|[1-9][0-9]*)(.[0-9]{1,12})?$. |
rule.enabled | boolean | Required | — |
rule.destination | object | Required | — |
| rule.destination · variant 1 | object | — | Fields for this schema branch. |
rule.destination.action | "keep" | Required | — |
| rule.destination · variant 2 | object | — | Fields for this schema branch. |
rule.destination.action | "replace" | Required | — |
rule.destination.value | object | Required | — |
| rule.destination.value · variant 1 | object | — | Fields for this schema branch. |
rule.destination.value.kind | "slack" | Required | — |
| rule.destination.value · variant 2 | object | — | Fields for this schema branch. |
rule.destination.value.kind | "pagerduty" | Required | — |
| rule.destination.value · variant 3 | object | — | Fields for this schema branch. |
rule.destination.value.kind | "webhook" | Required | — |
rule.destination.value.url | string (uri) | Required | maxLength: 4096. |
Complete OpenAPI schema
{
"parameters": [
{
"name": "alert_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlertsUpdateRequest"
}
}
}
}
}
Responses
HTTP 200
Change an alert rule (revision compare-and-set)
application/json
| Field | Type or values | Required | Description and limits |
|---|---|---|---|
scope | object | Required | — |
scope.owner_id | string | Required | minLength: 1. |
scope.environment | string | Required | minLength: 1. |
scope.tenant_id | string (uuid) | Required | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule | object | Required | — |
rule.id | string (uuid) | Required | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.revision | integer | Required | Greater than 0. At most 9007199254740991. |
rule.metric | string | Required | minLength: 1. |
rule.threshold | string | Required | minLength: 1. |
rule.destination | object | Required | — |
rule.destination.kind | "slack" · "pagerduty" · "webhook" · "unsupported" | Required | — |
rule.enabled | boolean | Required | — |
rule.deleted_at | string (date-time) or null | Required | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation | object | Required | — |
rule.evaluation.status | "pending" · "available" · "unavailable" | Required | — |
rule.evaluation.reason | "no_observations" · "incomplete_usage" · "incomplete_coverage" · "metric_unavailable" · "unsupported_metric" · "destination_unavailable" · "unsupported_destination" · "invalid_rule" or null | Required | — |
rule.evaluation.evaluated_at | string (date-time) or null | Required | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation.window | object or null | Required | — |
rule.evaluation.window.from | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation.window.to | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation.value | string or null | Required | pattern: ^(0|[1-9][0-9]*)(.[0-9]{1,12})?$. |
rule.evaluation.evidence | object or null | Required | — |
| rule.evaluation.evidence · variant 1 | object | — | Fields for this schema branch. |
rule.evaluation.evidence.kind | "usage_view" | Required in a non-null parent | — |
rule.evaluation.evidence.view | object | Required in a non-null parent | — |
rule.evaluation.evidence.view.schema_version | "1" | Required in a non-null parent | — |
rule.evaluation.evidence.view.scope | object | Required in a non-null parent | — |
rule.evaluation.evidence.view.scope.owner_id | string | Required in a non-null parent | minLength: 1. |
rule.evaluation.evidence.view.scope.environment | string | Required in a non-null parent | minLength: 1. |
rule.evaluation.evidence.view.scope.tenant_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.evaluation.evidence.view.window | object | Required in a non-null parent | — |
rule.evaluation.evidence.view.window.from | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation.evidence.view.window.to | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation.evidence.view.as_of | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.evaluation.evidence.view.snapshot | string | Required in a non-null parent | maxLength: 4096. pattern: ^[0-9]+:[0-9]+:(?:[0-9]+(?:,[0-9]+)*)?$. |
rule.evaluation.evidence.view.cohort | object | Required in a non-null parent | — |
rule.evaluation.evidence.view.cohort.observation_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.evaluation.evidence.view.cohort.sha256 | string | Required in a non-null parent | pattern: ^[a-f0-9]{64}$. |
rule.evaluation.evidence.basis | "declared_estimate" | Required in a non-null parent | — |
rule.evaluation.evidence.currency | "USD" | Required in a non-null parent | — |
rule.evaluation.evidence.coverage | "recorded_measurements_only" | Required in a non-null parent | — |
rule.evaluation.evidence.observation_count | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
| rule.evaluation.evidence · variant 2 | object | — | Fields for this schema branch. |
rule.evaluation.evidence.kind | "usage_statement" | Required in a non-null parent | — |
rule.evaluation.evidence.statement_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.evaluation.evidence.basis | "declared_estimate" | Required in a non-null parent | — |
rule.evaluation.evidence.currency | "USD" | Required in a non-null parent | — |
rule.evaluation.evidence.coverage | "recorded_measurements_only" | Required in a non-null parent | — |
rule.evaluation.evidence.observation_count | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
| rule.evaluation.evidence · variant 3 | object | — | Fields for this schema branch. |
rule.evaluation.evidence.kind | "gateway_attempt_latency" | Required in a non-null parent | — |
rule.evaluation.evidence.observation_count | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
| rule.evaluation.evidence · variant 4 | object | — | Fields for this schema branch. |
rule.evaluation.evidence.kind | "talos_metric" | Required in a non-null parent | — |
rule.evaluation.evidence.metric | "call_error_rate_24h" · "recording_failure_rate_24h" | Required in a non-null parent | — |
rule.evaluation.evidence.definition_version | 1 | Required in a non-null parent | — |
rule.evaluation.evidence.observation_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.evaluation.evidence.failed_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.evaluation.evidence.unknown_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.last_fired_at | string (date-time) or null | Required | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.blocked_by_delivery_id | string (uuid) or null | Required | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.latest_delivery | object or null | Required | — |
rule.latest_delivery.id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.latest_delivery.rule_revision | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
rule.latest_delivery.status | "pending" · "sending" · "delivered" · "cancelled" · "uncertain" | Required in a non-null parent | — |
rule.latest_delivery.destination_kind | "slack" · "pagerduty" · "webhook" | Required in a non-null parent | — |
rule.latest_delivery.destination_revision | string | Required in a non-null parent | minLength: 1. |
rule.latest_delivery.value | string | Required in a non-null parent | pattern: ^(0|[1-9][0-9]*)(.[0-9]{1,12})?$. |
rule.latest_delivery.threshold | string | Required in a non-null parent | pattern: ^(0|[1-9][0-9]*)(.[0-9]{1,12})?$. |
rule.latest_delivery.window | object | Required in a non-null parent | — |
rule.latest_delivery.window.from | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.window.to | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.evidence | object | Required in a non-null parent | — |
| rule.latest_delivery.evidence · variant 1 | object | — | Fields for this schema branch. |
rule.latest_delivery.evidence.kind | "usage_view" | Required in a non-null parent | — |
rule.latest_delivery.evidence.view | object | Required in a non-null parent | — |
rule.latest_delivery.evidence.view.schema_version | "1" | Required in a non-null parent | — |
rule.latest_delivery.evidence.view.scope | object | Required in a non-null parent | — |
rule.latest_delivery.evidence.view.scope.owner_id | string | Required in a non-null parent | minLength: 1. |
rule.latest_delivery.evidence.view.scope.environment | string | Required in a non-null parent | minLength: 1. |
rule.latest_delivery.evidence.view.scope.tenant_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.latest_delivery.evidence.view.window | object | Required in a non-null parent | — |
rule.latest_delivery.evidence.view.window.from | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.evidence.view.window.to | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.evidence.view.as_of | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.evidence.view.snapshot | string | Required in a non-null parent | maxLength: 4096. pattern: ^[0-9]+:[0-9]+:(?:[0-9]+(?:,[0-9]+)*)?$. |
rule.latest_delivery.evidence.view.cohort | object | Required in a non-null parent | — |
rule.latest_delivery.evidence.view.cohort.observation_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.latest_delivery.evidence.view.cohort.sha256 | string | Required in a non-null parent | pattern: ^[a-f0-9]{64}$. |
rule.latest_delivery.evidence.basis | "declared_estimate" | Required in a non-null parent | — |
rule.latest_delivery.evidence.currency | "USD" | Required in a non-null parent | — |
rule.latest_delivery.evidence.coverage | "recorded_measurements_only" | Required in a non-null parent | — |
rule.latest_delivery.evidence.observation_count | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
| rule.latest_delivery.evidence · variant 2 | object | — | Fields for this schema branch. |
rule.latest_delivery.evidence.kind | "usage_statement" | Required in a non-null parent | — |
rule.latest_delivery.evidence.statement_id | string (uuid) | Required in a non-null parent | pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$. |
rule.latest_delivery.evidence.basis | "declared_estimate" | Required in a non-null parent | — |
rule.latest_delivery.evidence.currency | "USD" | Required in a non-null parent | — |
rule.latest_delivery.evidence.coverage | "recorded_measurements_only" | Required in a non-null parent | — |
rule.latest_delivery.evidence.observation_count | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
| rule.latest_delivery.evidence · variant 3 | object | — | Fields for this schema branch. |
rule.latest_delivery.evidence.kind | "gateway_attempt_latency" | Required in a non-null parent | — |
rule.latest_delivery.evidence.observation_count | integer | Required in a non-null parent | Greater than 0. At most 9007199254740991. |
| rule.latest_delivery.evidence · variant 4 | object | — | Fields for this schema branch. |
rule.latest_delivery.evidence.kind | "talos_metric" | Required in a non-null parent | — |
rule.latest_delivery.evidence.metric | "call_error_rate_24h" · "recording_failure_rate_24h" | Required in a non-null parent | — |
rule.latest_delivery.evidence.definition_version | 1 | Required in a non-null parent | — |
rule.latest_delivery.evidence.observation_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.latest_delivery.evidence.failed_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.latest_delivery.evidence.unknown_count | integer | Required in a non-null parent | At least 0. At most 9007199254740991. |
rule.latest_delivery.created_at | string (date-time) | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.send_intent_at | string (date-time) or null | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.finished_at | string (date-time) or null | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
rule.latest_delivery.error_code | string or null | Required in a non-null parent | minLength: 1. |
rule.latest_delivery.acknowledged_at | string (date-time) or null | Required in a non-null parent | pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:.\d+)?(?:Z|(+-:[0-5]\d)))$. |
Error responses
| HTTP | Description |
|---|---|
| 4XX | Typed error (ApiError) |
| 5XX | Typed error (ApiError) |
Errors use the shared error envelope. Inspect error.code, retryable, outcome and details before retrying.
Complete OpenAPI schema
{
"200": {
"description": "Change an alert rule (revision compare-and-set)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AlertsAcknowledgeResponse200"
}
}
}
},
"4XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Typed error (ApiError)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
Referenced schemas
Expand the complete OpenAPI definitions for integrations that generate their own clients.
Complete OpenAPI schema
{
"components": {
"schemas": {
"AlertsUpdateRequest": {
"type": "object",
"properties": {
"expected_revision": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
},
"rule": {
"type": "object",
"properties": {
"metric": {
"type": "string",
"enum": [
"spend_usd_per_hour",
"p95_latency_ms_1h",
"call_error_rate_24h",
"recording_failure_rate_24h"
]
},
"threshold": {
"type": "string",
"pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$"
},
"enabled": {
"type": "boolean"
},
"destination": {
"oneOf": [
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"keep"
]
}
},
"required": [
"action"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"replace"
]
},
"value": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"slack"
]
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"pagerduty"
]
}
},
"required": [
"kind"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"webhook"
]
},
"url": {
"type": "string",
"maxLength": 4096,
"format": "uri"
}
},
"required": [
"kind",
"url"
],
"additionalProperties": false
}
]
}
},
"required": [
"action",
"value"
],
"additionalProperties": false
}
]
}
},
"required": [
"metric",
"threshold",
"enabled",
"destination"
],
"additionalProperties": false
}
},
"required": [
"expected_revision",
"rule"
],
"additionalProperties": false
},
"AlertsAcknowledgeResponse200": {
"type": "object",
"properties": {
"scope": {
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"owner_id",
"environment",
"tenant_id"
],
"additionalProperties": false
},
"rule": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"revision": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
},
"metric": {
"type": "string",
"minLength": 1
},
"threshold": {
"type": "string",
"minLength": 1
},
"destination": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"slack",
"pagerduty",
"webhook",
"unsupported"
]
}
},
"required": [
"kind"
],
"additionalProperties": false
},
"enabled": {
"type": "boolean"
},
"deleted_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"evaluation": {
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"pending",
"available",
"unavailable"
]
},
"reason": {
"nullable": true,
"type": "string",
"enum": [
"no_observations",
"incomplete_usage",
"incomplete_coverage",
"metric_unavailable",
"unsupported_metric",
"destination_unavailable",
"unsupported_destination",
"invalid_rule"
]
},
"evaluated_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"window": {
"nullable": true,
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"value": {
"nullable": true,
"type": "string",
"pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$"
},
"evidence": {
"nullable": true,
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"usage_view"
]
},
"view": {
"type": "object",
"properties": {
"schema_version": {
"type": "string",
"enum": [
"1"
]
},
"scope": {
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"owner_id",
"environment",
"tenant_id"
],
"additionalProperties": false
},
"window": {
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"as_of": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"snapshot": {
"type": "string",
"maxLength": 4096,
"pattern": "^[0-9]+:[0-9]+:(?:[0-9]+(?:,[0-9]+)*)?$"
},
"cohort": {
"type": "object",
"properties": {
"observation_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"observation_count",
"sha256"
],
"additionalProperties": false
}
},
"required": [
"schema_version",
"scope",
"window",
"as_of",
"snapshot",
"cohort"
],
"additionalProperties": false
},
"basis": {
"type": "string",
"enum": [
"declared_estimate"
]
},
"currency": {
"type": "string",
"enum": [
"USD"
]
},
"coverage": {
"type": "string",
"enum": [
"recorded_measurements_only"
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"view",
"basis",
"currency",
"coverage",
"observation_count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"usage_statement"
]
},
"statement_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"basis": {
"type": "string",
"enum": [
"declared_estimate"
]
},
"currency": {
"type": "string",
"enum": [
"USD"
]
},
"coverage": {
"type": "string",
"enum": [
"recorded_measurements_only"
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"statement_id",
"basis",
"currency",
"coverage",
"observation_count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"gateway_attempt_latency"
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"observation_count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"talos_metric"
]
},
"metric": {
"type": "string",
"enum": [
"call_error_rate_24h",
"recording_failure_rate_24h"
]
},
"definition_version": {
"type": "number",
"enum": [
1
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"failed_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"unknown_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"metric",
"definition_version",
"observation_count",
"failed_count",
"unknown_count"
],
"additionalProperties": false
}
]
}
},
"required": [
"status",
"reason",
"evaluated_at",
"window",
"value",
"evidence"
],
"additionalProperties": false
},
"last_fired_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"blocked_by_delivery_id": {
"nullable": true,
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"latest_delivery": {
"nullable": true,
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"rule_revision": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
},
"status": {
"type": "string",
"enum": [
"pending",
"sending",
"delivered",
"cancelled",
"uncertain"
]
},
"destination_kind": {
"type": "string",
"enum": [
"slack",
"pagerduty",
"webhook"
]
},
"destination_revision": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string",
"pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$"
},
"threshold": {
"type": "string",
"pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,12})?$"
},
"window": {
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"evidence": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"usage_view"
]
},
"view": {
"type": "object",
"properties": {
"schema_version": {
"type": "string",
"enum": [
"1"
]
},
"scope": {
"type": "object",
"properties": {
"owner_id": {
"type": "string",
"minLength": 1
},
"environment": {
"type": "string",
"minLength": 1
},
"tenant_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
}
},
"required": [
"owner_id",
"environment",
"tenant_id"
],
"additionalProperties": false
},
"window": {
"type": "object",
"properties": {
"from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"from",
"to"
],
"additionalProperties": false
},
"as_of": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"snapshot": {
"type": "string",
"maxLength": 4096,
"pattern": "^[0-9]+:[0-9]+:(?:[0-9]+(?:,[0-9]+)*)?$"
},
"cohort": {
"type": "object",
"properties": {
"observation_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"required": [
"observation_count",
"sha256"
],
"additionalProperties": false
}
},
"required": [
"schema_version",
"scope",
"window",
"as_of",
"snapshot",
"cohort"
],
"additionalProperties": false
},
"basis": {
"type": "string",
"enum": [
"declared_estimate"
]
},
"currency": {
"type": "string",
"enum": [
"USD"
]
},
"coverage": {
"type": "string",
"enum": [
"recorded_measurements_only"
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"view",
"basis",
"currency",
"coverage",
"observation_count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"usage_statement"
]
},
"statement_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$"
},
"basis": {
"type": "string",
"enum": [
"declared_estimate"
]
},
"currency": {
"type": "string",
"enum": [
"USD"
]
},
"coverage": {
"type": "string",
"enum": [
"recorded_measurements_only"
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"statement_id",
"basis",
"currency",
"coverage",
"observation_count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"gateway_attempt_latency"
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"observation_count"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"talos_metric"
]
},
"metric": {
"type": "string",
"enum": [
"call_error_rate_24h",
"recording_failure_rate_24h"
]
},
"definition_version": {
"type": "number",
"enum": [
1
]
},
"observation_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"failed_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"unknown_count": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"metric",
"definition_version",
"observation_count",
"failed_count",
"unknown_count"
],
"additionalProperties": false
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"send_intent_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"finished_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"error_code": {
"nullable": true,
"type": "string",
"minLength": 1
},
"acknowledged_at": {
"nullable": true,
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"id",
"rule_revision",
"status",
"destination_kind",
"destination_revision",
"value",
"threshold",
"window",
"evidence",
"created_at",
"send_intent_at",
"finished_at",
"error_code",
"acknowledged_at"
],
"additionalProperties": false
}
},
"required": [
"id",
"revision",
"metric",
"threshold",
"destination",
"enabled",
"deleted_at",
"evaluation",
"last_fired_at",
"blocked_by_delivery_id",
"latest_delivery"
],
"additionalProperties": false
}
},
"required": [
"scope",
"rule"
],
"additionalProperties": false
},
"ApiError": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"unauthenticated",
"forbidden",
"not_found",
"conflict",
"invalid_request",
"idempotency_conflict",
"policy_denied",
"capability_unavailable",
"provider_unavailable",
"knowledge_unavailable",
"publication_invalid",
"run_not_active",
"rate_limited",
"outcome_unknown",
"internal"
]
},
"message": {
"type": "string"
},
"retryable": {
"type": "boolean"
},
"outcome": {
"type": "string",
"enum": [
"none",
"unknown"
]
},
"details": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"code",
"message",
"retryable",
"outcome"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
Errors and recovery
See API error handling and Troubleshooting.