client.webhook_endpoints
client.webhook_endpoints — the webhookEndpoints operations.
On AsyncKindgi every method is the same, awaited.
client.webhook_endpoints.list()
Section titled “client.webhook_endpoints.list()”list( *, limit: int | None = None, cursor: str | None = None, timeout: float | None = None,) -> WebhookEndpointCollectionPageList webhook endpoints. GET /v1/webhook-endpoints
client.webhook_endpoints.create()
Section titled “client.webhook_endpoints.create()”create( *, idempotency_key: str | None = None, timeout: float | None = None, **fields: Any,) -> WebhookEndpointRegister a webhook endpoint. POST /v1/webhook-endpoints
Registers a URL the platform sends signed events to. The signing secret is shared with the receiver, so it lives in your secrets (.env in development, the secrets store in production) and the endpoint references it by name (secretRef). Store it first; POST /v1/webhook-endpoints/generate-secret makes a strong one. Deliveries are signed in the Standard Webhooks format (webhook-id, webhook-timestamp, webhook-signature); verify with verifyWebhook from @kindgi/crypto or any Standard Webhooks library. The event bodies are described under webhooks in this document.
client.webhook_endpoints.generate_secret()
Section titled “client.webhook_endpoints.generate_secret()”generate_secret(*, timeout: float | None = None) -> GeneratedWebhookSecretGenerate a webhook signing secret. POST /v1/webhook-endpoints/generate-secret
Returns a new strong secret (whsec_ + base64 of 32 random bytes). Nothing is stored: put it in your secrets, then register the endpoint with its name.
client.webhook_endpoints.get()
Section titled “client.webhook_endpoints.get()”get(*, timeout: float | None = None) -> WebhookEndpointFetch a webhook endpoint. GET /v1/webhook-endpoints/{endpointId}
client.webhook_endpoints.update()
Section titled “client.webhook_endpoints.update()”update( *, idempotency_key: str | None = None, timeout: float | None = None, **fields: Any,) -> WebhookEndpointUpdate a webhook endpoint. PATCH /v1/webhook-endpoints/{endpointId}
To rotate the signing secret, rotate the secret in your secrets store (POST /v1/secrets/{name}/rotate); point secretRef at another secret to switch.
client.webhook_endpoints.unregister()
Section titled “client.webhook_endpoints.unregister()”unregister( *, idempotency_key: str | None = None, timeout: float | None = None,) -> WebhookEndpointUnregisterResultUnregister a webhook endpoint (soft delete). POST /v1/webhook-endpoints/{endpointId}/unregister
The endpoint stops receiving events; its pending deliveries are abandoned (failed). Idempotent.
client.webhook_endpoints.list_deliveries()
Section titled “client.webhook_endpoints.list_deliveries()”list_deliveries( *, status: Literal['pending', 'delivered', 'failed'] | None = None, limit: int | None = None, cursor: str | None = None, timeout: float | None = None,) -> WebhookDeliveryCollectionPageList a webhook endpoint's deliveries. GET /v1/webhook-endpoints/{endpointId}/deliveries
Newest first. Each delivery carries the event it delivers.
client.webhook_endpoints.redeliver()
Section titled “client.webhook_endpoints.redeliver()”redeliver( *, idempotency_key: str | None = None, timeout: float | None = None,) -> WebhookDeliveryRedeliver an event. POST /v1/webhook-endpoints/{endpointId}/deliveries/{deliveryId}/redeliver
Queues the delivery again now, whatever its status; its attempts start over.
client.webhook_endpoints.send_test()
Section titled “client.webhook_endpoints.send_test()”send_test( *, idempotency_key: str | None = None, timeout: float | None = None,) -> WebhookDeliverySend a test event to a webhook endpoint. POST /v1/webhook-endpoints/{endpointId}/test
Queues a webhook.test event, signed like any other, to check the receiver end to end. Follow it in the delivery log.