Register a webhook endpoint
POST /api/v1/webhooks
POST https://api.trustverify.co.uk/api/v1/webhooks
Registers an endpoint. Needs a live key. The 201 response is the only one that carries the whsec_… signing secret: store it then. No later response returns it.
Request body#
| Field | Type | Description |
|---|---|---|
| namerequired | string | |
| urlrequired | string | |
| eventsrequired | array of string |
Example request#
curl -sS -X POST 'https://api.trustverify.co.uk/api/v1/webhooks' \
-H "Authorization: Bearer $TRUSTVERIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Production listener",
"url": "https://example.com/webhooks/trustverify",
"events": [
"aml.hit"
]
}'Responses#
201 Webhook registered — the response includes the whsec_… signing secret, shown this once
400 Validation error
403 test_key_cannot_manage_webhooks — endpoints receive production events, so creating, changing or deleting one needs a liv
test_key_cannot_manage_webhooks — endpoints receive production events, so creating, changing or deleting one needs a live key (tv_live_sk_…). A test key can list them.