How can AEOTrack help you?

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.

  1. Open Developers → Webhooks.
  2. Under Sandbox endpoints or Production endpoints, choose Add endpoint.
  3. Enter the URL. The rules for it are in the table below.
  4. Add a Description if you want, such as the system that receives the events.
  5. Under Events to send, tick the events this endpoint should get.
  6. Choose Add endpoint and confirm with the six-digit code from your authenticator app. See Second sign-in factor for API keys.
  7. Copy the signing secret and store it somewhere safe. It is shown once.
RuleFigure
Endpoints in each environmentUp to 5
The URL starts withhttps://
The hostReachable from the internet. A private or internal address is refused
The port443, 8443 or 8080
The descriptionUp to 120 characters
The signing secret starts withaeo_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

EventSent inWhen
answer_check.completedSandbox and ProductionAn AI answer check finished
site_audit.completedSandbox and ProductionA site audit finished
access.updatedSandbox and ProductionAPI access for the environment changed: it was given, changed, turned off or ended, or a request was not approved
access.endingSandbox and ProductionAPI access for the environment is close to its end date
key.rotatedSandbox and ProductionAn API key was replaced by a new one
key.expiringSandbox and ProductionAn API key is close to its expiry date
key.revokedSandbox and ProductionAn API key was revoked
balance.lowProductionThe API balance fell below the account's low-balance figure
balance.depletedProductionThe API balance is used up
balance.creditedProductionCredit was added to the API balance
auto_recharge.failedProductionAn 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"
  }
}
FieldMeaning
idThe event's id. It is the same on every retry
typeWhat happened
createdWhen it happened, in UTC
environmentsandbox or live. Production is live
dataThe 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

HeaderWhat it is
Content-Typeapplication/json
User-AgentAEOTrack-Webhooks/1
X-AEOTrack-EventThe event's type, the same as type in the body
X-AEOTrack-DeliveryThe id of this delivery to your endpoint. It is the same across retries. Quote it when you write to support
X-AEOTrack-Signaturet=<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.

  1. Keep the raw body exactly as it arrived, before any JSON parsing.
  2. Read t and v1 from the X-AEOTrack-Signature header.
  3. Refuse the message when t is more than 300 seconds from your clock. This stops an old message from being sent to you again by someone else.
  4. Work out the HMAC-SHA256 of t + "." + raw body, with the signing secret as the key, written in hex.
  5. Compare your result with v1 in constant time. If they differ, answer 400 and 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.

AttemptWhen it is made
1Soon after the event. Waiting deliveries are sent every 5 minutes
25 minutes after attempt 1 failed
315 minutes after attempt 2 failed
41 hour after attempt 3 failed
53 hours after attempt 4 failed
68 hours after attempt 5 failed
724 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:

  1. Fix your endpoint.
  2. Under Developers → Webhooks, choose Send test event and check that it is delivered. A test can be sent to an endpoint that is off.
  3. 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.

ColumnWhat it shows
TimeWhen the delivery was queued
EventThe event's type
StatusDelivered, Waiting to be sent, Failed, will be tried again or Failed
AttemptsHow many attempts were made
ResponseThe status your endpoint answered with, such as HTTP 500
Time takenHow long your endpoint took to answer
ErrorA short reason in AEOTrack's own words, such as "timed out" or "redirect not followed"
Next tryWhen 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.