Skip to main content

Outgoing webhooks

Antero posts signed JSON events to a URL you choose, such as Zapier, Make, n8n or your own server. This page has the exact request, every event body and how to verify it.

Who can use this: Admins and the Owner connect the webhook (integrations:manage). Anyone building the receiving end needs only this page.

Connect a webhook

  1. Open Workspace → Integrations → Outgoing webhook and click Add connection.
  2. Used for: All brands, or one brand to send that brand's events to a different URL.
  3. Endpoint URL: the full https:// address that will receive the events. It must resolve to a public address (see Public URL).
  4. Save. Copy the Signing secret shown at the top of the page (it starts with whsec_). It is shown only now.
  5. Click Send test. Antero posts a webhook.test event at once and shows your endpoint's answer.

Each event goes to one webhook: the brand's own if it has one, otherwise the one for all brands.

Signing secret

  • The secret is shown once, when the webhook is connected, and once each time you rotate it. Afterwards only its last four characters appear on the row.
  • Rotate secret makes a new one and the old one stops working at once. Deliveries still waiting for a retry are signed with the new secret, so update your endpoint straight after rotating.
  • Keep it on your server only. Anyone with the secret can forge events.

Request format

Every event is one HTTP POST with a JSON body.

Header Value
Content-Type application/json
User-Agent Antero-Webhook/1.0
X-Antero-Event The event name, such as form.submitted.
X-Antero-Delivery The delivery ID, also the body's id. The same on every retry.
X-Antero-Signature t=<unix time>,v1=<signature>: the hex HMAC-SHA256 of <t>.<raw body>, keyed with the signing secret.
POST /webhooks/antero HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: Antero-Webhook/1.0
X-Antero-Event: webhook.test
X-Antero-Delivery: 01k7f3x9q2m8v4n6r5t0w1y2z3
X-Antero-Signature: t=1791879302,v1=212fe263691b3c659c56dc92d92b8f63c291e65860c3a4a90528b0357a9498ee

The body is compact JSON on one line, with slashes and non-ASCII letters (such as é) left unescaped. The examples below are spread over several lines for reading only. The body is fixed when the event happens, so every retry sends exactly the same bytes; only t and the signature change.

The envelope

Field Type Meaning
id string The delivery ID: 26 lowercase letters and digits. Use it to skip repeats.
event string webhook.test, form.submitted, order.paid or automation.step.
created_at string When the event happened, ISO 8601 in UTC.
workspace object id, slug and name of the workspace.
brand object or null id, slug and name of the brand the event belongs to; null for webhook.test.
data object The event's own fields, below.

Events

There are four events. Answer any event you do not handle with a 2xx too, so it is not retried.

webhook.test

Sent when someone clicks Send test. The message is in the language of the person who clicked.

{
    "id": "01k7f3x9q2m8v4n6r5t0w1y2z3",
    "event": "webhook.test",
    "created_at": "2026-10-13T08:15:02+00:00",
    "workspace": { "id": 12, "slug": "aminah-group", "name": "Aminah Group" },
    "brand": null,
    "data": { "message": "This is a test event from Antero." }
}

form.submitted

Sent when someone submits a published lead form, after the contact and deal are made. Submissions caught as spam are not sent.

{
    "id": "01k7f4b2c8d9e0f1g2h3j4k5m6",
    "event": "form.submitted",
    "created_at": "2026-10-13T08:20:41+00:00",
    "workspace": { "id": 12, "slug": "aminah-group", "name": "Aminah Group" },
    "brand": { "id": 3, "slug": "aminah-catering", "name": "Aminah Catering" },
    "data": {
        "form": {
            "id": 7,
            "public_id": "01k6zq3w8e5r2t9y4v7x1n6p3a",
            "name": "Wedding enquiry"
        },
        "submission": {
            "id": 418,
            "created_at": "2026-10-13T08:20:41+00:00",
            "answers": [
                {
                    "key": "q_k3j9x2ma",
                    "label": "What is your name?",
                    "value": "Siti Aminah"
                },
                {
                    "key": "q_p8w2n5re",
                    "label": "Your phone number?",
                    "value": "012-345 6789"
                },
                {
                    "key": "q_b7v4c1zt",
                    "label": "Your email?",
                    "value": "siti@example.com"
                },
                {
                    "key": "q_m2x8k6qd",
                    "label": "Which dishes?",
                    "value": ["Nasi minyak", "Rendang"]
                },
                {
                    "key": "q_t5r9y3wa",
                    "label": "I agree to be contacted",
                    "value": true
                }
            ],
            "utm": { "utm_source": "facebook", "utm_campaign": "raya" },
            "referrer": "https://www.facebook.com/"
        },
        "contact": {
            "id": 2051,
            "name": "Siti Aminah",
            "email": "siti@example.com",
            "phone": "+60123456789",
            "company": null,
            "created": true
        },
        "deal": {
            "id": 311,
            "title": "Wedding enquiry: Siti Aminah",
            "stage": "New",
            "owner_id": 5
        }
    }
}
  • answers lists every question in order, with its key, label and value as typed. A value is a string (numbers and dates too, dates as YYYY-MM-DD), a list of strings for tick boxes (empty when none was ticked), true or false for a consent box, or null when the question was skipped.
  • utm holds the utm_source, utm_medium, utm_campaign, utm_term and utm_content the visitor came with, or is null. referrer is the page they came from, or null.
  • contact is the contact the submission was matched to or made (created is true for a new one), or null when no contact was made (the form saves no contact details, or the plan's contact limit was reached). Phones are in international format.
  • deal is the deal the form opened, or null when the form opens none. owner_id is the member it was given to, or null.

order.paid

Sent when an order in your online shop is paid and has become an invoice. See Shop orders.

{
    "id": "01k7f6a1b2c3d4e5f6g7h8j9k0",
    "event": "order.paid",
    "created_at": "2026-10-13T09:02:17+00:00",
    "workspace": { "id": 12, "slug": "aminah-group", "name": "Aminah Group" },
    "brand": { "id": 3, "slug": "aminah-catering", "name": "Aminah Catering" },
    "data": {
        "order": {
            "number": 1005,
            "total": "70.00",
            "currency": "MYR",
            "delivery": "Delivery in Peninsular Malaysia",
            "discount_code": null,
            "url": "https://cerdik.host/o/Xb7Q2kLm9Pz4Rt8Wv3Yc6Hn1Jd5Fs0Ga2Ke7Mu4N",
            "paid_at": "2026-10-13T09:02:11+00:00"
        },
        "buyer": {
            "name": "Daniel Lee",
            "email": "daniel.lee@example.com",
            "phone": "+60151100998"
        },
        "lines": [
            {
                "description": "Sambal hijau",
                "sku": "SMB-HIJ",
                "quantity": 4,
                "total": "60.00"
            }
        ]
    }
}
  • total and each line's total are in ringgit, including SST, as strings with two decimals.
  • url is the buyer's order page. discount_code is the code used, or null.

automation.step

Sent when an automation run reaches a Post to your webhook step. The step is skipped (and logged on the run) when no webhook is connected.

{
    "id": "01k7f5h6j7k8m9n0p1q2r3s4t5",
    "event": "automation.step",
    "created_at": "2026-10-13T08:21:05+00:00",
    "workspace": { "id": 12, "slug": "aminah-group", "name": "Aminah Group" },
    "brand": { "id": 3, "slug": "aminah-catering", "name": "Aminah Catering" },
    "data": {
        "automation": { "id": 14, "name": "Welcome new leads", "run_id": 902 },
        "contact": {
            "id": 2051,
            "name": "Siti Aminah",
            "email": "siti@example.com",
            "phone": "+60123456789",
            "company": null,
            "source": "Wedding enquiry",
            "lead_score": 72,
            "tags": ["Wedding", "Hot lead"],
            "custom_fields": { "guests": "300" }
        },
        "trigger": {
            "form_id": 7,
            "form": "Wedding enquiry",
            "submission_id": 418
        }
    }
}
  • contact is read when the step runs, so it includes tags and fields earlier steps changed. lead_score is 0 to 100, or null when the contact has not been scored. custom_fields is {} when there are none.
  • trigger is what started the run, depending on the automation's Starts when:
Starts when trigger fields
A form is submitted form_id, form, submission_id
A tag is added tag_ids (a list)
A contact is created via: manual, form, booking, webhook, meta_ads, google_ads, tiktok_ads, whatsapp or sms
A deal moves to a stage deal_id, deal, from_stage, stage
An appointment is booked appointment_id, appointment, starts_at
A message arrives message (up to 500 characters), channel (whatsapp or sms)
Another app calls a webhook payload: the fields that app sent, see Automation webhook trigger
It is the contact’s birthday year
An invoice is paid in full, An invoice becomes overdue invoice_id, invoice_number, amount, amount_due, currency, due_date, invoice_url
A lead ad is submitted campaign, ad, form
A quotation is accepted quotation_id, quotation_number, amount, deposit, currency, quotation_url
A shop order is placed, paid, shipped or left unpaid order_number, order_total, order_items, order_url, delivery_method, tracking_url, shop_url

Amounts are strings such as "1,250.00" in the document's currency.

Verify the signature

Verify every request before you trust it:

  1. Read the raw body exactly as received. Do not parse and re-encode the JSON first: any change in spacing or escaping breaks the signature.
  2. Split X-Antero-Signature on commas into t and v1.
  3. Compute the hex HMAC-SHA256 of t, a full stop and the raw body, keyed with your signing secret.
  4. Compare it with v1 in constant time.
  5. Refuse it when t is more than 300 seconds from your clock, so an old request cannot be replayed.

PHP

<?php

function antero_verify(string $body, string $header, string $secret, int $tolerance = 300): bool
{
    $parts = [];

    foreach (explode(',', $header) as $item) {
        [$key, $value] = array_pad(explode('=', trim($item), 2), 2, '');
        $parts[$key] = $value;
    }

    $t = $parts['t'] ?? '';
    $v1 = $parts['v1'] ?? '';

    if (! ctype_digit($t) || $v1 === '' || abs(time() - (int) $t) > $tolerance) {
        return false;
    }

    return hash_equals(hash_hmac('sha256', $t.'.'.$body, $secret), $v1);
}

$secret = (string) getenv('ANTERO_WEBHOOK_SECRET'); // whsec_...
$body = file_get_contents('php://input'); // the raw body, exactly as sent
$header = $_SERVER['HTTP_X_ANTERO_SIGNATURE'] ?? '';

if (! antero_verify($body, $header, $secret)) {
    http_response_code(401);
    exit;
}

$event = json_decode($body, true);

// $event['id'] is the delivery ID: skip it if you have handled it before.
// Then act on $event['event'] and $event['data'], or queue the work.

http_response_code(204);

In Laravel, use $request->getContent() for the body and $request->header('X-Antero-Signature') for the header.

Node.js

With Express, read the body with express.raw so it stays the exact bytes Antero signed:

const crypto = require('node:crypto');
const express = require('express');

const app = express();
const secret = process.env.ANTERO_WEBHOOK_SECRET; // whsec_...

function verifyAntero(rawBody, header, secret, toleranceSeconds = 300) {
    const parts = {};
    for (const item of String(header || '').split(',')) {
        const [key, ...rest] = item.trim().split('=');
        parts[key] = rest.join('=');
    }

    const t = parts.t || '';
    const v1 = parts.v1 || '';
    if (!/^\d+$/.test(t) || !/^[0-9a-f]{64}$/.test(v1)) {
        return false;
    }
    if (
        Math.abs(Math.floor(Date.now() / 1000) - Number(t)) > toleranceSeconds
    ) {
        return false;
    }

    const expected = crypto
        .createHmac('sha256', secret)
        .update(`${t}.`)
        .update(rawBody)
        .digest();

    return crypto.timingSafeEqual(expected, Buffer.from(v1, 'hex'));
}

// express.raw keeps the body as the exact bytes Antero signed.
app.post(
    '/webhooks/antero',
    express.raw({ type: 'application/json' }),
    (req, res) => {
        if (
            !Buffer.isBuffer(req.body) ||
            !verifyAntero(req.body, req.get('X-Antero-Signature'), secret)
        ) {
            return res.sendStatus(401);
        }

        const event = JSON.parse(req.body.toString('utf8'));

        // event.id is the delivery ID: skip it if you have handled it before.
        // Then act on event.event and event.data, or queue the work.

        res.sendStatus(204);
    },
);

app.listen(3000);

The regular expression checks that v1 is 64 hex characters, so both buffers are 32 bytes, as crypto.timingSafeEqual requires.

Python

With Flask, request.get_data() gives the raw body:

import hashlib
import hmac
import json
import os
import time

from flask import Flask, abort, request

app = Flask(__name__)
SECRET = os.environ["ANTERO_WEBHOOK_SECRET"]  # whsec_...


def verify_antero(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
    parts = {}
    for item in (header or "").split(","):
        key, _, value = item.strip().partition("=")
        parts[key] = value

    t = parts.get("t", "")
    v1 = parts.get("v1", "")
    if not (t.isascii() and t.isdigit()) or not v1:
        return False
    if abs(time.time() - int(t)) > tolerance:
        return False

    expected = hmac.new(secret.encode(), t.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected.encode(), v1.encode())


@app.post("/webhooks/antero")
def antero_webhook():
    raw_body = request.get_data()  # the raw body, exactly as sent
    if not verify_antero(raw_body, request.headers.get("X-Antero-Signature", ""), SECRET):
        abort(401)

    event = json.loads(raw_body)

    # event["id"] is the delivery ID: skip it if you have handled it before.
    # Then act on event["event"] and event["data"], or queue the work.

    return "", 204

Test your code

With the secret whsec_3Jk9QwZx7Lm2Vb8Nc4Rt6Yp1Hs5Df0Ga7Ke2Uq9W, this exact body:

{"id":"01k7f3x9q2m8v4n6r5t0w1y2z3","event":"webhook.test","created_at":"2026-10-13T08:15:02+00:00","workspace":{"id":12,"slug":"aminah-group","name":"Aminah Group"},"brand":null,"data":{"message":"This is a test event from Antero."}}

has this header:

X-Antero-Signature: t=1791879302,v1=212fe263691b3c659c56dc92d92b8f63c291e65860c3a4a90528b0357a9498ee

Its time is fixed, so turn off the 300-second check while you try it.

Respond

  • Answer with any 2xx status within 10 seconds (Antero waits at most 5 seconds to connect). The body of your answer is ignored.
  • Do the slow work after answering, for example on a queue.
  • Redirects are not followed. A 301 or 302 counts as a failure, so give the final URL (watch for http to https and trailing slashes).

Retries

A delivery that does not get a 2xx answer, or cannot connect, is tried again after 10 seconds, 1 minute, 5 minutes, 15 minutes and 1 hour: 6 attempts over about 80 minutes. After the sixth it is marked Failed, and the connection shows Failing with the last error until a later delivery or test succeeds.

  • An address that is not allowed (it resolves to a private network) fails at once, without retries.
  • The Send test event is tried once, without retries.
  • Disconnecting the webhook drops its deliveries, including any waiting for a retry.

Idempotency

A delivery can arrive more than once, for example when your server handled it but answered too late. X-Antero-Delivery (and the body's id) is the same on every attempt of a delivery. Store the IDs you have handled and skip repeats.

Deliveries log

Workspace → Integrations → Outgoing webhook shows Recent deliveries: the last 25 events sent to the workspace's webhooks, with the event, status (Pending, Delivered, Failed), attempts, your HTTP response code, when it was sent and the error. The payloads stay on the server. Deliveries are kept for 30 days, then deleted.

Public URL

The endpoint must resolve only to public internet addresses. Localhost, private networks (such as 10.x.x.x and 192.168.x.x) and cloud metadata addresses are refused when you save it and again at every delivery, and Antero connects to the address it checked. Use https:// so events are encrypted in transit; plain http:// is accepted. To try webhooks on your own computer, use a tunnel that gives you a public HTTPS address.

Troubleshooting

  • Every signature fails. You are probably hashing parsed and re-encoded JSON instead of the raw body, or using an old secret after a rotation.
  • Signatures fail only sometimes. Check your server clock: requests more than 300 seconds off are refused by the examples above.
  • Deliveries show HTTP 301 or 302. Use the final URL; redirects are not followed.
  • "Could not connect" in the log. Your endpoint did not answer within the time limits, or refused the connection.