Webhooks
CHANGENTS.AI sends a signed HTTPS POST to your endpoint when something happens in your account. Manage endpoints on /developer, under API Reference → Webhooks, or through /api/developer/webhooks.
Events
| Event | When |
|---|---|
run.finished | A run reached completed, partial, failed or cancelled. |
approval.required | A run stopped at a human-in-the-loop gate and is waiting for someone. |
shipment.rerouted | A reviewer approved a reroute in the Control Tower; the shipment follows the new route. |
shipment.reroute_undone | An applied reroute was undone within its 30-minute window. |
camera.alert | A camera check found objects in an alert zone. |
safety.incident | A workplace safety incident was opened (restricted zone, proximity, AI PPE judgement, or a report). |
device.alert | An IoT device breached a limit, was anomalous, or went offline. |
agent.health_alert | An agent's success rate fell below your line, or an approval waited too long. |
proving.failed | A set of your test cases re-run after a model change fell below its pass threshold. |
halt.created | An admin, or the health auto-halt rule, halted an agent, a workflow or every agent. |
halt.lifted | A halt was lifted. |
charter.changed | An agent charter moved between draft, review, active and retired. |
policy.changed | Your organisation's guardrail policy was changed. |
audit.exported | Someone exported the audit trail (who, which window, how many events, which agent filter). |
agent.budget_threshold | An agent reached 80% or 100% of its monthly credit cap. At 100% its next run is refused. |
handoff.requested | A visitor in a chat widget, or a caller on a phone line, asked for a person; a case was opened. |
outcome.recorded | A person recorded a billable outcome: money recovered on a dispute, or a case resolved. |
action.proposed | A change to a record in a connected system was proposed and waits for a person's approval. See Governed actions. |
action.approved | A person approved a change that your own system applies: the record and the exact change. |
action.committed | An approved change was written to the connected system. |
action.failed | An approved change could not be written; the reason is included. |
webhook.test | You pressed "Send test". Never sent otherwise. |
An endpoint with scope organisation (admins only) receives events for every member of the organisation.
The governance events (halt.*, charter.changed, policy.changed, audit.exported, agent.budget_threshold) are what a SIEM or GRC tool subscribes to. With the pull-side audit export they give you every control change as it happens.
Sinks
An endpoint has a kind:
| Kind | Body sent |
|---|---|
json | The signed envelope below, unchanged. Default. |
splunk_hec | {"time": <unix seconds>, "sourcetype": "changents:event", "source": "changents", "event": <envelope>}, the shape Splunk's HTTP Event Collector expects. |
Either kind may carry an authorization header value (for example Splunk <hec token>), stored encrypted and shown only as "set". The signature header is still sent, so you can verify the body as well as trust the token.
Request
POST /your/path HTTP/1.1
Content-Type: application/json
User-Agent: Changents-Webhooks/1.0
Changents-Signature: t=1790000000,v1=5f2b…
Changents-Event-Id: evt_3c1f…
Changents-Event-Type: run.finished
{"id":"evt_3c1f…","type":"run.finished","apiVersion":"2026-09-23",
"created":"2026-09-23T04:00:00.000Z",
"data":{"correlationId":"wf_…","agentType":"…","status":"completed","durationMs":41250}}Payloads carry ids and statuses, not run output. Fetch the run with GET /api/workflows/runs/{correlationId} when you need the result.
Verifying the signature
v1 is the hex HMAC-SHA256 of "<t>.<raw request body>", keyed with your endpoint's signing secret (whsec_…, shown once when you create or rotate it).
- Read the raw body before any JSON parsing.
- Recompute the HMAC and compare in constant time.
- Reject if
tis more than 300 seconds from your clock. - Deduplicate on
Changents-Event-Id— a retry reuses it.
const crypto = require('crypto');
function verify(secret, rawBody, header) {
const parts = Object.fromEntries(header.split(',').map(kv => kv.split('=')));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest();
const given = Buffer.from(parts.v1 || '', 'hex');
return given.length === expected.length && crypto.timingSafeEqual(given, expected);
}Signing works the same way in the other direction: a webhook trigger that starts one of your workflows can require requests to it to be signed with this scheme. See Signed webhook requests.
Delivery and retries
- Answer any
2xxwithin 10 seconds to acknowledge. Redirects are not followed. - Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h and 12 h (seven attempts over about 21 hours), then marked failed. You can redeliver a failed event from
/developerfor 30 days. - After 15 consecutive failed deliveries the endpoint is disabled, with the reason shown on
/developer. Re-enable it once your receiver is fixed.
Endpoint rules
httpsonly. URLs that resolve to private, loopback, link-local or internal addresses are refused, and the connection is pinned to the address we checked.- Up to 10 endpoints per user, and 10 per organisation.
Managing endpoints through the API
| Method | Path | What it does |
|---|---|---|
| GET | /api/developer/webhooks/events | The events you can subscribe to |
| GET | /api/developer/webhooks | Your endpoints, and your organisation's if you are an admin |
| POST | /api/developer/webhooks | Create: url, events, description, scope, kind, authorization. The signing secret is returned once |
| PATCH | /api/developer/webhooks/{id} | Change url, events, description, active |
| DELETE | /api/developer/webhooks/{id} | Delete; pending deliveries are abandoned |
| POST | /api/developer/webhooks/{id}/rotate-secret | A new signing secret, returned once |
| POST | /api/developer/webhooks/{id}/test | Send a webhook.test event |
| GET | /api/developer/webhooks/{id}/deliveries | Recent deliveries and their outcome |
| POST | /api/developer/webhooks/deliveries/{deliveryId}/retry | Redeliver one |