# client.webhook_endpoints

> client.webhook_endpoints — the webhookEndpoints operations.

`client.webhook_endpoints` — the `webhookEndpoints` operations.

On `AsyncKindgi` every method is the same, awaited.

## `client.webhook_endpoints.list()`

```python signature
list(
    *,
    limit: int | None = None,
    cursor: str | None = None,
    timeout: float | None = None,
) -> WebhookEndpointCollectionPage
```

List webhook endpoints. `GET /v1/webhook-endpoints`

## `client.webhook_endpoints.create()`

```python signature
create(
    body: CreateWebhookEndpointBody | Mapping[str, Any] | None = None,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
    **fields: Any,
) -> WebhookEndpoint
```

Register 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()`

```python signature
generate_secret(*, timeout: float | None = None) -> GeneratedWebhookSecret
```

Generate 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. Sent with an `Idempotency-Key`, a retry gets `409 idempotency-key-replay-withheld`, not the secret again.

## `client.webhook_endpoints.get()`

```python signature
get(endpoint_id: str | UUID, /, *, timeout: float | None = None) -> WebhookEndpoint
```

Fetch a webhook endpoint. `GET /v1/webhook-endpoints/{endpointId}`

## `client.webhook_endpoints.update()`

```python signature
update(
    endpoint_id: str | UUID,
    body: PatchWebhookEndpointBody | Mapping[str, Any] | None = None,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
    **fields: Any,
) -> WebhookEndpoint
```

Update 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()`

```python signature
unregister(
    endpoint_id: str | UUID,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
) -> WebhookEndpointUnregisterResult
```

Unregister 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()`

```python signature
list_deliveries(
    endpoint_id: str | UUID,
    /,
    *,
    status: Literal['pending', 'delivered', 'failed'] | None = None,
    limit: int | None = None,
    cursor: str | None = None,
    timeout: float | None = None,
) -> WebhookDeliveryCollectionPage
```

List a webhook endpoint's deliveries. `GET /v1/webhook-endpoints/{endpointId}/deliveries`

Newest first. Each delivery carries the event it delivers.

## `client.webhook_endpoints.redeliver()`

```python signature
redeliver(
    endpoint_id: str | UUID,
    delivery_id: str | UUID,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
) -> WebhookDelivery
```

Redeliver 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()`

```python signature
send_test(
    endpoint_id: str | UUID,
    /,
    *,
    idempotency_key: str | None = None,
    timeout: float | None = None,
) -> WebhookDelivery
```

Send 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.
