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:
- Build the string to sign: the
X-AO-Timestampvalue, a literal., then the exact bytes of the request body. - Compute HMAC-SHA256 over that string, keyed with the full signing
secret as-is, including its
whsec_prefix. Do not decode or trim it. - Hex-encode the digest in lowercase and prefix it with
sha256=.
Check your implementation
Your signing code should reproduce this signature exactly:Examples
Each example sends one event. SetAO_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 anao.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:
kindis a namespaced event kind: a namespace, one:or., then a name, all lowercase, e.g.acme:deploymentordeploy.completed.deploymentalone is rejected.- Timestamps are RFC 3339, e.g.
2026-05-22T14:03:00Z. Omitclosed_atwhile the event is still open.observed_atdefaults toopened_at. tagsis an object of string keys to string values.
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 aseverity 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"becomesService. - 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 toolvalidate_event.
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 bysource_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 returns200 with the number of records ingested:
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
Settags.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).