Saltar al contenido principal

Webhooks

Delivery of events to tenant endpoints.

POST /v1/webhooks/deliveries/{deliveryId}/replay​

Send a webhook delivery again

Re-queues the delivery with the same webhook-id, so a consumer that deduplicates will recognise it. Allowed for deliveries in FAILED, PARKED or DELIVERED.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: replayWebhookDelivery

Parameters​

NameInTypeRequiredDescription
deliveryIdpathstringYesIdentifier of the webhook delivery.

Responses​

CodeDescriptionSchema
202Queued again.WebhookDelivery
401Missing or invalid API key.Problem
404The resource does not exist or belongs to another tenant.Problem
409The delivery is still being attempted.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

GET /v1/webhooks/deliveries/{deliveryId}​

Read one webhook delivery

State of the attempt chain of one event towards one endpoint. Delivery rows are kept for retention.webhookDeliveries.days; afterwards the call answers 404.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:read, webhooks:read
  • operationId: getWebhookDelivery

Parameters​

NameInTypeRequiredDescription
deliveryIdpathstringYesIdentifier of the webhook delivery.

Responses​

CodeDescriptionSchema
200The delivery.WebhookDelivery
401Missing or invalid API key.Problem
404The resource does not exist or belongs to another tenant.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

GET /v1/webhooks/endpoints/{endpointId}/deliveries​

List the deliveries of an endpoint

Newest first. Use status=FAILED to find what can be replayed.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:read, webhooks:read
  • operationId: listWebhookDeliveries

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.
statusquerystring (PENDING or DELIVERED or FAILED or PARKED)NoOnly deliveries in this state.
cursorqueryCursorNoOpaque pagination token. Do not parse or build it.
limitqueryintegerNoMaximum number of items per page, from 1 to 200 (default 50).

Responses​

CodeDescriptionSchema
200A page of deliveries.object
400The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane).Problem
401Missing or invalid API key.Problem
404The resource does not exist or belongs to another tenant.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

POST /v1/webhooks/endpoints/{endpointId}/replay​

Replay a range of deliveries of an endpoint

Re-queues the deliveries of the endpoint that are in status and were created within from..to, keeping their webhook-id. At most limit deliveries are replayed per call, spread over time to protect the endpoint; when nextCursor is returned, call again with it to continue. Deliveries of a suspended endpoint stay PARKED until it recovers.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: replayWebhookDeliveries

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.

Request body (application/json)​

FieldTypeRequiredDescription
statusstring (FAILED or PARKED or DELIVERED)NoState of the deliveries to replay. Defaults to FAILED.
fromTimestampNoRFC 3339 instant in UTC.
toTimestampNoRFC 3339 instant in UTC.
limitintegerNoMaximum number of deliveries replayed by this call, from 1 to 1000 (default 500).
cursorCursorNoOpaque pagination token. Do not parse or build it.

Responses​

CodeDescriptionSchema
202Queued again.object
400The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane).Problem
401Missing or invalid API key.Problem
404The resource does not exist or belongs to another tenant.Problem
409The endpoint is disabled or the status cannot be replayed.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

GET /v1/webhooks/endpoints​

List the webhook endpoints

Ordered by endpointId. Secret values are never returned.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:read, webhooks:read
  • operationId: listWebhookEndpoints

Parameters​

NameInTypeRequiredDescription
cursorqueryCursorNoOpaque pagination token. Do not parse or build it.
limitqueryintegerNoMaximum number of items per page, from 1 to 200 (default 50).

Responses​

CodeDescriptionSchema
200A page of endpoints.object
400The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane).Problem
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

POST /v1/webhooks/endpoints​

Register a webhook endpoint

Registers an HTTPS endpoint that receives the subscribed events. The URL is checked at registration: https only, no credentials in the URL, and every address the host resolves to must be public (no private, loopback, link-local or metadata ranges); the same check runs again on every delivery. The signing secret is returned only in this response and in a rotation; store it now. The number of active endpoints is limited by webhooks.maxEndpoints.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: createWebhookEndpoint

Parameters​

NameInTypeRequiredDescription
Idempotency-KeyheaderstringYesClient-generated key, scoped to the tenant. Repeating a request with the same key and the same body returns the original response with Idempotent-Replayed: true; the same key with a different body is rejected with 422 idempotency_key_reused.

Request body (application/json)​

FieldTypeRequiredDescription
urlstring (uri)YesPublic https URL without credentials.
eventslist of EventTypeYesEvent types the endpoint subscribes to; at least one.
descriptionstringNoFree-text description of the endpoint (up to 200 characters).

Responses​

CodeDescriptionSchema
200Replay of an earlier request with the same Idempotency-Key. The endpoint is returned without its secret, which was shown by the original response.WebhookEndpoint
201Endpoint registered.WebhookEndpointWithSecret
400The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane).Problem
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
422The URL is not allowed or does not resolve (url_blocked, url_unresolvable), the limit of endpoints is reached (endpoint_limit_reached) or the key was used with a different body (idempotency_key_reused).Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

GET /v1/webhooks/endpoints/{endpointId}​

Read one webhook endpoint

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:read, webhooks:read
  • operationId: getWebhookEndpoint

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.

Responses​

CodeDescriptionSchema
200The endpoint, without secret values.WebhookEndpoint
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
404The resource does not exist or belongs to another tenant.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

PATCH /v1/webhooks/endpoints/{endpointId}​

Change a webhook endpoint

Changes the URL (checked again), the subscribed events, the description or the status. Setting status to ACTIVE on a SUSPENDED endpoint closes its circuit breaker: the failure counter is reset and the deliveries parked while it was suspended are released. SUSPENDED is set by the platform only and cannot be requested.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: updateWebhookEndpoint

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.

Request body (application/json)​

FieldTypeRequiredDescription
urlstring (uri)NoNew public https URL; it is checked again like at registration.
eventslist of EventTypeNoNew list of subscribed event types; at least one.
descriptionstring or nullNonull clears it.
statusstring (ACTIVE or DISABLED)NoACTIVE or DISABLED. SUSPENDED is set only by the platform.

Responses​

CodeDescriptionSchema
200The updated endpoint.WebhookEndpoint
400The request is malformed. The body is not valid JSON or not a JSON object, a field is invalid (errors lists each one), a header or query parameter is invalid, or the Content-Type is not application/json where a JSON body is expected (unsupported_media on the control plane).Problem
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
404The resource does not exist or belongs to another tenant.Problem
409The endpoint changed concurrently (concurrent_update); retry.Problem
422The request is well formed but cannot be accepted.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

DELETE /v1/webhooks/endpoints/{endpointId}​

Delete a webhook endpoint

Stops all deliveries to the endpoint. Delivery history is kept until it expires.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: deleteWebhookEndpoint

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.

Responses​

CodeDescriptionSchema
204Deleted.—
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
404The resource does not exist or belongs to another tenant.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

POST /v1/webhooks/endpoints/{endpointId}/secrets/rotate​

Rotate the signing secret of an endpoint

Generates a new secret, returned only here. The previous secret keeps signing for the overlap window (expiresAt of its entry in secrets), so deliveries carry one signature per valid secret and the consumer can switch without downtime.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: rotateWebhookEndpointSecret

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.

Responses​

CodeDescriptionSchema
200The endpoint and the new secret.WebhookEndpointWithSecret
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
404The resource does not exist or belongs to another tenant.Problem
409The endpoint changed concurrently (concurrent_update); retry.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem

POST /v1/webhooks/endpoints/{endpointId}/test​

Send a test event to an endpoint

Sends one signed webhook.test event now and waits for the answer. It uses the same address checks, signing and timeout as real deliveries, is never retried and does not change the circuit breaker or the delivery history. A failed ping answers 200 with success: false.

  • Authentication: API key in the Authorization: Bearer header
  • Scopes: at least one of messages:write, webhooks:write
  • operationId: testWebhookEndpoint

Parameters​

NameInTypeRequiredDescription
endpointIdpathstringYesIdentifier of the webhook endpoint.

Responses​

CodeDescriptionSchema
200Result of the ping.WebhookTestResult
401Missing or invalid API key.Problem
403The API key is not allowed to perform this operation.Problem
404The resource does not exist or belongs to another tenant.Problem
429Rate limit or quota exceeded.Problem
503A dependency (storage, ledger, vault, renderer or mail service) is temporarily unavailable. Retry after the number of seconds in Retry-After when present.Problem