Create webhook endpoint
The signing secret is returned once, at creation, and never again. An omitted or empty enabledEvents subscribes the endpoint to ALL events.
Response contract
The successful wire shape and errors an integration should branch on.
Webhook endpoint
application/jsonidstringrequired- Unique endpoint identifier.
object"webhook_endpoint"required- Stable resource discriminator.
urlstringrequired- Delivery destination.
descriptionstring | nullrequired- Optional endpoint description.
enabledEventsstring[]required- Subscribed event types.
statusstringrequired- Endpoint state.
secretLast4stringrequired- Last four characters of the signing secret.
createdAtstringrequired- ISO 8601 creation timestamp.
Example response
{
"id": "whe_01JEXAMPLE",
"object": "webhook_endpoint",
"url": "https://example.com/webhooks/myela",
"description": null,
"enabledEvents": [
"invoice.paid",
"payment.settled"
],
"status": "enabled",
"secretLast4": "m9Qx",
"createdAt": "2026-08-10T20:49:51.653Z",
"secret": "whsec_shown_once_after_creation"
}Error responses
401
authentication_failedThe key is missing, malformed, revoked, or invalid for this environment.
403
permission_deniedThe key does not have webhookEndpoints.create.
422
invalid_requestOne or more request fields are invalid.