Inboxes

Addresses on the inbox domain: issue, read, rename and delete them.

List inboxes

GET/v1/inboxes

Access any: any API key, or a console session.

The account's active inboxes, oldest first, each with its unread thread count and the instant of its last message. An inbox-scoped key sees its own inbox only.

OAuth: allowed with all of inboxes:read. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.list in TypeScript, client.inboxes.list in Python, the inboxes_list tool and doorman inboxes list on the command line.

Organizations: every member's console session may call it. See Roles and permissions.

Parameters
  • qstring, in queryoptional

    Keep the inboxes whose address or display name contains this text, case-insensitively.

  • externalIdstring, in queryoptional

    Keep the inbox with exactly this externalId: at most one, since it is unique among the account's active inboxes. Example: customer-8841.

  • limitinteger, in queryoptional

    Page size, 1 to 100. Defaults to 50.

  • offsetinteger, in queryoptional

    Rows to skip. Defaults to 0.

Answers 200: A page of inboxes.

Response 200: InboxPage

A page of the account's inboxes, oldest first.

  • dataInboxListItem[]required

  • limitintegerrequired

    The page size that was applied.

  • offsetintegerrequired

    The offset that was applied.

  • totalintegerrequired

    How many inboxes match, across every page.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s "https://api.doorman.fyi/v1/inboxes" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Issue an inbox

POST/v1/inboxes

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

A new address on the inbox domain that receives mail as soon as the call returns. Omit mailboxName for a random one. Pass webhookUrl and key to issue a ready-to-use inbox in one call: the answer then carries the webhook's signing secret and the inbox-scoped key's token, once. externalId tags the inbox with your own identifier for later lookups. Creating past the plan's allowance answers 402 plan_limit_reached; deleting an inbox frees its slot. Every plan also has a ceiling of 100 active inboxes per account (409 limit_reached).

OAuth: allowed with all of inboxes:write. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.create in TypeScript, client.inboxes.create in Python, the inboxes_create tool and doorman inboxes create on the command line.

Organizations: a member's console session needs inboxes:manage. With key in the body it also needs keys:manage. With webhookUrl in the body it also needs webhooks:manage and mail:read. API keys and app tokens are not held to member permissions. See Roles and permissions.

Request body (application/json): CreateInbox

A new inbox. Every field is optional: an empty body issues a random address. webhookUrl and key make the inbox ready to use in one call; their secrets come back once, in the answer.

  • mailboxNamestringoptional

    3 to 30 lowercase letters, digits, dots or hyphens: the part before the @. Reserved names are refused with 400 validation_error: mail infrastructure (abuse, admin, administrator, api, bounce, bounces, ...), the company's role accounts (support, billing, sales, legal, security, ...), names holding such a role as a dot- or hyphen-separated label (acme-support) however the role is written (support1, supp0rt, no-reply, supportteam), and the doorman and theovex brand with its lookalikes. The full lists are under x-doorman-limits.inboxes. Example: concierge

  • displayNamestringoptional

    The sender name on outbound mail, at most 100 characters, with at least one letter or digit and no @, <, >, URL, control or invisible characters, no Latin mixed with Cyrillic or Greek, never the doorman or theovex brand, and never a bare role such as Support or Billing team: it says who, not only what. Example: Acme concierge

  • externalIdstringoptional

    Your own identifier for the inbox (a user, a job, a tenant), at most 200 characters and unique among the account's active inboxes. Look an inbox up with GET /v1/inboxes?externalId=. Example: customer-8841

  • metadataMetadataoptional

  • domainIdstringoptional

    One of this account's verified custom domains. Omit for the shared domain. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k

  • webhookUrlstringoptional

    Set the inbox webhook at once: an https URL without credentials. The signing secret is in the answer's webhook. Example: https://agent.example.com/hooks/doorman

  • keyobjectoptional

    Mint an inbox-scoped key at once. Its token is in the answer's key.

  • namestringoptional

    A label for the key, at most 100 characters. Example: Acme concierge

Answers 201: The inbox, with the webhook secret and the key token when they were requested.

Response 201: CreatedInbox

A freshly issued inbox. When the request asked for them, webhook carries the webhook with its signing secret and key the inbox-scoped key with its token; both are shown once and null otherwise.

  • idstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • addressstringrequired

    The full address: the mailbox name at the inbox domain. Example: concierge@doorman.example

  • mailboxNamestringrequired

    The part before the @. Example: concierge

  • domainstringrequired

    The inbox domain of this deployment. Example: doorman.example

  • domainIdstring | nulloptional

    The custom domain identifier; null on the shared domain. Older deployments omit it.

  • displayNamestring | nullrequired

    The sender name on outbound mail; null when none is set.

  • signaturestring | nulloptional

    Plain text appended to every message the inbox sends, under a -- line; null when none is set. Older deployments omit it. Example: Acme concierge acme.example

  • signatureHtmlstring | nulloptional

    The signature as markup, appended to the HTML part of every message the inbox sends, as it was stored: scripts, style sheets, forms, event handlers and images that are not https are removed when it is set. Null when the signature is plain text only. Older deployments omit it. Example: <table cellpadding="0" cellspacing="0"><tr><td style="font-family:Arial,sans-serif;font-size:14px"><b>Acme concierge</b><br><a href="https://acme.example">acme.example</a></td></tr></table>

  • externalIdstring | nullrequired

    Your own identifier for the inbox; null when none was given. Example: customer-8841

  • metadataMetadataoptional

  • webhookUrlstring | nullrequired

    The inbox webhook's URL, or null when the inbox has none.

  • status"active" | "suspended" | "deleted"required

    Only active inboxes receive and send; a deleted inbox is never returned.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • updatedAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • webhookInboxWebhookSecret | nullrequired

    The inbox webhook with its one-time secret, when webhookUrl was given.

  • keyCreatedApiKey | nullrequired

    The inbox-scoped key with its one-time token, when key was given.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
402plan_limit_reachedThe plan's allowance is used up; scope says whether it is the inbox count, the monthly sends or the custom domains. Upgrade rather than wait.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
409already_existsThe mailbox name or the externalId is already in use (field says which), or another account holds the custom domain, here or at the mail transport.
409domain_not_verifiedThe custom domain has not verified its required DNS records.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
503custom_domains_unavailableThe custom-domain mail transport and inbound webhook are not fully configured.

Example 201 response

{
  "id": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "address": "concierge@doorman.example",
  "mailboxName": "concierge",
  "domain": "doorman.example",
  "displayName": "Acme concierge",
  "externalId": "customer-8841",
  "metadata": {},
  "webhookUrl": "https://agent.example.com/hooks/doorman",
  "status": "active",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z",
  "webhook": {
    "url": "https://agent.example.com/hooks/doorman",
    "secret": "whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="
  },
  "key": {
    "id": "key_01jc5c0z9y8x7w6v5t4t3s2r1q",
    "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
    "name": "Acme concierge",
    "tokenPrefix": "dm_9f3abcd",
    "last4": "m2x8",
    "createdAt": "2026-11-05T10:05:00.000Z",
    "lastUsedAt": null,
    "token": "dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"
  }
}
curl -s -X POST "https://api.doorman.fyi/v1/inboxes" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "mailboxName": "concierge",
    "displayName": "Acme concierge"
  }'

Read an inbox

GET/v1/inboxes/{inboxId}

Access any: any API key, or a console session.

One inbox. An inbox-scoped key can read its own only; anything else is 404.

OAuth: allowed with all of inboxes:read. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.get in TypeScript, client.inboxes.get in Python, the inboxes_get tool and doorman inboxes get on the command line.

Organizations: every member's console session may call it. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Answers 200: The inbox.

Response 200: Inbox

An address on the inbox domain that receives mail as soon as it exists.

  • idstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • addressstringrequired

    The full address: the mailbox name at the inbox domain. Example: concierge@doorman.example

  • mailboxNamestringrequired

    The part before the @. Example: concierge

  • domainstringrequired

    The inbox domain of this deployment. Example: doorman.example

  • domainIdstring | nulloptional

    The custom domain identifier; null on the shared domain. Older deployments omit it.

  • displayNamestring | nullrequired

    The sender name on outbound mail; null when none is set.

  • signaturestring | nulloptional

    Plain text appended to every message the inbox sends, under a -- line; null when none is set. Older deployments omit it. Example: Acme concierge acme.example

  • signatureHtmlstring | nulloptional

    The signature as markup, appended to the HTML part of every message the inbox sends, as it was stored: scripts, style sheets, forms, event handlers and images that are not https are removed when it is set. Null when the signature is plain text only. Older deployments omit it. Example: <table cellpadding="0" cellspacing="0"><tr><td style="font-family:Arial,sans-serif;font-size:14px"><b>Acme concierge</b><br><a href="https://acme.example">acme.example</a></td></tr></table>

  • externalIdstring | nullrequired

    Your own identifier for the inbox; null when none was given. Example: customer-8841

  • metadataMetadataoptional

  • webhookUrlstring | nullrequired

    The inbox webhook's URL, or null when the inbox has none.

  • status"active" | "suspended" | "deleted"required

    Only active inboxes receive and send; a deleted inbox is never returned.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • updatedAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "id": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "address": "concierge@doorman.example",
  "mailboxName": "concierge",
  "domain": "doorman.example",
  "displayName": "Acme concierge",
  "externalId": "customer-8841",
  "metadata": {},
  "webhookUrl": null,
  "status": "active",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Update an inbox

PATCH/v1/inboxes/{inboxId}

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

Changes the display name, external identifier or metadata. Null clears either name or externalId; metadata replaces the whole map and {} clears it. Fields left out stay as they are. The address cannot change. An externalId already carried by another active inbox of the account answers 409 already_exists.

OAuth: allowed with all of inboxes:write. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.update in TypeScript, client.inboxes.update in Python, the inboxes_update tool and doorman inboxes update on the command line.

Organizations: a member's console session needs inboxes:manage. API keys and app tokens are not held to member permissions. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Request body (application/json): UpdateInbox

Changes to an inbox; fields left out stay as they are. The address never changes.

  • displayNamestring | nulloptional

    The new sender name; null or empty clears it.

  • signaturestring | nulloptional

    The new signature: plain text of at most 1000 characters, line breaks kept. It is appended to every message the inbox sends from then on, a rule's forward excepted. On the shared domain a signature may not present the sender as the company (the doorman or theovex brand beside a word such as team, support or security): that answers 400 validation_error, for this field and for signatureHtml. Null or empty clears it.

  • signatureHtmlstring | nulloptional

    The signature as markup, at most 10000 characters: tables, inline styles, links and https images, as a signature builder exports it. It is cleaned before it is stored (scripts, style sheets, forms, frames, event handlers, and images that are not https are removed), and the answer carries what was kept. From then on every message the inbox sends carries it in its HTML part, and a message sent as text alone gains an HTML part for it; signature stays the text part's. When it is set on an inbox that has no signature, and none is given with it, the text is read from the markup. Null or empty clears it.

  • externalIdstring | nulloptional

    Your new identifier for the inbox; null clears it.

  • metadataMetadataoptional

Answers 200: The inbox as it is now.

Response 200: Inbox

An address on the inbox domain that receives mail as soon as it exists.

  • idstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • addressstringrequired

    The full address: the mailbox name at the inbox domain. Example: concierge@doorman.example

  • mailboxNamestringrequired

    The part before the @. Example: concierge

  • domainstringrequired

    The inbox domain of this deployment. Example: doorman.example

  • domainIdstring | nulloptional

    The custom domain identifier; null on the shared domain. Older deployments omit it.

  • displayNamestring | nullrequired

    The sender name on outbound mail; null when none is set.

  • signaturestring | nulloptional

    Plain text appended to every message the inbox sends, under a -- line; null when none is set. Older deployments omit it. Example: Acme concierge acme.example

  • signatureHtmlstring | nulloptional

    The signature as markup, appended to the HTML part of every message the inbox sends, as it was stored: scripts, style sheets, forms, event handlers and images that are not https are removed when it is set. Null when the signature is plain text only. Older deployments omit it. Example: <table cellpadding="0" cellspacing="0"><tr><td style="font-family:Arial,sans-serif;font-size:14px"><b>Acme concierge</b><br><a href="https://acme.example">acme.example</a></td></tr></table>

  • externalIdstring | nullrequired

    Your own identifier for the inbox; null when none was given. Example: customer-8841

  • metadataMetadataoptional

  • webhookUrlstring | nullrequired

    The inbox webhook's URL, or null when the inbox has none.

  • status"active" | "suspended" | "deleted"required

    Only active inboxes receive and send; a deleted inbox is never returned.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • updatedAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409already_existsThe mailbox name or the externalId is already in use (field says which), or another account holds the custom domain, here or at the mail transport.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "id": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "address": "concierge@doorman.example",
  "mailboxName": "concierge",
  "domain": "doorman.example",
  "displayName": "Acme concierge",
  "externalId": "customer-8841",
  "metadata": {},
  "webhookUrl": null,
  "status": "active",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s -X PATCH "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "displayName": "Acme concierge"
  }'

Delete an inbox

DELETE/v1/inboxes/{inboxId}

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

Deletes the inbox, revokes its keys, removes its webhook, closes its stream connections and stops delivery. The address is held for 180 days before another account can reuse it. Where the deployment erases, what it held is erased 30 days later.

OAuth: allowed with all of inboxes:write. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.delete in TypeScript, client.inboxes.delete in Python, the inboxes_delete tool and doorman inboxes delete on the command line.

Organizations: a member's console session needs inboxes:manage. API keys and app tokens are not held to member permissions. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Answers 204: Deleted.

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s -X DELETE "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

List inbound rules

GET/v1/inboxes/{inboxId}/rules

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

The inbox's rules, oldest first with id as the tie-breaker. At most 25 rules per inbox.

OAuth: allowed with all of rules:manage, mail:read, mail:write, mail:send. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.rules.list in TypeScript, client.inboxes.rules.list in Python, the inboxes_rules_list tool and doorman inboxes rules list on the command line.

Organizations: every member's console session may call it. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Answers 200: The rules.

Response 200: RuleList

The inbox's rules, oldest first. At most 25.

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/rules" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Create an inbound rule

POST/v1/inboxes/{inboxId}/rules

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

All when conditions must match after classification. Actions run in array order; one outbound action is selected per inbound message across matching rules. Auto-replies and forwards require loop-safe personal mail, use plain text and respect send limits. At most 25 rules per inbox and 5 actions per rule. Enabled by default.

OAuth: allowed with all of rules:manage, mail:read, mail:write, mail:send. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.rules.create in TypeScript, client.inboxes.rules.create in Python, the inboxes_rules_create tool and doorman inboxes rules create on the command line.

Organizations: a member's console session needs inboxes:manage, mail:read, mail:write and mail:send. API keys and app tokens are not held to member permissions. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Request body (application/json): CreateRule

An inbound rule, enabled by default. Only account credentials may manage rules.

  • namestringrequired

  • enabledbooleanoptional

  • whenRuleWhenrequired

  • thenRuleAction[]required

    Executed in array order. At most one auto_reply or forward action per rule.

Answers 201: The rule.

Response 201: Rule

An inbound rule. Rules run oldest first, with id as the tie-breaker; actions run in array order.

  • idstringrequired

    An inbox rule identifier. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k

  • installationIdstringoptional

    Present for an installation-owned rule. Revocation stops execution. Example: ins_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • namestringrequired

  • enabledbooleanrequired

  • whenRuleWhenrequired

  • thenRuleAction[]required

    Executed in array order. At most one auto_reply or forward action per rule.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • updatedAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 201 response

{
  "id": "rul_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "name": "Invoice triage",
  "enabled": true,
  "when": {
    "category": "personal",
    "subjectContains": "invoice"
  },
  "then": [
    {
      "type": "label",
      "label": "billing"
    }
  ],
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s -X POST "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/rules" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "Invoice triage",
    "when": {
      "category": "personal",
      "subjectContains": "invoice"
    },
    "then": [
      {
        "type": "label",
        "label": "billing"
      }
    ]
  }'

Read an inbound rule

GET/v1/inboxes/{inboxId}/rules/{ruleId}

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

One rule belonging to this inbox.

OAuth: allowed with all of rules:manage, mail:read, mail:write, mail:send. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.rules.get in TypeScript, client.inboxes.rules.get in Python, the inboxes_rules_get tool and doorman inboxes rules get on the command line.

Organizations: every member's console session may call it. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • ruleIdstring, in pathrequired

    The rule. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 200: The rule.

Response 200: Rule

An inbound rule. Rules run oldest first, with id as the tie-breaker; actions run in array order.

  • idstringrequired

    An inbox rule identifier. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k

  • installationIdstringoptional

    Present for an installation-owned rule. Revocation stops execution. Example: ins_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • namestringrequired

  • enabledbooleanrequired

  • whenRuleWhenrequired

  • thenRuleAction[]required

    Executed in array order. At most one auto_reply or forward action per rule.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • updatedAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "id": "rul_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "name": "Invoice triage",
  "enabled": true,
  "when": {
    "category": "personal",
    "subjectContains": "invoice"
  },
  "then": [
    {
      "type": "label",
      "label": "billing"
    }
  ],
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/rules/rul_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Update an inbound rule

PATCH/v1/inboxes/{inboxId}/rules/{ruleId}

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

Replace the supplied fields. Updates cancel pending executions of the old revision; disabling a rule prevents new matches.

OAuth: allowed with all of rules:manage, mail:read, mail:write, mail:send. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.rules.update in TypeScript, client.inboxes.rules.update in Python, the inboxes_rules_update tool and doorman inboxes rules update on the command line.

Organizations: a member's console session needs inboxes:manage, mail:read, mail:write and mail:send. API keys and app tokens are not held to member permissions. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • ruleIdstring, in pathrequired

    The rule. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k.

Request body (application/json): UpdateRule

Replace the supplied fields; omitted fields stay as they are. Changes cancel pending executions of the old revision.

  • namestringoptional

  • enabledbooleanoptional

  • whenRuleWhenoptional

  • thenRuleAction[]optional

    Executed in array order. At most one auto_reply or forward action per rule.

Answers 200: The rule as it is now.

Response 200: Rule

An inbound rule. Rules run oldest first, with id as the tie-breaker; actions run in array order.

  • idstringrequired

    An inbox rule identifier. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k

  • installationIdstringoptional

    Present for an installation-owned rule. Revocation stops execution. Example: ins_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • namestringrequired

  • enabledbooleanrequired

  • whenRuleWhenrequired

  • thenRuleAction[]required

    Executed in array order. At most one auto_reply or forward action per rule.

  • createdAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

  • updatedAtstring (date-time)required

    Example: 2026-11-05T10:05:00.000Z

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "id": "rul_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "name": "Invoice triage",
  "enabled": true,
  "when": {
    "category": "personal",
    "subjectContains": "invoice"
  },
  "then": [
    {
      "type": "label",
      "label": "billing"
    }
  ],
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s -X PATCH "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/rules/rul_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "enabled": false
  }'

Delete an inbound rule

DELETE/v1/inboxes/{inboxId}/rules/{ruleId}

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

Stops new matches and cancels pending executions. Already-running mail cannot be recalled. Execution history remains readable.

OAuth: allowed with all of rules:manage, mail:read, mail:write, mail:send. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.rules.delete in TypeScript, client.inboxes.rules.delete in Python, the inboxes_rules_delete tool and doorman inboxes rules delete on the command line.

Organizations: a member's console session needs inboxes:manage. API keys and app tokens are not held to member permissions. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • ruleIdstring, in pathrequired

    The rule. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 204: Deleted.

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s -X DELETE "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/rules/rul_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

List rule executions

GET/v1/inboxes/{inboxId}/rules/{ruleId}/runs

Access account: an account-scoped key or a console session; an inbox-scoped key gets 403 forbidden.

The immutable rule snapshots' execution outcomes, newest first. Interrupted or ambiguous sends are uncertain and never automatically re-sent. History remains after the rule is deleted.

OAuth: allowed with all of rules:manage, mail:read, mail:write, mail:send. App permissions apply in addition to account and resource checks.

Also available as client.inboxes.rules.runs in TypeScript, client.inboxes.rules.runs in Python, the inboxes_rules_runs tool and doorman inboxes rules runs on the command line.

Organizations: every member's console session may call it. See Roles and permissions.

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • ruleIdstring, in pathrequired

    The rule. Example: rul_01jc5f1a2b3c4d5e6f7g8h9j0k.

  • limitinteger, in queryoptional

    Page size, 1 to 100. Defaults to 50.

  • offsetinteger, in queryoptional

    Rows to skip. Defaults to 0.

Answers 200: A page of executions.

Response 200: RuleRunPage

Execution history, newest first.

  • dataRuleRun[]required

  • limitintegerrequired

    The page size that was applied.

  • offsetintegerrequired

    The offset that was applied.

  • totalintegerrequired

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/rules/rul_01jc5f1a2b3c4d5e6f7g8h9j0k/runs" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

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