Skip to main content

Create a webhook subscription

POST
/api/v1/webhooks/:subAccountId

Creates a new webhook subscription for the specified sub-account. The endpoint URL is verified via a challenge request before activation. The signing secret is returned only in this response — store it securely for HMAC-SHA256 signature verification.

What your URL will receive — each subscribed event is POSTed like this (the Callbacks tab has one example per event):

POST /webhooks/abs HTTP/1.1
Host: example.com
Content-Type: application/json
X-Webhook-Event: shipment.delivered
X-Webhook-Signature: sha256=5f2b8c6e0d1a4b7e9c3f2a1d8e6b4c0a7f9e2d1c3b5a7f9e1d3c5b7a9f1e3d5c
X-Webhook-Delivery-Attempt: 1
Authorization: Bearer <your custom header value>

{
"event": "shipment.delivered",
"eventId": "7b0c1f3e-2d4a-4c8e-9f61-0a5b2c3d4e5f",
"occurredOn": "2026-10-26T12:34:56.789Z",
"data": {
"awb": "ABS1234567",
"subAccountId": "22199835-f2d7-41d6-a5a4-783aa58545dc",
"status": "DELIVERED"
}
}

Request​

Responses​

201 Created

Webhook subscription created successfully

400 Bad Request

Validation error (invalid URL, events or headers), or challenge verification failed — the URL was unreachable or did not answer {"challenge": "<token>"}.

401 Unauthorized

Unauthorized — invalid or missing token

403 Forbidden

Forbidden — missing webhooks:manage scope or insufficient permissions

Callbacks​

POST
/{$request.body#/url}

Sent to your subscription URL for shipment.delivered. See the 🔗 Webhooks tag for signature verification and retry behaviour.

Callbacks Responses​

200 OK

Any 2xx acknowledges the delivery.

default

Any other status, a timeout (15 s) or a connection error fails the attempt; it is retried up to 5 attempts in total.