November 24, 2026
Webhooks for API events
What a webhook is
A webhook is AEOTrack calling a URL of yours when something happens on the Developer API: an AI answer check finishes, the balance runs low, a key is rotated, access changes. Your system does not have to keep asking the API.
Owners and admins of the account manage webhooks under Developers → Webhooks. Sandbox and Production have their own endpoints.
These webhooks are separate from the Slack, Microsoft Teams, Zapier and custom webhook connections under Integrations, which send score alerts for one website and are signed in a different way. Those are described in Microsoft Teams, custom webhooks and the Zapier events.
Add an endpoint
You can add an endpoint for an environment once access for that environment is Active.
- Open Developers → Webhooks.
- Under Sandbox endpoints or Production endpoints, choose Add endpoint.
- Enter the URL. The rules for it are in the table below.
- Add a Description if you want, such as the system that receives the events.
- Under Events to send, tick the events this endpoint should get.
- Choose Add endpoint and confirm with the six-digit code from your authenticator app. See Second sign-in factor for API keys.
- Copy the signing secret and store it somewhere safe. It is shown once.
| Rule | Figure |
|---|---|
| Endpoints in each environment | Up to 5 |
| The URL starts with | https:// |
| The host | Reachable from the internet. A private or internal address is refused |
| The port | 443, 8443 or 8080 |
| The description | Up to 120 characters |
| The signing secret starts with | aeo_whk_ |
After you save, the app shows only the host of the URL and its last four characters. AEOTrack stores the URL encrypted.
An endpoint gets only the events you tick, and only events that happen after it was added and while it is on. When AEOTrack adds a new kind of event, it is off for your endpoint until you tick it.
The events
| Event | Sent in | When |
|---|---|---|
answer_check.completed | Sandbox and Production | An AI answer check finished |
site_audit.completed | Sandbox and Production | A site audit finished |
access.updated | Sandbox and Production | API access for the environment changed: it was given, changed, turned off or ended, or a request was not approved |
access.ending | Sandbox and Production | API access for the environment is close to its end date |
key.rotated | Sandbox and Production | An API key was replaced by a new one |
key.expiring | Sandbox and Production | An API key is close to its expiry date |
key.revoked | Sandbox and Production | An API key was revoked |
balance.low | Production | The API balance fell below the account's low-balance figure |
balance.depleted | Production | The API balance is used up |
balance.credited | Production | Credit was added to the API balance |
auto_recharge.failed | Production | An automatic charge for the API balance failed |
ping is the test event. It is sent only when you choose Send test event.
What is sent
Each event is one POST with a JSON body. The body always has the same five fields.
{
"id": "evt_sandbox_0001",
"type": "answer_check.completed",
"created": "2026-11-24T06:45:00Z",
"environment": "sandbox",
"data": {
"id": "chk_sandbox_0001",
"status": "completed",
"client_ref": "weekly-report",
"engines_answered": 2,
"charged": null,
"result_url": "/api/v1/answer-checks/chk_sandbox_0001"
}
}
| Field | Meaning |
|---|---|
id | The event's id. It is the same on every retry |
type | What happened |
created | When it happened, in UTC |
environment | sandbox or live. Production is live |
data | The facts of the event: ids, states, amounts and dates |
Events are thin. data never holds a question, an answer, a key or a price list. To get a result, call the API. For a finished check or audit, result_url is the path to read.
The headers
| Header | What it is |
|---|---|
Content-Type | application/json |
User-Agent | AEOTrack-Webhooks/1 |
X-AEOTrack-Event | The event's type, the same as type in the body |
X-AEOTrack-Delivery | The id of this delivery to your endpoint. It is the same across retries. Quote it when you write to support |
X-AEOTrack-Signature | t=<unix seconds>,v1=<hex>: when the message was signed, and the signature to check |
Check the signature
Anyone can send a request to your URL, so check each one before you trust it.
Keep the signing secret in an environment variable or a secret store, never in code. The examples below read it from AEOTRACK_WEBHOOK_SECRET.
- Keep the raw body exactly as it arrived, before any JSON parsing.
- Read
tandv1from theX-AEOTrack-Signatureheader. - Refuse the message when
tis more than 300 seconds from your clock. This stops an old message from being sent to you again by someone else. - Work out the HMAC-SHA256 of
t + "." + raw body, with the signing secret as the key, written in hex. - Compare your result with
v1in constant time. If they differ, answer400and do nothing else.
In Node.js
import { createHmac, timingSafeEqual } from "node:crypto";
// rawBody: the request body as a Buffer, exactly as it arrived.
// header: the value of the X-AEOTrack-Signature header.
export function signatureIsValid(rawBody, header) {
const parts = {};
for (const part of String(header || "").split(",")) {
const at = part.indexOf("=");
if (at > 0) parts[part.slice(0, at).trim()] = part.slice(at + 1).trim();
}
const timestamp = Number(parts.t);
if (!Number.isInteger(timestamp) || Math.abs(Date.now() / 1000 - timestamp) > 300) return false;
const expected = createHmac("sha256", process.env.AEOTRACK_WEBHOOK_SECRET)
.update(parts.t + ".")
.update(rawBody)
.digest("hex");
const given = Buffer.from(String(parts.v1 || ""), "utf8");
const wanted = Buffer.from(expected, "utf8");
return given.length === wanted.length && timingSafeEqual(given, wanted);
}
In Python
import hashlib
import hmac
import os
import time
def signature_is_valid(raw_body: bytes, header: str) -> bool:
"""raw_body: the request body exactly as it arrived. header: X-AEOTrack-Signature."""
parts = dict(part.strip().split("=", 1) for part in (header or "").split(",") if "=" in part)
try:
timestamp = int(parts.get("t", ""))
except ValueError:
return False
if abs(time.time() - timestamp) > 300:
return False
secret = os.environ["AEOTRACK_WEBHOOK_SECRET"].encode()
expected = hmac.new(secret, f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts.get("v1", ""))
A complete receiver in both languages is in the app, in the webhooks guide under Developers → Docs.
Answer within 8 seconds
Answer with any 2xx status within 8 seconds. Take the event, answer, and do the work afterwards.
Anything else counts as a failed attempt: another status, no answer in time, or a redirect. A redirect is not followed. What your endpoint writes in its answer is not kept.
Retries
When an attempt fails, the event is sent again, up to 7 attempts in all.
| Attempt | When it is made |
|---|---|
| 1 | Soon after the event. Waiting deliveries are sent every 5 minutes |
| 2 | 5 minutes after attempt 1 failed |
| 3 | 15 minutes after attempt 2 failed |
| 4 | 1 hour after attempt 3 failed |
| 5 | 3 hours after attempt 4 failed |
| 6 | 8 hours after attempt 5 failed |
| 7 | 24 hours after attempt 6 failed |
After attempt 7 the delivery is marked failed for good. You can still send it again yourself from the delivery log.
An event can arrive more than once. If your answer does not reach AEOTrack, the same event is sent again. Its id is the same every time: keep the ids you have handled, and skip one you have seen. Events can also arrive out of order, so use created, and read the current state from the API when the order matters.
When an endpoint is turned off
After 20 failed deliveries in a row, AEOTrack turns the endpoint off.
- The owners and admins of the account get one email. For a Production endpoint, its subject is "A Production webhook endpoint on your AEOTrack account was turned off".
- Deliveries that were waiting are marked failed.
- Events that happen while the endpoint is off are not sent later.
To turn it on again:
- Fix your endpoint.
- Under Developers → Webhooks, choose Send test event and check that it is delivered. A test can be sent to an endpoint that is off.
- Choose Turn on.
Each endpoint shows its state: Working, Failing with the number of failures in a row and the last error, or Off with the reason.
You can turn an endpoint off yourself with Turn off. The AEOTrack team can turn one off too. No email is sent in that case, the endpoint shows that it was turned off by our team, and you can turn it on again.
The delivery log
Choose Deliveries on an endpoint to see what was sent to it, newest first.
| Column | What it shows |
|---|---|
| Time | When the delivery was queued |
| Event | The event's type |
| Status | Delivered, Waiting to be sent, Failed, will be tried again or Failed |
| Attempts | How many attempts were made |
| Response | The status your endpoint answered with, such as HTTP 500 |
| Time taken | How long your endpoint took to answer |
| Error | A short reason in AEOTrack's own words, such as "timed out" or "redirect not followed" |
| Next try | When the next attempt is planned |
A delivery that failed for good has a Send again button. The same event goes again within a few minutes, with the same event id and a new signature. The endpoint has to be on.
Events and the delivery log are kept for 30 days.
Send a test event
Send test event sends a signed ping to the endpoint now, and the app shows how it went: delivered, or the error and how long it took. The test is listed in the delivery log. It does not count toward the 20 failures in a row.
Use it after you add an endpoint, and after any change on your side.
Change or delete an endpoint
- Edit changes the URL, the description and the events. A new URL asks for the code from your authenticator app. Changing only the events or the description does not.
- New signing secret makes a new secret and shows it once. The old secret stops working at once, so put the new one in your system straight away. It asks for the code from your authenticator app.
- Turn off stops deliveries and keeps the endpoint. Turn on starts them again.
- Delete removes the endpoint. It cannot be undone.
Turning off and deleting never ask for a code.
What the AEOTrack team can see
The team sees that an endpoint exists, the host of its URL and the last four characters. It never sees the full URL, the signing secret or what an event carried.