Skip to content
SarvexDocs
Esc
↑↓navigate↵open⌘Jpreview

Acknowledge or resolve an alert

Forward-only: open -> acknowledged -> resolved, or open -> resolved directly. A backward or no-op transition (e.g. re-resolving an already-resolved alert) returns 409.

PATCH/alerts/{alert_id}
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in production; a simulator in test). The client obtains it and sends it as a Bearer token on every authenticated call. Sarvex's services verify it — issuer, audience, signature (IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue or revoke these tokens. merchant_id/store_id are read from the verified claims (and the merchant→store mapping), never from the URL. The operator scope is required for /operator/*. Operators acting on a specific merchant pass the X-Operate-As header, which is recorded in the audit log.

Path parameters
alert_idstringrequired
Request body
requiredapplication/json
statusstringrequired
Allowed:acknowledgedresolved
Responses
200

Updated alert.

alert_idstring
store_idstring
check_typestring
severitystring
Allowed:healthydegradedcritical
statusstring
Allowed:openacknowledgedresolved
detailstring
opened_atstring<date-time>
acknowledged_atstring<date-time> | null
acknowledged_bystring
resolved_atstring<date-time> | null
auto_resolvedboolean
404

Resource not found within the caller's tenant.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
409

The alert is not in a state that allows this transition.

errorobjectrequired
Show properties
codestringrequired
messagestringrequired
detailsobject | null
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH "https://api.sarvex.example.com/v1/alerts/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "acknowledged"
}'
Response
{
  "alert_id": "alt_01J8Z3...",
  "store_id": "string",
  "check_type": "signature_roundtrip",
  "severity": "healthy",
  "status": "open",
  "detail": "string",
  "opened_at": "2019-08-24T14:15:22Z",
  "acknowledged_at": "2019-08-24T14:15:22Z",
  "acknowledged_by": "string",
  "resolved_at": "2019-08-24T14:15:22Z",
  "auto_resolved": true
}