Webhooks
Create a webhook
Create a new webhook webhook. When triggered, webhooks will include:
- X-Signature header: HMAC-SHA256 signature in format sha256=<hex_digest>
- X-Timestamp header: Unix timestamp when the signature was generated
- Content-Type: application/json header
The signature is calculated as: HMAC-SHA256(secret, timestamp + '.' + canonical_json_body)
JSON payloads are canonicalized (keys sorted alphabetically, whitespace removed) before signing.
post/nhsapi/v1/Webhooks
Request
- Base URL: https://www.example.com
- URL: https://www.example.com/nhsapi/v1/Webhooks
- Auth: none declared
Headers
X-External-Account-Tokenstring
External account token for authentication
Request body
Example request
{
"webhook": {
"url": "https://example.com/webhook",
"event_types": [
"booking_created",
"booking_cancelled"
],
"active": true,
"hmac_secret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2",
"retry_config": {
"max_attempts": 6,
"backoff_base": 3,
"max_delay": 300
},
"headers": {
"X-Custom-Header": "value"
}
}
}Response
webhook created
Example response
{
"webhook": {
"id": 1,
"event_types": [
"booking_created",
"booking_cancelled"
],
"url": "https://example.com/webhook",
"active": true,
"retry_config": {
"max_attempts": 6,
"backoff_base": 3,
"max_delay": 300
},
"hmac_secret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.