Get API key
Authenticated — all requests require Authorization: Bearer mk_test_…Learn more
API ReferenceWebhooksRegister a webhook endpoint

Register a webhook endpoint

POST/api/v1/webhooks idempotent

Returns the plaintext signing secret EXACTLY ONCE in the response.secret field. Capture it; no recovery path — rotation = delete + recreate. Requires Idempotency-Key header. events takes the shipment and pickup event names or *; a * subscription also receives the seven pickup.* events (pickup.scheduled, pickup.submitted, pickup.confirmed, pickup.picked_up, pickup.arrived_at_warehouse, pickup.failed, pickup.cancelled), delivered at-least-once about one to two minutes after the status change. A * subscription also receives the three self_dropoff.* events (self_dropoff.declared, self_dropoff.arrived_at_warehouse, self_dropoff.cancelled), including for self drop-offs declared in the web portal; only transitions after pickup events were switched on are published. Test pickups and test self drop-offs deliver only to livemode: false endpoints.

Parameters

description
stringbody
events*
array<string>body
url*
stringbody

Responses

Success body
{
  "status": 201,
  "message": "OK",
  "data": {
    "secret": "whsec_y7f0MNv_u0ARXlAJSOxTiaRfjyv9eWJQBlbdrlzRED8",
    "active": true,
    "consecutive_failures": 0,
    "created_at": "2026-05-28T07:44:23.908Z",
    "description": "Sample item",
    "disabled_at": null,
    "events": [
      "shipment.delivered"
    ],
    "id": "IM-2026-0528-9ZNCP3-1",
    "last_delivery_at": null,
    "livemode": false,
    "secret_last4": "RED8",
    "url": "https://example.com/hooks/merdi"
  }
}

Returned object

FieldTypeSample
statusnumber201
messagestringOK
dataobject{12 keys}