Request
What does the webhook send me?
The webhook sends an event via HTTP POST request with Content-Type: application/json with the following parameters:
An
X-Caf-Signatureheader used to verify that the request came from Certta
The request body is a
JSONthat follows the CloudEvents standard
Request structure
Each webhook request includes:
Headers
Content-Type
Always application/json
User-Agent
Identifies as Caf-Webhook/Connect
X-Caf-Signature
Contains the HMAC SHA-256 signature of the request body
Request body
The request body follows the CloudEvents format, although the specific CloudEvents HTTP headers are not included:
Examples
Curl
Example curl command assuming SECRET: "dummysecret":
What should I respond to the webhook?
Error cases
The webhook request has the purpose of successfully integrating the event and nothing more than that. With this purpose in mind, error responses should only be used to indicate failure in the event integration (by integrated event, it means the event was successfully received by the webhook server).
The webhook delivery mechanism accepts and recognizes errors within the HTTP 5xx error series, which can indicate errors in receiving or processing the request by the server. Delivery retries will happen only for this class of errors.
Error responses can follow the payload specified below to detail and make clear the reason for the error in our internal audit. Any other fields and/or formats will be ignored.
Handling webhook requests
Idempotency
Example webhook handler
Here's a simple example of a webhook handler in Node.js Express:
Troubleshooting
Common issues
Logs and debugging
You can use webhook logs in Trust, the platform that manages configurations, to view the delivery status of recent events and any error messages. The logs maintain a history of:
Successful and failed delivery attempts
HTTP response codes received
Delivery timestamps
Specific errors encountered during deliveries
Last updated

