# prov.webhooks

prov.webhooks in the Node SDK: 7 methods. The webhooks methods.

## Methods

### [list](https://provenanceauth.com/docs/sdks/node/webhooks/list.md)

```ts
prov.webhooks.list(): Promise<{ data: WebhookEndpoint[] }>
```

Calls `GET /v1/webhook_endpoints`.

### [create](https://provenanceauth.com/docs/sdks/node/webhooks/create.md)

```ts
prov.webhooks.create(params: CreateWebhookParams): Promise<WebhookEndpoint>
```

Create an endpoint; the response includes the one-time `secret`.

Calls `POST /v1/webhook_endpoints`.

### [update](https://provenanceauth.com/docs/sdks/node/webhooks/update.md)

```ts
prov.webhooks.update(id: string, params: UpdateWebhookParams): Promise<WebhookEndpoint>
```

Calls `PATCH /v1/webhook_endpoints/{id}`.

### [delete](https://provenanceauth.com/docs/sdks/node/webhooks/delete.md)

```ts
prov.webhooks.delete(id: string): Promise<{ deleted: boolean; endpointId: string }>
```

Calls `DELETE /v1/webhook_endpoints/{id}`.

### [rotateSecret](https://provenanceauth.com/docs/sdks/node/webhooks/rotate-secret.md)

```ts
prov.webhooks.rotateSecret(id: string): Promise<WebhookEndpoint>
```

Rotate the signing secret; the response includes the new one-time `secret`.

Calls `POST /v1/webhook_endpoints/{id}/rotate_secret`.

### [test](https://provenanceauth.com/docs/sdks/node/webhooks/test.md)

```ts
prov.webhooks.test(id: string): Promise<WebhookDelivery>
```

Send a signed `ping` now; the response is the delivery result.

Calls `POST /v1/webhook_endpoints/{id}/test`.

### [deliveries](https://provenanceauth.com/docs/sdks/node/webhooks/deliveries.md)

```ts
prov.webhooks.deliveries(id: string, params?: { limit?: number }): Promise<{ data: WebhookDelivery[] }>
```

Calls `GET /v1/webhook_endpoints/{id}/deliveries`.
