Skip to main content
An AO Webhook gives your organization its own signed ingest endpoint. Any system that can make an HTTPS request — a deploy script, a CI job, an internal service — can send events to AO through it. No client library is required: a request is a JSON body plus two headers. You can create as many AO Webhooks as you like, for example one per source system or environment. Each has its own install ID, secret, and deduplication namespace.

Create a webhook

In AO Cloud, open Integrations, choose AO Webhook, and create it. AO shows three values: You can reveal or rotate the secret later from the installed integrations list. Rotating takes effect immediately: requests signed with the previous secret are rejected, so update your sender at the same time.

Sign each request

Every request carries a timestamp and a signature. The secret itself is never sent. To compute the signature:
  1. Build the string to sign: the X-AO-Timestamp value, a literal ., then the exact bytes of the request body.
  2. Compute HMAC-SHA256 over that string, keyed with the full signing secret as-is, including its whsec_ prefix. Do not decode or trim it.
  3. Hex-encode the digest in lowercase and prefix it with sha256=.
AO verifies the signature against the raw body it receives. Sign the same bytes you send: serialize the JSON once, then sign and send that string. Re-serializing after signing changes the bytes and the signature will not match. AO rejects a request whose timestamp is more than 5 minutes from its own clock, in either direction. Keep your sender’s clock in sync and sign each request, including retries, with a fresh timestamp.

Check your implementation

Your signing code should reproduce this signature exactly:

Examples

Each example sends one event. Set AO_WEBHOOK_URL to your endpoint URL and AO_WEBHOOK_SECRET to your signing secret. The Node.js example is an ES module: save it as a .mjs file.

The request body

The body is an ao.webhook.v1 envelope holding 1 to 500 records:
schema must be exactly ao.webhook.v1. The only record type accepted today is event. The full field list, with which fields are required, is in the reference below. A few rules catch most first attempts:
  • kind is a namespaced event kind: a namespace, one : or ., then a name, all lowercase, e.g. acme:deployment or deploy.completed. deployment alone is rejected.
  • Timestamps are RFC 3339, e.g. 2026-05-22T14:03:00Z. Omit closed_at while the event is still open. observed_at defaults to opened_at.
  • tags is an object of string keys to string values.
Unknown fields in a record are rejected rather than ignored, so a typo surfaces as an invalid_schema error instead of silently dropped data. For example, affected_selector is not part of ao.webhook.v1; use affected_entities.

Severity

Set an event’s severity with a severity tag. AO understands three levels: critical, warning, and info. Common synonyms such as error or warn are mapped onto them; the reference below lists every accepted value. Any other value (for example high) is kept as a tag but the event gets no severity, so it won’t rank or filter by severity.

Attach events to your infrastructure

affected_entities links an event to nodes in your infrastructure graph. Each reference names a graph kind and that kind’s identity tags:
  • The kind is a graph kind: Host, HostService, Service, and the others listed below. It is matched case-insensitively and stored in that spelling, so "service" becomes Service.
  • Identity tags must be the kind’s identity, not just any attribute. Values are canonicalized (lowercase; -, _, . and spaces collapse to -).
  • A reference that matches no node is reported, not silently dropped: the event is stored, and the reference appears in the MCP tool integration_unresolved_refs. Check a record before sending it with the MCP tool validate_event.
To attach an event to a host that runs the Toolkit, reference it by its host ID:
The host ID is derived per organization, so you can’t compute it yourself. Ask your AI assistant to call the AO MCP tool host_identity with the host’s name. It returns the host ID and the exact references for the host and its services. validate_event then checks your records against your graph without storing anything, and tells you which references would attach and which would be orphaned. AO normalizes the values in each reference the same way the Toolkit does. A reference that matches no node is still stored with the event, and also listed as unresolved, so a typo shows up instead of the event silently attaching to nothing. If the sender runs on a host with the Toolkit, sending through the Toolkit is simpler: it needs no secret, and "host_id": "self" or a hostname reference is filled in for you.

Updates and duplicates

Events are identified by source_event_id within a webhook. Sending a record with an ID the webhook has already sent updates that event instead of creating a new one, which makes retries safe. AO keeps the version with the latest observed_at, so when you update an event — for example to add closed_at — set observed_at to the time of the change. Two different webhooks can use the same source_event_id without colliding.

Responses

A successful request returns 200 with the number of records ingested:
If any record fails validation, the whole request is rejected and none are ingested. Errors return a JSON body with a stable code:
Every error code, its HTTP status, and its meaning are listed in the reference below. Retry internal_error and network failures. Retries are safe because records are deduplicated by source_event_id. Other errors will not succeed unchanged. Re-sign each retry with a fresh timestamp.

Reference

This reference is generated from the code that validates requests, so it always matches what AO accepts. It covers both the AO Webhook and the Toolkit’s local intake. Signature errors (missing_signature, bad_signature, expired_timestamp) and install errors (not_found, revoked, type_not_accepted) apply to the webhook only.

Event record (ao.webhook.v1)

Envelope: {"schema": "ao.webhook.v1", "records": [ … ]}. Ingested record types: event. Recognized but not ingested yet (unsupported_type): graph.attribute_affirm, graph.attribute_remove, graph.edge, graph.edge_remove, graph.node, graph.node_remove, telemetry. Each affected_entities entry: kind must match ^[a-z][a-z0-9_-]*[:.][a-z][a-z0-9_-]+$.

Severity

Set tags.severity. These labels are recognized (case-insensitive); anything else leaves the event without a severity.

Limits

Error codes: AO Webhook

Errors answer {"error": {"code": "…", "message": "…"}}.

Error codes: toolkit socket

Errors answer {"error": {"code": "…", "message": "…"}}.

Host references

Cross-host keys (Local sources whose policy allows any_host. On the webhook, reference a host by host_id (host_identity returns it).): hostname, fqdn, instance_name, toolkit_id. Resolved at ingest to the one host with that value in the organization and stored as {“kind”:“Host”,“identity_tags”:{“host_id”:…}}. Zero or several matches: stored as sent and listed by integration_unresolved_refs (reason no_match / ambiguous).

Provenance tags

The toolkit sets these on every local event: