Header name | Description |
---|---|
Content-Type required |
application/json |
X-API-KEY required |
YOUR_API_KEY |
Param name | Description |
---|---|
header_key required |
Header Key Validations:
|
header_value required |
Header value, or HMAC secret used to generate signature value Validations:
|
hidden optional |
Determines should the header_value be returned when the webhook is queried Validations:
|
is_hmac optional |
Determines should the header_value be used as a secret to generate a HMAC signature Validations:
|
// Successful request POST /api/v2/admin/webhooks/12/webhook_headers { "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false } 200 { "webhook_header": null }
// Successful request POST /api/v2/admin/webhooks/13/webhook_headers { "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false } 200 { "webhook_header": { "id": 1, "webhook_id": 13, "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false, "created_at": "2023-11-27T09:42:41.749Z", "updated_at": "2023-11-27T09:42:41.749Z" } }
// Not admin user POST /api/v2/admin/webhooks/:webhook_id/webhook_headers 401
// Missing parameters POST /api/v2/admin/webhooks/14/webhook_headers { "header_key": "test-key" } 422 { "error": "Missing parameter header_value" }
// Webhook not found POST /api/v2/admin/webhooks/-1/webhook_headers { "header_key": "test-key", "header_value": "test-value", "hidden": false, "is_hmac": false } 404 { "error": "Couldn't find Webhook with 'id'=-1" }
Code | Description |
---|---|
401 | Unauthorized |
404 | Not found |
500 | Internal Server Error |
422 | Missing parameters |