CLI: Webhooks

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

doorman inboxes webhook get

Command

doorman inboxes webhook get <inboxId> [flags]

Sends 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
  • --inbox-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

Example

doorman inboxes webhook get inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman inboxes webhook set

Command

doorman inboxes webhook set <inboxId> [flags]

Sends 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
  • --inbox-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

  • --urlstringrequired

    An https URL without credentials (http is accepted in local development).

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

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

doorman inboxes webhook rotate-secret

Command

doorman inboxes webhook rotate-secret <inboxId> [flags]

Sends 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
  • --inbox-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

Example

doorman inboxes webhook rotate-secret inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman inboxes webhook delete

Command

doorman inboxes webhook delete <inboxId> [flags]

Sends 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
  • --inbox-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

Example

doorman inboxes webhook delete inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman inboxes webhook deliveries

Command

doorman inboxes webhook deliveries <inboxId> [flags]

Sends 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
  • --inbox-idstringoptional

    The same as the argument <inboxId>, for a script that names everything.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --cursorstringoptional

    The delivery id to continue from, from the previous page's nextCursor.

Example

doorman inboxes webhook deliveries inb_01jc4q7w9k2m5n8p3r6t1v4x7z

doorman webhooks list

Command for 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

doorman webhooks create [flags]

Sends 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
  • --namestringoptional

    A label, at most 100 characters.

  • --urlstringrequired

    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")[]optional

    Event types to receive; empty or absent means all.

  • --inbox-idsstring[]optional

    Ids of active inboxes of the account to receive for; empty or absent means all. Duplicates are dropped.

  • --enabledbooleanoptional

    Whether deliveries start right away. Defaults to true.

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

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

doorman webhooks get

Command

doorman webhooks get <endpointId> [flags]

Sends 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
  • --endpoint-idstringoptional

    The same as the argument <endpointId>, for a script that names everything.

Example

doorman webhooks get whk_01jc5d1a2b3c4d5e6f7g8h9j0k

doorman webhooks update

Command

doorman webhooks update <endpointId> [flags]

Sends 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
  • --endpoint-idstringoptional

    The same as the argument <endpointId>, for a script that names everything.

  • --namestringoptional

    A label, at most 100 characters.

  • --urlstringoptional

    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")[]optional

    Event types to receive; empty or absent means all.

  • --inbox-idsstring[]optional

    Ids of active inboxes of the account to receive for; empty or absent means all. Duplicates are dropped.

  • --enabledbooleanoptional

    Whether deliveries start right away. Defaults to true.

  • --jsonobjectoptional

    The request body as one JSON object. A flag given beside it replaces the field of the same name.

Example

doorman webhooks update whk_01jc5d1a2b3c4d5e6f7g8h9j0k \
  --enabled false

doorman webhooks delete

Command

doorman webhooks delete <endpointId> [flags]

Sends 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
  • --endpoint-idstringoptional

    The same as the argument <endpointId>, for a script that names everything.

Example

doorman webhooks delete whk_01jc5d1a2b3c4d5e6f7g8h9j0k

doorman webhooks rotate-secret

Command

doorman webhooks rotate-secret <endpointId> [flags]

Sends 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
  • --endpoint-idstringoptional

    The same as the argument <endpointId>, for a script that names everything.

Example

doorman webhooks rotate-secret whk_01jc5d1a2b3c4d5e6f7g8h9j0k

doorman webhooks test

Command

doorman webhooks test <endpointId> [flags]

Sends 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
  • --endpoint-idstringoptional

    The same as the argument <endpointId>, for a script that names everything.

Example

doorman webhooks test whk_01jc5d1a2b3c4d5e6f7g8h9j0k

doorman webhooks deliveries

Command

doorman webhooks deliveries <endpointId> [flags]

Sends 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
  • --endpoint-idstringoptional

    The same as the argument <endpointId>, for a script that names everything.

  • --limitintegeroptional

    Page size, 1 to 100. Defaults to 50.

  • --cursorstringoptional

    The delivery id to continue from, from the previous page's nextCursor.

Example

doorman webhooks deliveries whk_01jc5d1a2b3c4d5e6f7g8h9j0k

doorman deliveries retry

Command

doorman deliveries retry <deliveryId> [flags]

Sends 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
  • --delivery-idstringoptional

    The same as the argument <deliveryId>, for a script that names everything.

Example

doorman deliveries retry whd_01jc5f1a2b3c4d5e6f7g8h9j0k

Up Down to move, Enter to open, Esc to close