# List webhooks

GET /v1/webhooks

Source: https://cherami.to/docs/api/webhooks/list-webhooks



{/* Generated from apps/web/openapi. Edit the contract, not this file. */}

`GET /v1/webhooks`

Requires an [API key](https://cherami.to/docs/api#authentication): `Authorization: Bearer YOUR_CREDENTIAL`.

Lists the account's webhooks with their URL, event types, inbox scope and `status`. Secrets aren't listed: [retrieve one](https://cherami.to/docs/api/webhooks/get-webhook-secret) when you need it. [Receive webhook notifications](https://cherami.to/docs/guides/webhooks)

## curl example [#curl-example]

Supply `CHERAMI_API_KEY` privately.

```sh
curl --silent --show-error --include --request GET \
  "https://cherami.to/v1/webhooks" \
  --header "Authorization: Bearer $CHERAMI_API_KEY"
```

## Responses [#responses]

### HTTP 200 [#http-200]

Success.

* `X-Request-ID`: Identifies this request; include it when reporting a problem.

Content type: `application/json`.

[WebhookList](#schema-webhooklist)

```json
{
  "webhooks": []
}
```

### HTTP 401 [#http-401]

`unauthorized`: Send a valid API key as `Authorization: Bearer <key>`. If the key stopped working, get a new one through [recovery](https://cherami.to/docs/guides/recovery).

* `X-Request-ID`: Identifies this request; include it when reporting a problem.
* `WWW-Authenticate`: `"Bearer"`

Content type: `application/json`.

[Error](#schema-error)

### HTTP 503 [#http-503]

`webhooks_unavailable`: Webhook management failed. If it was a change, it may have been applied: list or read the webhooks before repeating it.

* `X-Request-ID`: Identifies this request; include it when reporting a problem.

Content type: `application/json`.

[Error](#schema-error)

## Schema: WebhookList [#schema-webhooklist]

| Field      | Required | Type                                | Meaning and constraints |
| ---------- | -------- | ----------------------------------- | ----------------------- |
| `webhooks` | Yes      | array of [Webhook](#schema-webhook) |                         |

## Schema: Webhook [#schema-webhook]

status is active (delivering), disabled (not delivering until you set enabled to true; you or repeated delivery failures turned it off), pending (creation or removal not yet confirmed; read it again shortly) or unknown (the configuration couldn't be read and its fields are null; if it stays unknown, delete the webhook and add it again). pending\_operation names the unconfirmed work.

| Field                        | Required | Type                                                          | Meaning and constraints                                                                                           |
| ---------------------------- | -------- | ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `id`                         | Yes      | string                                                        | Cherami resource ID.                                                                                              |
| `created_at`                 | Yes      | string                                                        | UTC timestamp with milliseconds. `format`: `date-time` `pattern`: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$` |
| `url`                        | Yes      | string or null                                                | Destination URL; null while status is pending or unknown.                                                         |
| `event_types`                | Yes      | array of [WebhookEventType](#schema-webhookeventtype) or null |                                                                                                                   |
| `inbox_ids`                  | Yes      | array of string or null                                       | Scoped inboxes; empty means every inbox.                                                                          |
| `deleted_inbox_ids`          | Yes      | array of string                                               | Scoped inboxes that have since been deleted. They match nothing; edit inbox\_ids to remove them.                  |
| `enabled`                    | Yes      | boolean or null                                               |                                                                                                                   |
| `updated_at`                 | Yes      | string or null                                                |                                                                                                                   |
| `status`                     | Yes      | `"active"` or `"disabled"` or `"pending"` or `"unknown"`      |                                                                                                                   |
| `pending_operation`          | Yes      | object or null                                                |                                                                                                                   |
| `secret_rotated_at`          | Yes      | string or null                                                |                                                                                                                   |
| `previous_secret_expires_at` | Yes      | string or null                                                |                                                                                                                   |

## Schema: WebhookEventType [#schema-webhookeventtype]

message.received: a received message is ready to read. message.sent: the provider accepted a sent message, which is not delivery.

`"message.received"` or `"message.sent"`

## Schema: Error [#schema-error]

| Field   | Required | Type   | Meaning and constraints |
| ------- | -------- | ------ | ----------------------- |
| `error` | Yes      | object |                         |

### `error` fields [#error-fields]

| Field     | Required | Type   | Meaning and constraints                                               |
| --------- | -------- | ------ | --------------------------------------------------------------------- |
| `code`    | Yes      | string | Code to handle. Handle a code you don't recognize by its HTTP status. |
| `message` | Yes      | string | Explanation of this case; its wording can change.                     |

[Errors, limits and pagination](https://cherami.to/docs/api/errors) · [Download OpenAPI 3.1](https://cherami.to/openapi.json)
