vike
Alerts API

Alerts API

Create, list, change and delete your alert rules, manage your notification channels and webhook secrets, read the events your rules produced and send a delivery again, over REST.

The 10 routes under /v1/alerts are the REST face of the alert tools: each runs the same code as its MCP tool, takes the same input and costs the same credits (Credits). They read and write the account your key belongs to, not one of the data products: no parameter names another user, and another user's rule or channel is a 404, the same answer as one that does not exist. The same rules can be made under Account → Alerts, with the same checks.

The JSON body is the tool's input

POST /v1/alerts/rules, POST /v1/alerts/rules/{alert_id}/edit and POST /v1/alerts/channels/webhooks take a JSON object whose fields are the tool's parameters, with the same names, types and meaning: the tool's table on Alerts is the field list, and the OpenAPI document carries it as each route's request body. The rule id of an edit is in the path, not the body. A field the tool does not take, or a value of the wrong JSON type, is a 400 naming the field. Every other route takes no body.

Errors

StatusWhen
400The rule or the body was refused; detail says what to change, in the words of the tool. A token the chain does not have is one: No token BTC on eth: an alert on it could never fire. Did you mean WBTC?
401No credential, or one that is not valid.
404The rule, channel or delivery is not yours, or does not exist (the same answer for both).
429The hourly budget or the per-minute cap is spent; see Rate limits.
503The account could not be read or written, or a rule's token could not be checked: nothing was stored. Ask again.

A call answered with an error costs nothing.

Secrets

Registering a webhook without a secret of your own, and rotating one, return the new signing secret once, in the answer, with Cache-Control: no-store; it is shown again on Account → Alerts → channels (Show secret), never by another route. The body of a call (a webhook URL, a secret) is not recorded in your account's usage history, which keeps the query string only. How a receiver checks the signature, the webhook body and every event shape are on Alert feed and webhooks and alerts_register_webhook.

On this page