Skip to main content
Registering a webhook tells CharityStack where to deliver event notifications. You specify a destination URL and the set of event types you want to receive. The response includes a one-time secret used to verify the HMAC-SHA256 signature on every delivery — save it immediately, as it cannot be retrieved again. This endpoint requires the webhooks:write permission.
The secret field is only included in this response and is never retrievable again. Store it securely in an environment variable or secrets manager before you proceed.

Request

Headers

string
required
Bearer token using your API key. Format: Bearer cs_live_your_key
string
required
Must be application/json.

Request body

string
required
The HTTPS URL that will receive webhook event payloads. HTTP is accepted in development environments only.
array[string]
required
One or more event types to subscribe to. The array must not be empty. Available values:
string
Optional human-readable label to help identify this webhook. Useful when you manage multiple endpoints.

Response

201 — created

string
Unique identifier assigned to the new webhook.
string
The destination URL you provided.
array[string]
The event types you subscribed to.
string
Initial status of the webhook. Always ACTIVE on creation.
string
The description you provided, or an empty string if omitted.
integer
Unix timestamp (seconds) when the webhook was registered.
integer
null on a newly created webhook — no deliveries have occurred yet.
integer
0 on creation.
integer
0 on creation.
string
HMAC-SHA256 signing secret for verifying webhook payloads. Shown only once. Use this value to validate the X-Webhook-Signature header on incoming deliveries.
string
A reminder message confirming that the secret will not be shown again.

400 — bad request

Returned when required fields are missing, the url is not a valid HTTPS URL, or events is empty.

401 — unauthorized

Returned when your API key is missing, invalid, or lacks the webhooks:write permission.

Example

Sample response (201)
After registering, verify your integration by sending a test event and confirming that your server correctly validates the X-Webhook-Signature header. See the webhook verification guide for implementation examples.