Contents

Developers

Webhooks

Receive each new response in real time on your server, n8n, Make or your CRM: delivery format, headers, signature verification, retries and best practices.

Two types of webhooks

  • Standard webhook: AikoBuilder sends the full response as signed JSON, always in the same format. It's the right choice for your own services and for automation tools (n8n, Make, Zapier). You create it in the admin (form › Integrations › “+ Standard webhook”) or through the API (POST /forms/{id}/webhooks, see the API reference).
  • Mapped webhook: AikoBuilder directly calls a third-party tool's API (CRM, email marketing…), in the format it expects: method, format (JSON, form or URL parameters), authentication and name of each parameter. You configure it in the admin, with a request preview and a test delivery: see the integrations guide.

The rest of this page describes the standard webhook.

When a delivery is sent

Each completed response triggers a delivery (submission.completed event) to each of the form's active webhooks. The response is saved before anything is sent: a failing webhook never causes a response to be lost. Each delivery is visible in the form's Delivery log tab (request, your server's response, duration, attempts), from where it can be resent.

Delivery format

POST to your URL, with a JSON body:

{
  "event": "submission.completed",
  "id": "dlv_01jcb…",
  "createdAt": "2026-11-02T10:15:30.000Z",
  "tenant": { "id": "org_…" },
  "form": { "id": "frm_01jc9…", "name": "Solar project", "version": 7 },
  "submission": {
    "id": "sub_01jcb…",
    "status": "completed",
    "locale": "fr",
    "startedAt": "2026-11-02T10:13:02.000Z",
    "completedAt": "2026-11-02T10:15:29.000Z",
    "answers": {
      "first_name": { "type": "short_text", "label": "Your first name?", "value": "Lucie" },
      "customer_type": {
        "type": "single_choice",
        "label": "You are…",
        "value": "b2c",
        "valueLabel": "An individual"
      },
      "email": { "type": "email", "label": "Email", "value": "lucie@example.com" },
      "roof_photos": {
        "type": "file_upload",
        "label": "Photos of your roof",
        "value": [
          {
            "id": "fil_01jcb…",
            "name": "roof.jpg",
            "mime": "image/jpeg",
            "size": 812345,
            "url": "https://form.aikobuilder.com/…",
            "expiresAt": "2026-11-03T10:15:30.000Z"
          }
        ]
      }
    },
    "hidden": { "utm_source": "google", "partner_id": "42" },
    "variables": { "score": 30 },
    "metadata": {
      "referrer": "https://www.google.com/",
      "userAgent": "Mozilla/5.0 …",
      "ip": "203.0.113.42",
      "host": "form.aikobuilder.com",
      "utm": { "utm_source": "google", "utm_campaign": "ete" },
      "page": { "id": "pag_…", "name": "Summer solar" },
      "abTest": null,
      "partners": {},
      "verified": []
    }
  }
}
  • answers is keyed by the field's technical key. value is the technical value (for a choice, the option's value; valueLabel gives its label). An open answer with AI follow-ups also has followUps: [{ "question", "answer" }], the questions asked by the AI and the person's replies, in order. Labels are in the form's default language.
  • hidden contains the hidden fields and metadata.utm the link's UTM parameters (see URL parameters).
  • metadata.ip is null if the form doesn't record the IP address; metadata.page is null outside a landing page.
  • metadata.partners: for each opt-in checkbox with a partner list (by key), the proof of the choice: { "listId", "listName", "accepted": [{ "name", "privacyUrl" }] }. The checkbox value (answers.<key>.value) is the list of accepted names. {} without such a checkbox.
  • metadata.verified: the keys of the Email and Phone questions verified with a code (Verifications add-on), [] otherwise.
  • metadata.abTest: for a form shown by an A/B test, the form running the test ({ "id", "name" }); form is then the variant that was filled in, with its own webhooks. null outside a test.
  • File links are signed and valid for 24 hours: download the files when you receive them, or later through the API (GET /files/{id}).
  • id identifies the delivery: it is identical to the Idempotency-Key header.

Ending screen offers

A webhook subscribed to the submission.offer_accepted (offer accepted, or other partners picked) and submission.offer_withdrawn (“Yes” cancelled on the page, or consent withdrawn from the admin) events receives, for each offer after submission, the same body as a response, plus offer:

"offer": {
  "id": "ofr_8k2x1q",
  "title": "Get the grants guide",
  "status": "accepted",
  "consent": "By accepting, you allow Soleo to contact you by email at l•••@example.com about this. You can withdraw your consent at any time.",
  "locale": "en",
  "channels": ["email"],
  "partners": null,
  "answeredAt": "2026-11-02T10:16:02.000Z",
  "withdrawnAt": null,
  "withdrawnBy": null
}
  • status: accepted or withdrawn (withdrawnBy: respondent if the person cancelled on the page, team if the consent was withdrawn from the admin).
  • consent is the text shown when choosing; the email and number are masked in it.
  • partners: the list and the accepted partners ({ "listId", "listName", "accepted": [{ "name", "privacyUrl" }] }), or null.
  • The delivery describes the offer at the time of the event: if the person changes their mind later, a new event is sent.

Events are chosen in the admin (“Events sent”) or when subscribing through the API (events).

Headers

Header Content
Content-Type application/json
User-Agent AikoBuilder-Webhook/1.0
X-AikoBuilder-Event submission.completed, submission.offer_accepted or submission.offer_withdrawn
X-AikoBuilder-Delivery Delivery ID
Idempotency-Key Delivery ID (the same one)
X-AikoBuilder-Timestamp Time the delivery was sent, in Unix seconds
X-AikoBuilder-Signature v1= followed by the HMAC-SHA256 in hexadecimal

The headers added to the subscription (the API's headers field, or “HTTP headers” in the admin) are sent as well.

Verify the signature

The signing secret (whsec_…) is shown only once, when the webhook is created; it can be regenerated in the admin. The signature is an HMAC-SHA256 computed with this secret over the string <timestamp>.<raw body>.

Always:

  1. compute the signature over the raw body, before parsing it as JSON;
  2. compare in constant time;
  3. reject a timestamp more than 5 minutes old (replay protection).
// Node.js
import { createHmac, timingSafeEqual } from "node:crypto";

export function verify(rawBody, headers, secret) {
  const timestamp = headers["x-aikobuilder-timestamp"];
  const signature = headers["x-aikobuilder-signature"] ?? "";
  if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
  const expected =
    "v1=" + createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  return (
    expected.length === signature.length &&
    timingSafeEqual(Buffer.from(expected), Buffer.from(signature))
  );
}
# Python
import hashlib, hmac, time

def verify(raw_body: bytes, headers, secret: str) -> bool:
    timestamp = headers["X-AikoBuilder-Timestamp"]
    if abs(time.time() - int(timestamp)) > 300:
        return False
    expected = "v1=" + hmac.new(
        secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, headers.get("X-AikoBuilder-Signature", ""))
// PHP
function verify(string $rawBody, array $headers, string $secret): bool {
    $timestamp = $headers['X-AikoBuilder-Timestamp'] ?? '';
    if (abs(time() - (int) $timestamp) > 300) return false;
    $expected = 'v1=' . hash_hmac('sha256', $timestamp . '.' . $rawBody, $secret);
    return hash_equals($expected, $headers['X-AikoBuilder-Signature'] ?? '');
}

Respond to a delivery

  • Respond with a 2xx code within 10 seconds. Do any long processing (CRM, emails…) after responding, in the background.
  • Redirects (3xx) are not followed: give the final address.
  • The same delivery can arrive twice (retry after a timeout, resend from the log): keep the Idempotency-Key values you've already processed and ignore duplicates.
  • A resend from the log creates a new delivery, with a new ID, for the same response (submission.id): deduplicate on submission.id if a response must only be processed once.

Retries

Your server's response What happens next
2xx Delivered
Network error, timeout (10 s), 408, 429 or 5xx Retry, up to 10 attempts, spaced 3 min × 2ⁿ apart (3 min, 6 min, 12 min… the last one about 25 h after the first)
Other 3xx or 4xx Immediate permanent failure (URL, authentication or format to fix)

After 10 consecutive permanent failures, the webhook is disabled and the space's owners are notified by email. The responses stay saved: once the problem is fixed, re-enable the webhook and use “Resend failures” in the delivery log.

Testing

In the admin, “Send a test” immediately sends the real request with test values (first name test-webhook, email test-webhook@example.com…), never a real respondent's response. The test appears in the delivery log as a test delivery.

Refused addresses

Private, local, link-local (including 169.254.169.254) and reserved network addresses are refused, both when saving and on each delivery. Your URL must be publicly reachable, preferably over HTTPS.

Example: n8n in 3 steps

  1. In n8n, add a Webhook node (POST method) and copy its production URL.
  2. In the form › Integrations › “+ Standard webhook”, paste the URL and save; keep the secret to verify the signature (Code node with the Node.js example above).
  3. “Send a test”: the test response appears in n8n; the answers are in body.submission.answers.<key>.value.

Without going through the admin, n8n can also create the subscription itself with an HTTP Request node calling POST https://api.aikobuilder.com/v1/forms/{id}/webhooks.