POST to your root-level webhook_url whenever an accepted batch item reaches a successful or failed terminal state.
Batch Webhooks are separate from the single-task
callback_url workflow. They use an account-level signing secret and X-Apixo-Signature verification.Lifecycle
Step 1: Get the signing secret
secret is a shared signing secret:
- APIXO uses it to calculate an HMAC-SHA256 signature for each webhook request.
- Your service uses it to verify that the request came from APIXO and that its body was not modified.
- Do not send the secret back in a batch request or webhook response.
- The webhook body is not an encrypted payload. HTTPS encrypts the transport; the secret authenticates the sender and protects message integrity.
- Store the secret only in a server-side KMS, Secret Manager, or protected environment variable. Never expose it in a client application, source repository, or logs.
Step 2: Submit a batch with webhook_url
Setwebhook_url at the root of the batch request:
webhook_url must be a publicly reachable HTTPS address. Each batch retains its signing-secret version, so a secret rotation does not break verification for already accepted batches.
Step 3: Receive a webhook
APIXO sends these headers:Successful task payload
Failed task payload
Webhook payload fields
Step 4: Verify, deduplicate, and respond
The signed bytes are exactly:rawRequestBody is the original HTTP body bytes. Do not parse, format, or serialize JSON again before signature verification.
Node.js / Express verification example
- Preserve the raw body and read the three
X-Apixo-*headers. - Check that the timestamp is within your allowed window; this example uses five minutes.
- Calculate the HMAC with the account secret and compare signatures in constant time.
- Persist and deduplicate
X-Apixo-Event-Id. - Only then parse JSON, update orders, or enqueue downstream work.
- Return any HTTP
2xxonce the event is safely recorded.
Retry and recovery
- Any HTTP
2xxis a successful delivery. - A non-
2xxresponse, network error, or timeout schedules a retry. - Retry intervals are 1 minute → 5 minutes → 30 minutes → 2 hours → 6 hours. Including the first delivery, there are at most six attempts.
- Keep Batch Status and Single Tasks > Status Task as recovery and reconciliation paths.
Rotate or revoke a secret
Rotate
Emergency revoke
webhook_url.
Production checklist
- Your endpoint is public HTTPS and returns a 2xx quickly.
- The signing secret is stored securely and never exposed to client code or logs.
- The receiver verifies the raw body before parsing JSON.
- The receiver checks timestamp freshness and persistently deduplicates
X-Apixo-Event-Id. - Slow work runs in a queue or worker rather than blocking the HTTP response.
- You have Batch Status or Status Task reconciliation for missed events.