Skip to main content

Create Webhook

Creates a new webhook. The secret_key for verifying webhook signatures is returned only once in the response.

Request Body

Sending request data needs webhooks:include_payloads. A webhook with a body or the headers turned on delivers every matching proxied request to its URL, so creating one requires that permission (resource webhook, action include_payloads). A token issued to a person never carries it, and it is privileged: *:* and webhook:* do not grant it and no role or key preset includes it, so no key holds it unless an Owner granted it by naming it in a custom role. Otherwise such a webhook is created from the dashboard by an Owner or Admin. Without it the request is refused with 403 and nothing is created. A switch that is not true or false is a 400.A webhook cannot set the Host header. A webhook is delivered to its url. A header that names a different host or path to the receiver’s infrastructure — Host, X-Forwarded-Host, Forwarded, X-Original-Host, X-Host, X-Forwarded-Server, X-HTTP-Host-Override, X-Original-URL, X-Rewrite-URL, or an HTTP/2 pseudo-header such as :authority — is refused with 400 as a key of request_headers, as auth_config.header_name and as hmac_header_name, for every credential.
| hmac_key_id | uuid | No | Crypto Keys transit key ID to use for HMAC signing (stage 2.5; replaces the secret_key-based default signing) | | hmac_format | string | No | Signature format when using hmac_key_id: legacy, stripe, github, slack, aws-sns, custom | | hmac_header_name | string | No | Custom header name when hmac_format is custom |

Response

The secret_key is returned only at creation time. Store it securely — you’ll need it to verify webhook signatures. See the Verifying Signatures guide.

Errors