Overview

Webhooks headers allow you to define custom headers that should be sent with each request to your remote endpoint. These can be useful for authentication or tracking purposes.

See our API Reference for a full description of each of the below calls.

Creating Webhook Headers

Webhook headers can be created through the REST API by performing the following request.

Curl
curl -X POST https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/headers \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{"key": "X-MyApp-Header", "value": "Some Value"}'

Retrieving a List of Webhook Headers

A list of headers associated with your webhook can be obtained through the REST API by performing the following request.

Curl
curl GET https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/headers \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"

Modifying Webhook Headers

Webhook headers can be modified through the REST API by performing the following request.

Curl
curl -X PUT https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/headers/{header_id} \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json" \
-d '{"key": "X-MyApp-Header", "value": "Some New Value"}'

Removing Webhook Headers

Curl
curl -X DELETE https://sandbox-api.violet.io/v1/events/webhooks/{webhook_id}/headers/{header_id} \
-H "X-Violet-App-Id: your-app-id-here" \
-H "X-Violet-App-Secret: your-app-secret-here" \
-H "X-Violet-Token: your-token-here" \
-H "Content-type: application/json"