BillKit/DocsConsole
Webhook endpoints

Update webhook endpoint

Update a webhook endpoint's URL, event list, description or status.

POST/v1/webhook_endpoints/{endpoint_id}
Operation update_webhook_endpoint·Scope webhook_endpoints:write·OpenAPI v1.1.0

Parameters

ParameterDescription
endpoint_idstring · pathrequiredId of the webhook endpoint, which starts we_.
descriptionstring | nulloptionalAn optional note about the endpoint. Send null to clear it. At most 255 characters.
enabled_eventsarray of stringoptionalThe event types to send to this endpoint, as listed by GET /v1/webhook_endpoints/event_types, or * for every event, including types added later. Replaces the stored list.
statusenumoptionaldisabled stops new events reaching the endpoint, and pending deliveries fail rather than being sent. enabled turns it back on. One of enabled, disabled.
urlstring (uri)optionalThe URL BillKit sends events to: http or https, with a public host. Private and loopback addresses are refused. Must be an absolute URL. At most 2083 characters.

Returns

Returns a WebhookEndpointResponse object.

Errors

StatusCause
400The request was refused (type: invalid_request_error): a required parameter is missing (parameter_missing), one failed validation (parameter_invalid) or is not one the operation takes (parameter_unknown), and param names it.
401No credential, or one that does not authenticate.
402The account is suspended (tenant_suspended), or the payment provider refused a charge or refund the call made (type: payment_error, code: payment_refused).
403Authenticated, but not allowed: missing scope (insufficient_scope), a key of the wrong mode (mode_mismatch), or a refused origin. Needs the webhook_endpoints:write scope.
404No such object in this account and mode.
409Conflicts with the object's current state (state_conflict, or a more specific code), or an operation still in flight (operation_pending).
413The request body is larger than the API accepts.
429Rate limited. Retry-After says when to try again.
500Something failed on BillKit's side (type: api_error). Retry with the same Idempotency-Key.
502The payment provider failed or did not answer.
503Temporarily unable to serve. reason says whether the request was attempted.
Request · curl
curl -X POST https://api.billkit.eu/v1/webhook_endpoints/we_9XKp2vQ1 \
  -H "Authorization: Bearer $BILLKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Request body · every field
{
  "description": "string",
  "enabled_events": [
    "string"
  ],
  "status": "enabled",
  "url": "https://acme.example/welcome"
}
Response · 200 OK
{
  "created": 1789392000,
  "description": "string",
  "enabled_events": [
    "string"
  ],
  "id": "we_9XKp2vQ1",
  "livemode": false,
  "object": "webhook_endpoint",
  "previous_secret_fingerprint": "string",
  "previous_secret_retired_at": 1789392000,
  "secret": "string",
  "secret_fingerprint": "string",
  "status": "enabled",
  "url": "https://acme.example/welcome"
}