Configure a webhook
POST/v2/webhooks/configure
Registers an HTTPS endpoint that AfriHex POSTs to when the events you
list in event_types happen: delivery trip updates (trip.*) or
location-monitoring alerts. Call it again to add another endpoint.
Each delivery carries X-Webhook-Event, X-Webhook-Timestamp and two
HMAC-SHA256 signatures made with your secret:
X-Webhook-Signature-V2 over timestamp + "." + body (verify this
one and reject timestamps more than 5 minutes from your clock) and
X-Webhook-Signature over the body alone (older scheme). Failed
deliveries are retried; see GET /v2/webhooks/deliveries.
Request
Responses
- 201
- 403
Webhook configured
The endpoint requires an account-scoped API key. Legacy keys without an account identity cannot access tenant data. Also returned when the requested resource (loan, schedule) is registered to another account.