Skip to content
Back to the app

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 ​

EventWhen
run.finishedA run reached completed, partial, failed or cancelled.
approval.requiredA run stopped at a human-in-the-loop gate and is waiting for someone.
shipment.reroutedA reviewer approved a reroute in the Control Tower; the shipment follows the new route.
shipment.reroute_undoneAn applied reroute was undone within its 30-minute window.
camera.alertA camera check found objects in an alert zone.
safety.incidentA workplace safety incident was opened (restricted zone, proximity, AI PPE judgement, or a report).
device.alertAn IoT device breached a limit, was anomalous, or went offline.
agent.health_alertAn agent's success rate fell below your line, or an approval waited too long.
proving.failedA set of your test cases re-run after a model change fell below its pass threshold.
halt.createdAn admin, or the health auto-halt rule, halted an agent, a workflow or every agent.
halt.liftedA halt was lifted.
charter.changedAn agent charter moved between draft, review, active and retired.
policy.changedYour organisation's guardrail policy was changed.
audit.exportedSomeone exported the audit trail (who, which window, how many events, which agent filter).
agent.budget_thresholdAn agent reached 80% or 100% of its monthly credit cap. At 100% its next run is refused.
handoff.requestedA visitor in a chat widget, or a caller on a phone line, asked for a person; a case was opened.
outcome.recordedA person recorded a billable outcome: money recovered on a dispute, or a case resolved.
action.proposedA change to a record in a connected system was proposed and waits for a person's approval. See Governed actions.
action.approvedA person approved a change that your own system applies: the record and the exact change.
action.committedAn approved change was written to the connected system.
action.failedAn approved change could not be written; the reason is included.
webhook.testYou 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:

KindBody sent
jsonThe 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).

  1. Read the raw body before any JSON parsing.
  2. Recompute the HMAC and compare in constant time.
  3. Reject if t is more than 300 seconds from your clock.
  4. Deduplicate on Changents-Event-Id — a retry reuses it.
js
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 2xx within 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 /developer for 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 ​

  • https only. 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 ​

MethodPathWhat it does
GET/api/developer/webhooks/eventsThe events you can subscribe to
GET/api/developer/webhooksYour endpoints, and your organisation's if you are an admin
POST/api/developer/webhooksCreate: 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-secretA new signing secret, returned once
POST/api/developer/webhooks/{id}/testSend a webhook.test event
GET/api/developer/webhooks/{id}/deliveriesRecent deliveries and their outcome
POST/api/developer/webhooks/deliveries/{deliveryId}/retryRedeliver one

Served from this deployment. No page view leaves it.