Webhooks let you pipe Aegis governance events into your own systems, incident trackers, on-call tools, audit pipelines, or custom dashboards. When an event fires, Aegis sends a signed JSON payload to every registered endpoint. You verify the signature using your signing secret and process the event however your system needs.Documentation Index
Fetch the complete documentation index at: https://docs.runaegis.co/llms.txt
Use this file to discover all available pages before exploring further.
Add a webhook endpoint
Enter your endpoint URL
In the Endpoints card, paste your HTTPS endpoint URL into the input field. The URL must be publicly reachable by Aegis.
Supported events
Aegis forwards the following event types to your webhook endpoints:| Event | When it fires |
|---|---|
approval | An agent action has been held in the approval queue and is waiting for human review. |
denied | A policy blocked an agent action from executing. |
rewrite | Aegis redirected an agent action to a safer path, such as converting a direct push into a pull request. |
policy | A configured governance rule evaluated and fired on an agent action. |
anomaly | Aegis detected unusual behavior in an agent session. |
budget | Token spend reached 75%, 90%, or 100% of your configured budget cap. |
approval and denied events by default.
Webhook payload structure
Aegis delivers events as HTTP POST requests with aContent-Type: application/json header. Each payload includes the following fields:
| Field | Type | Description |
|---|---|---|
event | string | The event type: approval, denied, rewrite, policy, anomaly, or budget. |
timestamp | string | ISO 8601 timestamp of when the event occurred. |
agent_name | string | The name of the agent that triggered the event. |
tool_name | string | The GitHub MCP tool the agent called (e.g. create_pull_request, push_files). |
decision | string | The governance decision: ALLOW, DENY, REWRITE, or REQUIRE_APPROVAL. |
action_summary | string | A plain-language description of what the agent was trying to do. |
Verify webhook signatures
Every request Aegis sends includes anX-Aegis-Signature header. Use your signing secret to verify the header value before processing the payload, this confirms the request came from Aegis and was not tampered with in transit.
Your signing secret is displayed in the Signing secret card under Settings → Webhooks. It starts with whsec_.
The verification flow:
Read the raw request body
Capture the raw bytes of the POST body before parsing the JSON. Signature verification must run against the raw body, not a re-serialized version.
Compute an HMAC-SHA256 digest
Compute
HMAC-SHA256(raw_body, signing_secret) using your whsec_... value as the key.Rotate your signing secret
If your signing secret is exposed or you want to rotate it as part of regular key hygiene:- Go to Settings → Webhooks.
- In the Signing secret card, click Rotate.
- Copy the new
whsec_...value. - Update your signature verification code with the new secret.