---
title: "CLI: Webhooks"
description: "The commands of the doorman command line under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log."
url: https://doorman.fyi/docs/cli/commands/webhooks
markdown: https://doorman.fyi/docs/cli/commands/webhooks.md
area: "SDKs and tools"
section: "Command line"
---

# CLI: Webhooks

The commands of the doorman command line under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log.

Source: https://doorman.fyi/docs/cli/commands/webhooks

## doorman inboxes webhook get

Command:
```sh
doorman inboxes webhook get <inboxId> [flags]
```

Operation [`inboxes.webhook.get`](https://doorman.fyi/docs/reference/webhooks.md#inboxes-webhook-get): `GET /v1/inboxes/{inboxId}/webhook`

Read the inbox webhook. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |

Example:
```sh
doorman inboxes webhook get inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes webhook set

Command:
```sh
doorman inboxes webhook set <inboxId> [flags]
```

Operation [`inboxes.webhook.set`](https://doorman.fyi/docs/reference/webhooks.md#inboxes-webhook-set): `PUT /v1/inboxes/{inboxId}/webhook`

Set the inbox webhook. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--url` | `string` | yes | An https URL without credentials (http is accepted in local development). |
| `--json` | `object` | no | The request body as one JSON object. A flag given beside it replaces the field of the same name. |

Example:
```sh
doorman inboxes webhook set inb_01jc4q7w9k2m5n8p3r6t1v4x7z \
  --url https://agent.example.com/hooks/doorman
```

## doorman inboxes webhook rotate-secret

Command:
```sh
doorman inboxes webhook rotate-secret <inboxId> [flags]
```

Operation [`inboxes.webhook.rotateSecret`](https://doorman.fyi/docs/reference/webhooks.md#inboxes-webhook-rotateSecret): `POST /v1/inboxes/{inboxId}/webhook/rotate-secret`

Rotate the inbox webhook's secret. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |

Example:
```sh
doorman inboxes webhook rotate-secret inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes webhook delete

Command:
```sh
doorman inboxes webhook delete <inboxId> [flags]
```

Operation [`inboxes.webhook.delete`](https://doorman.fyi/docs/reference/webhooks.md#inboxes-webhook-delete): `DELETE /v1/inboxes/{inboxId}/webhook`

Remove the inbox webhook. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |

Example:
```sh
doorman inboxes webhook delete inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman inboxes webhook deliveries

Command:
```sh
doorman inboxes webhook deliveries <inboxId> [flags]
```

Operation [`inboxes.webhook.deliveries`](https://doorman.fyi/docs/reference/webhooks.md#inboxes-webhook-deliveries): `GET /v1/inboxes/{inboxId}/webhook/deliveries`

List the inbox webhook's deliveries. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. App tokens are refused.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--inbox-id` | `string` | no | The same as the argument `<inboxId>`, for a script that names everything. |
| `--limit` | `integer` | no | Page size, 1 to 100. Defaults to 50. |
| `--cursor` | `string` | no | The delivery id to continue from, from the previous page's `nextCursor`. |

Example:
```sh
doorman inboxes webhook deliveries inb_01jc4q7w9k2m5n8p3r6t1v4x7z
```

## doorman webhooks list

Command:
```sh
doorman webhooks list
```

Operation [`webhooks.list`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-list): `GET /v1/webhooks`

List endpoints. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

## doorman webhooks create

Command:
```sh
doorman webhooks create [flags]
```

Operation [`webhooks.create`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-create): `POST /v1/webhooks`

Create an endpoint. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--name` | `string` | no | A label, at most 100 characters. |
| `--url` | `string` | yes | An https URL without credentials (http is accepted in local development). |
| `--event-types` | `("message.received" \| "message.sent" \| "thread.updated" \| "inbox.created" \| "inbox.deleted" \| "delivery.failed" \| "message.held" \| "send.held" \| "send.discarded" \| "sign_in.requested" \| "sign_in.completed")[]` | no | Event types to receive; empty or absent means all. |
| `--inbox-ids` | `string[]` | no | Ids of active inboxes of the account to receive for; empty or absent means all. Duplicates are dropped. |
| `--enabled` | `boolean` | no | Whether deliveries start right away. Defaults to true. |
| `--json` | `object` | no | The request body as one JSON object. A flag given beside it replaces the field of the same name. |

Example:
```sh
doorman webhooks create \
  --name Orchestrator \
  --url https://agent.example.com/hooks/doorman \
  --event-types '["message.received"]' \
  --inbox-ids '[]' \
  --enabled true
```

## doorman webhooks get

Command:
```sh
doorman webhooks get <endpointId> [flags]
```

Operation [`webhooks.get`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-get): `GET /v1/webhooks/{endpointId}`

Read an endpoint. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--endpoint-id` | `string` | no | The same as the argument `<endpointId>`, for a script that names everything. |

Example:
```sh
doorman webhooks get whk_01jc5d1a2b3c4d5e6f7g8h9j0k
```

## doorman webhooks update

Command:
```sh
doorman webhooks update <endpointId> [flags]
```

Operation [`webhooks.update`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-update): `PATCH /v1/webhooks/{endpointId}`

Change an endpoint. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--endpoint-id` | `string` | no | The same as the argument `<endpointId>`, for a script that names everything. |
| `--name` | `string` | no | A label, at most 100 characters. |
| `--url` | `string` | no | An https URL without credentials (http is accepted in local development). |
| `--event-types` | `("message.received" \| "message.sent" \| "thread.updated" \| "inbox.created" \| "inbox.deleted" \| "delivery.failed" \| "message.held" \| "send.held" \| "send.discarded" \| "sign_in.requested" \| "sign_in.completed")[]` | no | Event types to receive; empty or absent means all. |
| `--inbox-ids` | `string[]` | no | Ids of active inboxes of the account to receive for; empty or absent means all. Duplicates are dropped. |
| `--enabled` | `boolean` | no | Whether deliveries start right away. Defaults to true. |
| `--json` | `object` | no | The request body as one JSON object. A flag given beside it replaces the field of the same name. |

Example:
```sh
doorman webhooks update whk_01jc5d1a2b3c4d5e6f7g8h9j0k \
  --enabled false
```

## doorman webhooks delete

Command:
```sh
doorman webhooks delete <endpointId> [flags]
```

Operation [`webhooks.delete`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-delete): `DELETE /v1/webhooks/{endpointId}`

Delete an endpoint. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--endpoint-id` | `string` | no | The same as the argument `<endpointId>`, for a script that names everything. |

Example:
```sh
doorman webhooks delete whk_01jc5d1a2b3c4d5e6f7g8h9j0k
```

## doorman webhooks rotate-secret

Command:
```sh
doorman webhooks rotate-secret <endpointId> [flags]
```

Operation [`webhooks.rotateSecret`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-rotateSecret): `POST /v1/webhooks/{endpointId}/rotate-secret`

Rotate an endpoint's secret. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--endpoint-id` | `string` | no | The same as the argument `<endpointId>`, for a script that names everything. |

Example:
```sh
doorman webhooks rotate-secret whk_01jc5d1a2b3c4d5e6f7g8h9j0k
```

## doorman webhooks test

Command:
```sh
doorman webhooks test <endpointId> [flags]
```

Operation [`webhooks.test`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-test): `POST /v1/webhooks/{endpointId}/test`

Send a test delivery. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--endpoint-id` | `string` | no | The same as the argument `<endpointId>`, for a script that names everything. |

Example:
```sh
doorman webhooks test whk_01jc5d1a2b3c4d5e6f7g8h9j0k
```

## doorman webhooks deliveries

Command:
```sh
doorman webhooks deliveries <endpointId> [flags]
```

Operation [`webhooks.deliveries`](https://doorman.fyi/docs/reference/webhooks.md#webhooks-deliveries): `GET /v1/webhooks/{endpointId}/deliveries`

List an endpoint's deliveries. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--endpoint-id` | `string` | no | The same as the argument `<endpointId>`, for a script that names everything. |
| `--limit` | `integer` | no | Page size, 1 to 100. Defaults to 50. |
| `--cursor` | `string` | no | The delivery id to continue from, from the previous page's `nextCursor`. |

Example:
```sh
doorman webhooks deliveries whk_01jc5d1a2b3c4d5e6f7g8h9j0k
```

## doorman deliveries retry

Command:
```sh
doorman deliveries retry <deliveryId> [flags]
```

Operation [`deliveries.retry`](https://doorman.fyi/docs/reference/webhooks.md#deliveries-retry): `POST /v1/deliveries/{deliveryId}/retry`

Retry a delivery. Access `account`: an account-scoped key or a console session; an inbox-scoped key gets 403 `forbidden`. An app token needs `webhooks:manage` and `events:read` and `mail:read`.

**Flags**

| Flag | Type | Required | Description |
| --- | --- | --- | --- |
| `--delivery-id` | `string` | no | The same as the argument `<deliveryId>`, for a script that names everything. |

Example:
```sh
doorman deliveries retry whd_01jc5f1a2b3c4d5e6f7g8h9j0k
```
