Security

Risk assessment and sender trust: the policy that warns, holds and guards sending, the senders an inbox knows, held mail and the audit log.

Read the security policy

GET/v1/security

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

The account's policy: the thresholds on the risk score (low from 0, medium from 30, high from 60, critical from 85) at which mail is warned about or held, the guards on sending, and what this deployment does with it. An account that never chose starts on balanced.

OAuth: not available to delegated app tokens.

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

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

Answers 200: The account's settings.

Response 200: SecuritySettings

A policy as it applies to the account or to one inbox, with what this deployment does with it.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

    The inbox the settings are for; null for the account's.

  • inheritedbooleanrequired

    Inbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.

  • policySecurityPolicyrequired

  • enforcement"off" | "observe" | "enforce"required

    What the deployment does: enforce applies the policy; observe assesses mail and records the result without warning, holding or blocking anything; off does not assess.

  • modelAnalysisAvailablebooleanrequired

    Whether this deployment has a model to read content with. When false, modelAnalysis has no effect.

  • deepScanAvailablebooleanoptional

    Whether this deployment runs the malware engine and the link sandbox. When false, deepScan and linkSandbox have no effect. Older deployments omit it.

  • updatedAtstring (date-time) | nullrequired

    When the policy was last changed; null while it is the default.

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.
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

{
  "scope": "account",
  "inboxId": null,
  "inherited": false,
  "policy": {
    "level": "balanced",
    "warnAt": 60,
    "holdAt": 85,
    "holdUnauthenticatedNewSenders": false,
    "replyGuard": true,
    "recipients": "any",
    "unscannable": "warn",
    "labels": {},
    "modelAnalysis": true,
    "sendApproval": "apps",
    "allowKeyManagement": false,
    "deepScan": true,
    "linkSandbox": true
  },
  "enforcement": "enforce",
  "modelAnalysisAvailable": true,
  "deepScanAvailable": true,
  "updatedAt": null
}
curl -s "https://api.doorman.fyi/v1/security" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Change the security policy

PATCH/v1/security

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

Applies a preset with level, or changes single values; fields left out stay as they are. Every inbox without a policy of its own follows the account's. A change that loosens protection needs a console session unless the account allows its account keys to (403 session_required); a change that tightens it does not. allowKeyManagement can only be switched on from a console session. Recorded in the audit log.

OAuth: not available to delegated app tokens.

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

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

Request body (application/json): UpdateSecurityPolicy

Changes to a policy. level applies a preset first; any other field given with it, or alone, then replaces that one value. Fields left out stay as they are. Loosening protection needs a console session unless the account allows its account keys to.

  • level"relaxed" | "balanced" | "strict"optional

    Apply this preset's thresholds and guards. It also clears the per-label rules, unless labels is given with it.

  • warnAtinteger | nulloptional

    Mail scoring at least this is delivered with a warning and is never answered automatically. Null means never. Example: 60

  • holdAtinteger | nulloptional

    Mail scoring at least this is held for the owner and kept from agents. Null means never. Not below warnAt. Example: 85

  • labelsobject of "warn" | "hold"optional

    The least that happens to mail carrying a label, whatever its score: warn or hold. Replaced as a whole; {} clears it. Example: {"prompt_injection":"hold"}

  • holdUnauthenticatedNewSendersbooleanoptional

    Hold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.

  • modelAnalysisbooleanoptional

    Let a model read the content of mail the signals leave undecided. The text goes to the deployment's AI gateway, is not kept and is never used for training. Off: assessments rest on the deterministic signals alone.

  • replyGuardbooleanoptional

    Refuse an agent's reply into a thread that holds a flagged message: one this policy warns about or holds, by its score or a label, or one the owner marked unsafe (403 risk_blocked). A message stops counting once the owner marks it safe, or while its sender is trusted and it passed authentication. A console session is never refused.

  • recipients"any" | "known"optional

    known: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403 risk_blocked otherwise). Having written to the inbox, or being named in a message, does not make a recipient known: answering a stranger takes a person, or trusting them first. any: no such limit. A console session is never refused.

  • sendApproval"off" | "apps" | "all"optional

    Whose sends wait for the owner when a recipient is not one the inbox knows or trusts, nor one of the account's own inboxes. apps: a connected app's. all: an app's and an API key's. off: nobody's. A send that waits answers 202 with a held send, which the owner sends or discards; it expires unsent after 7 days. A console session is never held, and neither is mail an inbox rule generates. It applies whatever the deployment's enforcement, except off, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts on apps.

  • allowKeyManagementbooleanoptional

    Let account keys loosen protection (trust a sender, raise a threshold, release held mail, approve a held send). Off by default, and only a console session can switch it on. Account scope only.

  • deepScanbooleanoptional

    Run every attachment, in both directions, through the deployment's malware engine. The bytes go to an isolated scanner that keeps nothing. Off: attachments are still checked by their structure. No effect where the deployment has no engine (deepScanAvailable).

  • linkSandboxbooleanoptional

    Open the most suspect links of a message in an isolated browser before the message is delivered, to see where they lead. The site a link points at sees a visit. Links that verify an address, sign in, accept an invitation or unsubscribe are never opened, and neither are an authenticated sender's links to its own site. No effect where the deployment has no sandbox.

  • unscannable"deliver" | "warn" | "hold"optional

    The least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish): deliver, warn or hold.

Answers 200: The settings as they are now.

Response 200: SecuritySettings

A policy as it applies to the account or to one inbox, with what this deployment does with it.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

    The inbox the settings are for; null for the account's.

  • inheritedbooleanrequired

    Inbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.

  • policySecurityPolicyrequired

  • enforcement"off" | "observe" | "enforce"required

    What the deployment does: enforce applies the policy; observe assesses mail and records the result without warning, holding or blocking anything; off does not assess.

  • modelAnalysisAvailablebooleanrequired

    Whether this deployment has a model to read content with. When false, modelAnalysis has no effect.

  • deepScanAvailablebooleanoptional

    Whether this deployment runs the malware engine and the link sandbox. When false, deepScan and linkSandbox have no effect. Older deployments omit it.

  • updatedAtstring (date-time) | nullrequired

    When the policy was last changed; null while it is the default.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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.
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

{
  "scope": "account",
  "inboxId": null,
  "inherited": false,
  "policy": {
    "level": "balanced",
    "warnAt": 60,
    "holdAt": 85,
    "holdUnauthenticatedNewSenders": false,
    "replyGuard": true,
    "recipients": "any",
    "unscannable": "warn",
    "labels": {},
    "modelAnalysis": true,
    "sendApproval": "apps",
    "allowKeyManagement": false,
    "deepScan": true,
    "linkSandbox": true
  },
  "enforcement": "enforce",
  "modelAnalysisAvailable": true,
  "deepScanAvailable": true,
  "updatedAt": null
}
curl -s -X PATCH "https://api.doorman.fyi/v1/security" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "level": "strict"
  }'

Read an inbox's security policy

GET/v1/inboxes/{inboxId}/security

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

The policy in force for one inbox: its own when it has one, the account's otherwise (inherited says which).

OAuth: not available to delegated app tokens.

Also available as client.inboxes.security.get in TypeScript, client.inboxes.security.get in Python, the inboxes_security_get tool and doorman inboxes security 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's settings.

Response 200: SecuritySettings

A policy as it applies to the account or to one inbox, with what this deployment does with it.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

    The inbox the settings are for; null for the account's.

  • inheritedbooleanrequired

    Inbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.

  • policySecurityPolicyrequired

  • enforcement"off" | "observe" | "enforce"required

    What the deployment does: enforce applies the policy; observe assesses mail and records the result without warning, holding or blocking anything; off does not assess.

  • modelAnalysisAvailablebooleanrequired

    Whether this deployment has a model to read content with. When false, modelAnalysis has no effect.

  • deepScanAvailablebooleanoptional

    Whether this deployment runs the malware engine and the link sandbox. When false, deepScan and linkSandbox have no effect. Older deployments omit it.

  • updatedAtstring (date-time) | nullrequired

    When the policy was last changed; null while it is the default.

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

{
  "scope": "account",
  "inboxId": null,
  "inherited": false,
  "policy": {
    "level": "balanced",
    "warnAt": 60,
    "holdAt": 85,
    "holdUnauthenticatedNewSenders": false,
    "replyGuard": true,
    "recipients": "any",
    "unscannable": "warn",
    "labels": {},
    "modelAnalysis": true,
    "sendApproval": "apps",
    "allowKeyManagement": false,
    "deepScan": true,
    "linkSandbox": true
  },
  "enforcement": "enforce",
  "modelAnalysisAvailable": true,
  "deepScanAvailable": true,
  "updatedAt": null
}
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Give an inbox its own security policy

PATCH/v1/inboxes/{inboxId}/security

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

Starts from the policy in force for the inbox and applies the change; from then on the inbox no longer follows the account's policy. allowKeyManagement is the account's and is refused here. A change that loosens protection needs a console session unless the account allows its account keys to (403 session_required); a change that tightens it does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

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

Organizations: a member's console session needs security: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): UpdateSecurityPolicy

Changes to a policy. level applies a preset first; any other field given with it, or alone, then replaces that one value. Fields left out stay as they are. Loosening protection needs a console session unless the account allows its account keys to.

  • level"relaxed" | "balanced" | "strict"optional

    Apply this preset's thresholds and guards. It also clears the per-label rules, unless labels is given with it.

  • warnAtinteger | nulloptional

    Mail scoring at least this is delivered with a warning and is never answered automatically. Null means never. Example: 60

  • holdAtinteger | nulloptional

    Mail scoring at least this is held for the owner and kept from agents. Null means never. Not below warnAt. Example: 85

  • labelsobject of "warn" | "hold"optional

    The least that happens to mail carrying a label, whatever its score: warn or hold. Replaced as a whole; {} clears it. Example: {"prompt_injection":"hold"}

  • holdUnauthenticatedNewSendersbooleanoptional

    Hold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.

  • modelAnalysisbooleanoptional

    Let a model read the content of mail the signals leave undecided. The text goes to the deployment's AI gateway, is not kept and is never used for training. Off: assessments rest on the deterministic signals alone.

  • replyGuardbooleanoptional

    Refuse an agent's reply into a thread that holds a flagged message: one this policy warns about or holds, by its score or a label, or one the owner marked unsafe (403 risk_blocked). A message stops counting once the owner marks it safe, or while its sender is trusted and it passed authentication. A console session is never refused.

  • recipients"any" | "known"optional

    known: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403 risk_blocked otherwise). Having written to the inbox, or being named in a message, does not make a recipient known: answering a stranger takes a person, or trusting them first. any: no such limit. A console session is never refused.

  • sendApproval"off" | "apps" | "all"optional

    Whose sends wait for the owner when a recipient is not one the inbox knows or trusts, nor one of the account's own inboxes. apps: a connected app's. all: an app's and an API key's. off: nobody's. A send that waits answers 202 with a held send, which the owner sends or discards; it expires unsent after 7 days. A console session is never held, and neither is mail an inbox rule generates. It applies whatever the deployment's enforcement, except off, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts on apps.

  • allowKeyManagementbooleanoptional

    Let account keys loosen protection (trust a sender, raise a threshold, release held mail, approve a held send). Off by default, and only a console session can switch it on. Account scope only.

  • deepScanbooleanoptional

    Run every attachment, in both directions, through the deployment's malware engine. The bytes go to an isolated scanner that keeps nothing. Off: attachments are still checked by their structure. No effect where the deployment has no engine (deepScanAvailable).

  • linkSandboxbooleanoptional

    Open the most suspect links of a message in an isolated browser before the message is delivered, to see where they lead. The site a link points at sees a visit. Links that verify an address, sign in, accept an invitation or unsubscribe are never opened, and neither are an authenticated sender's links to its own site. No effect where the deployment has no sandbox.

  • unscannable"deliver" | "warn" | "hold"optional

    The least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish): deliver, warn or hold.

Answers 200: The inbox's settings as they are now.

Response 200: SecuritySettings

A policy as it applies to the account or to one inbox, with what this deployment does with it.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

    The inbox the settings are for; null for the account's.

  • inheritedbooleanrequired

    Inbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.

  • policySecurityPolicyrequired

  • enforcement"off" | "observe" | "enforce"required

    What the deployment does: enforce applies the policy; observe assesses mail and records the result without warning, holding or blocking anything; off does not assess.

  • modelAnalysisAvailablebooleanrequired

    Whether this deployment has a model to read content with. When false, modelAnalysis has no effect.

  • deepScanAvailablebooleanoptional

    Whether this deployment runs the malware engine and the link sandbox. When false, deepScan and linkSandbox have no effect. Older deployments omit it.

  • updatedAtstring (date-time) | nullrequired

    When the policy was last changed; null while it is the default.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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

{
  "scope": "account",
  "inboxId": null,
  "inherited": false,
  "policy": {
    "level": "balanced",
    "warnAt": 60,
    "holdAt": 85,
    "holdUnauthenticatedNewSenders": false,
    "replyGuard": true,
    "recipients": "any",
    "unscannable": "warn",
    "labels": {},
    "modelAnalysis": true,
    "sendApproval": "apps",
    "allowKeyManagement": false,
    "deepScan": true,
    "linkSandbox": true
  },
  "enforcement": "enforce",
  "modelAnalysisAvailable": true,
  "deepScanAvailable": true,
  "updatedAt": null
}
curl -s -X PATCH "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "level": "strict"
  }'

Return an inbox to the account's security policy

DELETE/v1/inboxes/{inboxId}/security

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

Removes the inbox's own policy, so it follows the account's again. A change that loosens protection needs a console session unless the account allows its account keys to (403 session_required); a change that tightens it does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.security.reset in TypeScript, client.inboxes.security.reset in Python, the inboxes_security_reset tool and doorman inboxes security reset on the command line.

Organizations: a member's console session needs security: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: The inbox follows the account's policy.

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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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/security" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

List an inbox's senders

GET/v1/inboxes/{inboxId}/senders

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

Everyone the inbox has received mail from or written to, most recently heard from first, with what arrived, what the inbox sent them and the standing that follows: trusted or blocked by a sender rule, known once the inbox wrote to them or they sent 3 authenticated messages over 7 days without a flag, new otherwise.

OAuth: not available to delegated app tokens.

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

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • standing"trusted" | "known" | "new" | "blocked", in queryoptional

    Only senders with this standing.

  • qstring, in queryoptional

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

  • 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 senders.

Response 200: SenderPage

A page of an inbox's senders, most recent first.

  • dataSender[]required

  • limitintegerrequired

    The page size that was applied.

  • offsetintegerrequired

    The offset that was applied.

  • totalintegerrequired

    How many senders 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.
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 "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/senders" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

List sender rules

GET/v1/sender-rules

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

The account's sender rules, newest first: the addresses and domains the owner trusts or blocks, for the whole account or for one inbox.

OAuth: not available to delegated app tokens.

Also available as client.senderRules.list in TypeScript, client.sender_rules.list in Python, the senderRules_list tool and doorman sender-rules list on the command line.

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

Parameters
  • inboxIdstring, in queryoptional

    Only the rules that apply to this inbox alone. Omit for every rule of the account. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • standing"trusted" | "blocked", in queryoptional

    Only trusted or only blocked.

  • qstring, in queryoptional

    Keep the rules whose address or domain contains this text.

  • 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 rules.

Response 200: SenderRulePage

A page of sender rules, newest first.

  • dataSenderRule[]required

  • limitintegerrequired

    The page size that was applied.

  • offsetintegerrequired

    The offset that was applied.

  • totalintegerrequired

    How many rules 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.
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/sender-rules" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Trust or block a sender

POST/v1/sender-rules

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

Trusts or blocks an address or a whole domain, for one inbox or the whole account. A rule for the same match in the same scope is replaced. An inbox's own rule wins over the account's, and an address wins over its domain. Trust counts only for mail that authenticates as the sender: a trusted name that fails authentication is treated as an impersonation. Mail from a blocked sender is refused. Trusting needs a console session unless the account allows its account keys to (403 session_required); blocking does not. The domain every account's inboxes share cannot be trusted as a whole. An account holds at most 2000 rules. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.senderRules.create in TypeScript, client.sender_rules.create in Python, the senderRules_create tool and doorman sender-rules create on the command line.

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

Request body (application/json): CreateSenderRule

The owner's word on a sender: an address or a whole domain, trusted or blocked, for one inbox or the whole account. A rule for the same match in the same scope is replaced.

  • matchstringrequired

    An address (sam@example.com) or a domain (example.com, which covers every address at it, not its subdomains). Example: sam@example.com

  • standing"trusted" | "blocked"required

    trusted: their authenticated mail is treated as low risk and replies to them are never guarded. blocked: their mail is refused. Trusting needs a console session unless the account allows its account keys to.

  • inboxIdstringoptional

    Apply to this inbox only. Omit for every inbox of the account. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • notestringoptional

    A label for whoever reads the list later, at most 200 characters.

Answers 201: The rule.

Response 201: SenderRule

A sender rule: who it matches, what it says, and where it applies.

  • idstringrequired

    A sender rule identifier. Example: snr_01jc5f1a2b3c4d5e6f7g8h9j0k

  • kind"address" | "domain"required

  • matchstringrequired

    Example: sam@example.com

  • standing"trusted" | "blocked"required

  • inboxIdstring | nullrequired

    The inbox the rule applies to; null for the whole account.

  • notestring | nullrequired

  • 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.
400invalid_jsonThe request body is not JSON.
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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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": "snr_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "kind": "address",
  "match": "sam@example.com",
  "standing": "trusted",
  "inboxId": null,
  "note": null,
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s -X POST "https://api.doorman.fyi/v1/sender-rules" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "match": "sam@example.com",
    "standing": "trusted"
  }'

Remove a sender rule

DELETE/v1/sender-rules/{senderRuleId}

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

The sender goes back to the standing they earned. Removing a block needs a console session unless the account allows its account keys to (403 session_required); removing trust does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.senderRules.delete in TypeScript, client.sender_rules.delete in Python, the senderRules_delete tool and doorman sender-rules delete on the command line.

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

Parameters
  • senderRuleIdstring, in pathrequired

    The sender rule. Example: snr_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 204: Removed.

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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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/sender-rules/snr_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

List held messages

GET/v1/inboxes/{inboxId}/held

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

The messages held for the owner under the security policy, newest first. Every caller that can read the inbox gets the stub: who sent it, when, and why it is held. The subject is added for a caller that may review held mail; the body and the attachments are never here. A held message is in no thread and in no other list until it is released.

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

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

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • 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 held messages.

Response 200: HeldMessagePage

A page of an inbox's held messages, newest first.

  • dataHeldMessage[]required

  • limitintegerrequired

    The page size that was applied.

  • offsetintegerrequired

    The offset that was applied.

  • totalintegerrequired

    How many messages are held, 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.
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 "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Release a held message

POST/v1/messages/{messageId}/release

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

Delivers a held message: it is threaded as if it had just arrived and message.received fires, with risk.action released. Agents can read it from then on, so releasing needs a console session unless the account allows its account keys to (403 session_required). It stays flagged: the reply guard applies to its thread until the message is marked safe or its sender is trusted. A message that is not held answers 404. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.messages.release in TypeScript, client.messages.release in Python, the messages_release tool and doorman messages release on the command line.

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

Parameters
  • messageIdstring, in pathrequired

    The message. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s.

Answers 200: The message, now delivered.

Response 200: Message

One message, inbound or outbound, with its text, headers, classification and attachments.

  • idstringrequired

    A message identifier. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • threadIdstringrequired

    A thread identifier. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • direction"inbound" | "outbound"required

  • rfcMessageIdstring | nullrequired

    The Message-ID header of inbound mail; null for mail this API sent. Example: <a1b2c3@example.com>

  • inReplyTostring | nullrequired

    The In-Reply-To header, when the message is a reply.

  • referencesstring[]required

    The References chain, oldest first.

  • fromNamedAddressrequired

  • toNamedAddress[]required

  • ccNamedAddress[]required

  • bccNamedAddress[]required

    Only outbound mail carries blind copies.

  • replyTostring | nullrequired

    The Reply-To address, when one was given.

  • deliveryRole"to" | "cc" | "bcc" | nullrequired

    How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.

  • subjectstringrequired

    Example: Invoice 2847

  • textstring | nullrequired

    The plain-text body, or text derived from the HTML when there was none.

  • hasHtmlbooleanrequired

    Whether an HTML body is stored; read it at /v1/messages/{messageId}/html.

  • rawUrlstring | nullrequired

    Where to download the original message/rfc822; null for outbound mail.

  • sizeBytesintegerrequired

  • category"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"required

    What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.

  • autoReplyablebooleanrequired

    False for anything an agent should not answer on its own.

  • verdict"clean" | "unverified" | "suspicious" | nullrequired

    From the authentication results; null for outbound mail.

  • spamScorenumber | nullrequired

    How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.

  • authenticationAuthenticationResults | nullrequired

  • serviceMessageService | nulloptional

    The outside service the message came from, for the inbox's passport; null for any other mail and for outbound mail. Older deployments omit it.

  • riskRiskAssessment | nulloptional

    Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.

  • redactionRedactionoptional

    What the account's healthcare guardrails found in the message (ADR-027), and whether subject, text and the attachments' parsedText carry placeholders in place of it. Absent where no guardrail applies.

  • occurredAtstring (date-time)required

    When the message arrived or was sent. Example: 2026-11-05T10:05:00.000Z

  • attachmentsAttachment[]required

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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
  "direction": "inbound",
  "rfcMessageId": "<a1b2c3@example.com>",
  "inReplyTo": null,
  "references": [],
  "from": {
    "address": "sam@example.com",
    "name": "Sam Rivera"
  },
  "to": [
    {
      "address": "concierge@doorman.example",
      "name": null
    }
  ],
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "deliveryRole": "to",
  "subject": "Invoice 2847",
  "text": "Hi, invoice 2847 is attached.",
  "hasHtml": true,
  "rawUrl": "https://api.doorman.example/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/raw",
  "sizeBytes": 48120,
  "category": "personal",
  "autoReplyable": true,
  "verdict": "clean",
  "spamScore": 0.02,
  "authentication": {
    "spf": "pass",
    "dkim": "pass",
    "dmarc": "pass"
  },
  "risk": {
    "score": 6,
    "level": "low",
    "labels": [],
    "reasons": [],
    "sender": {
      "standing": "known",
      "authenticated": true
    },
    "action": "delivered",
    "analysis": "full",
    "review": null
  },
  "occurredAt": "2026-11-05T10:05:00.000Z",
  "attachments": [
    {
      "filename": "invoice.pdf",
      "contentType": "application/pdf",
      "sizeBytes": 45000,
      "url": "https://api.doorman.example/v1/attachments/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/invoice.pdf",
      "parsedText": "Invoice 2847. Line 3: Setup fee, billed twice. Total 1,480.",
      "extractionMethod": "pdf"
    }
  ]
}
curl -s -X POST "https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/release" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Discard a held message

POST/v1/messages/{messageId}/discard

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

Moves a held message to the trash without ever delivering it. Nothing brings it back, and where the deployment erases it is erased 30 days later. A message that is not held answers 404. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.messages.discard in TypeScript, client.messages.discard in Python, the messages_discard tool and doorman messages discard on the command line.

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

Parameters
  • messageIdstring, in pathrequired

    The message. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s.

Answers 204: Discarded.

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 POST "https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/discard" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Mark a message safe or unsafe

POST/v1/messages/{messageId}/feedback

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

The owner's verdict on a delivered inbound message that was assessed. safe lifts the reply guard for it, stops it counting toward its thread's risk level and withdraws the flag it put on its sender; it needs a console session unless the account allows its account keys to (403 session_required). unsafe flags the sender, which keeps them from being known, stops automatic replies to the message and makes the reply guard apply to its thread. The score stays what Doorman concluded. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.messages.feedback in TypeScript, client.messages.feedback in Python, the messages_feedback tool and doorman messages feedback on the command line.

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

Parameters
  • messageIdstring, in pathrequired

    The message. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s.

Request body (application/json): RiskFeedback

The owner's verdict on a delivered message. safe lifts the reply guard for it; unsafe flags the sender and stops automatic replies to it.

  • verdict"safe" | "unsafe"required

Answers 200: The message with the verdict recorded.

Response 200: Message

One message, inbound or outbound, with its text, headers, classification and attachments.

  • idstringrequired

    A message identifier. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • threadIdstringrequired

    A thread identifier. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • direction"inbound" | "outbound"required

  • rfcMessageIdstring | nullrequired

    The Message-ID header of inbound mail; null for mail this API sent. Example: <a1b2c3@example.com>

  • inReplyTostring | nullrequired

    The In-Reply-To header, when the message is a reply.

  • referencesstring[]required

    The References chain, oldest first.

  • fromNamedAddressrequired

  • toNamedAddress[]required

  • ccNamedAddress[]required

  • bccNamedAddress[]required

    Only outbound mail carries blind copies.

  • replyTostring | nullrequired

    The Reply-To address, when one was given.

  • deliveryRole"to" | "cc" | "bcc" | nullrequired

    How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.

  • subjectstringrequired

    Example: Invoice 2847

  • textstring | nullrequired

    The plain-text body, or text derived from the HTML when there was none.

  • hasHtmlbooleanrequired

    Whether an HTML body is stored; read it at /v1/messages/{messageId}/html.

  • rawUrlstring | nullrequired

    Where to download the original message/rfc822; null for outbound mail.

  • sizeBytesintegerrequired

  • category"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"required

    What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.

  • autoReplyablebooleanrequired

    False for anything an agent should not answer on its own.

  • verdict"clean" | "unverified" | "suspicious" | nullrequired

    From the authentication results; null for outbound mail.

  • spamScorenumber | nullrequired

    How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.

  • authenticationAuthenticationResults | nullrequired

  • serviceMessageService | nulloptional

    The outside service the message came from, for the inbox's passport; null for any other mail and for outbound mail. Older deployments omit it.

  • riskRiskAssessment | nulloptional

    Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.

  • redactionRedactionoptional

    What the account's healthcare guardrails found in the message (ADR-027), and whether subject, text and the attachments' parsedText carry placeholders in place of it. Absent where no guardrail applies.

  • occurredAtstring (date-time)required

    When the message arrived or was sent. Example: 2026-11-05T10:05:00.000Z

  • attachmentsAttachment[]required

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
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": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
  "direction": "inbound",
  "rfcMessageId": "<a1b2c3@example.com>",
  "inReplyTo": null,
  "references": [],
  "from": {
    "address": "sam@example.com",
    "name": "Sam Rivera"
  },
  "to": [
    {
      "address": "concierge@doorman.example",
      "name": null
    }
  ],
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "deliveryRole": "to",
  "subject": "Invoice 2847",
  "text": "Hi, invoice 2847 is attached.",
  "hasHtml": true,
  "rawUrl": "https://api.doorman.example/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/raw",
  "sizeBytes": 48120,
  "category": "personal",
  "autoReplyable": true,
  "verdict": "clean",
  "spamScore": 0.02,
  "authentication": {
    "spf": "pass",
    "dkim": "pass",
    "dmarc": "pass"
  },
  "risk": {
    "score": 6,
    "level": "low",
    "labels": [],
    "reasons": [],
    "sender": {
      "standing": "known",
      "authenticated": true
    },
    "action": "delivered",
    "analysis": "full",
    "review": null
  },
  "occurredAt": "2026-11-05T10:05:00.000Z",
  "attachments": [
    {
      "filename": "invoice.pdf",
      "contentType": "application/pdf",
      "sizeBytes": 45000,
      "url": "https://api.doorman.example/v1/attachments/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/invoice.pdf",
      "parsedText": "Invoice 2847. Line 3: Setup fee, billed twice. Total 1,480.",
      "extractionMethod": "pdf"
    }
  ]
}
curl -s -X POST "https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/feedback" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "verdict": "safe"
  }'

Read the security audit log

GET/v1/security/audit

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

Every change to what protects the account, newest first: policy changes, sender rules, and held mail released, discarded or marked. Entries say who did it and carry no mail content.

OAuth: not available to delegated app tokens.

Also available as client.security.audit in TypeScript, client.security.audit in Python, the security_audit tool and doorman security audit on the command line.

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

Parameters
  • inboxIdstring, in queryoptional

    Only the entries about this inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • 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 entries.

Response 200: SecurityAuditPage

A page of the security audit log, newest first.

  • dataSecurityAuditEntry[]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/security/audit" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Preview what a policy does to a message

POST/v1/security/preview

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

Evaluates one message (a stored one, a built-in sample, or text of your own) under the policy in force or a draft, and answers what would happen and what an agent would be given. A message of your own is judged as one that passed authentication unless authenticated is false. Nothing is stored, sent or changed, and no model is called.

OAuth: not available to delegated app tokens.

Also available as client.security.preview in TypeScript, client.security.preview in Python, the security_preview tool and doorman security preview on the command line.

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

Request body (application/json): SecurityPreviewRequest

What to evaluate and under which policy. Give exactly one of messageId (a stored message, with the assessment it already has), sample (a built-in message) or text/html (your own). Nothing is stored or sent, and no model is called: a sample and your own message are judged by the deterministic signals.

  • inboxIdstringoptional

    Evaluate as this inbox: its senders and, without policy, its policy. Defaults to the message's inbox, or to the account's policy with no sender history. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • messageIdstringoptional

    A stored inbound message of the account that was assessed. A held one needs a caller that may review held mail. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • sample"ordinary" | "phishing" | "prompt_injection" | "impersonation"optional

    A built-in message: ordinary mail, a phishing attempt, an injection hidden from the reader, or an impersonation.

  • fromstringoptional

    The sender of your own message. Defaults to a sender the inbox has never seen. Example: stranger@example.net

  • authenticatedbooleanoptional

    Whether your own message passed authentication for its sender's domain. Defaults to true, so the content decides; false shows what a forged sender looks like.

  • subjectstringoptional

  • textstringoptional

    The plain-text body of your own message.

  • htmlstringoptional

    The HTML body of your own message.

  • policyUpdateSecurityPolicyoptional

    A draft to evaluate under, applied over the policy in force. Omit to use the policy in force.

Answers 200: The assessment, the action and the agent's view.

Response 200: SecurityPreview

What would happen to the message under the policy, and exactly what an agent reading the inbox would be given for it. The assessment's action is the one the policy leads to: what enforce would do, whatever the deployment's mode.

  • riskRiskAssessmentrequired

  • refusedbooleanrequired

    True when the sender is blocked: the message would be refused and never stored, whatever risk.action says the policy would otherwise have done.

  • agentViewstringrequired

    The text an agent receives for the message: the fenced mail, the mail behind a warning, the stub of a held message, or nothing but a note for mail that is refused.

  • enforcement"off" | "observe" | "enforce"required

    The deployment's mode, so a caller can say whether this is what happens today.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
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

{
  "risk": {
    "score": 92,
    "level": "critical",
    "labels": [
      "prompt_injection"
    ],
    "reasons": [
      "hidden_text",
      "instruction_override"
    ],
    "sender": {
      "standing": "new",
      "authenticated": false
    },
    "action": "held",
    "analysis": "signals",
    "review": null
  },
  "refused": false,
  "agentView": "A message from stranger@example.net is held for review: critical risk (prompt_injection). Its content is not shown.",
  "enforcement": "enforce"
}
curl -s -X POST "https://api.doorman.fyi/v1/security/preview" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "sample": "prompt_injection",
    "policy": {
      "level": "strict"
    }
  }'

List held sends

GET/v1/inboxes/{inboxId}/held-sends

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

The messages that wait for the owner before they leave the inbox, newest first: the sends the security policy kept (sendApproval) and the drafts written for the owner to send. The ones still waiting unless status says otherwise. Every caller that can read the inbox gets who each is to and where it stands; the subject and the text are added for a caller that may decide. An inbox has at most 50 sends the policy kept and 100 drafts waiting; one that nobody decides expires unsent after 7 days, a draft after 30. A connected app is not offered the list: it reads the held send it was answered with.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.heldSends.list in TypeScript, client.inboxes.held_sends.list in Python, the inboxes_heldSends_list tool and doorman inboxes held-sends list on the command line.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • status"held" | "sent" | "discarded" | "expired", in queryoptional

    Only held sends in this state. Defaults to held.

  • kind"held" | "draft", in queryoptional

    Only the sends the policy kept (held) or only drafts (draft). Both when left out.

  • 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 held sends.

Response 200: HeldSendPage

A page of an inbox's held sends, newest first.

  • dataHeldSend[]required

  • limitintegerrequired

    The page size that was applied.

  • offsetintegerrequired

    The offset that was applied.

  • totalintegerrequired

    How many 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.
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 "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held-sends" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Read a held send

GET/v1/held-sends/{heldSendId}

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

Where a held send stands: waiting, sent, discarded or expired. What it says is shown only to a caller that may decide.

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

Also available as client.heldSends.get in TypeScript, client.held_sends.get in Python, the heldSends_get tool and doorman held-sends get on the command line.

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

Parameters
  • heldSendIdstring, in pathrequired

    The held send. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 200: The held send.

Response 200: HeldSend

A message that waits for the owner: one that was asked to be sent and that the security policy kept, or a draft written for the owner to send. Every caller that can read the inbox gets who it is to and where it stands; the subject and the text are added for a caller that may decide (a console session, or an account key the account allows).

  • idstringrequired

    A held send's identifier. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • kind"held" | "draft"required

    Why it waits. held: the security policy kept a send for the owner. draft: an app or a key wrote it as a draft, and only the owner sends it.

  • status"held" | "sent" | "discarded" | "expired"required

    held while it waits. sent once the owner approved it and the mail went out. discarded when the owner said no. expired when nobody decided in time. Only a held send can be decided.

  • threadIdstring | nullrequired

    The thread a reply was written into; null for a new message.

  • tostring[]required

    Who it would go to: the recipients the request named, or on a reply that named none, the one the thread gives. Example: ["sam@example.com"]

  • ccstring[]required

  • bccstring[]required

  • unknownRecipientsstring[]required

    The recipients that made it wait: addresses the inbox neither knows nor trusts. Empty for a draft. Example: ["sam@example.com"]

  • subjectstring | nullrequired

    The subject as written, for a caller that may decide; null for every other caller, and on a reply that left it to the thread.

  • textstring | nullrequired

    The text as written (derived from the HTML when only HTML was given, and cut at 200,000 characters), for a caller that may decide; null for every other caller.

  • attachmentsintegerrequired

    How many attachments it carries.

  • requestedByobjectrequired

  • kind"app" | "key"required

    A connected app, or an API key.

  • namestring | nullrequired

    The app's or the key's name, when it has one. Example: Support agent

  • messageIdstring | nullrequired

    The message it became once it was sent; null otherwise.

  • createdAtstring (date-time)required

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

  • expiresAtstring (date-time)required

    When it expires unsent: 7 days after it was made, or 30 for a draft. Example: 2026-11-05T10:05:00.000Z

  • decidedAtstring (date-time) | nullrequired

    When it was sent, discarded or expired; null while it waits.

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.
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": "hsd_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "kind": "held",
  "status": "held",
  "threadId": null,
  "to": [
    "sam@example.com"
  ],
  "cc": [],
  "bcc": [],
  "unknownRecipients": [
    "sam@example.com"
  ],
  "subject": null,
  "text": null,
  "attachments": 0,
  "requestedBy": {
    "kind": "app",
    "name": "Support agent"
  },
  "messageId": null,
  "createdAt": "2026-11-05T10:05:00.000Z",
  "expiresAt": "2026-11-12T10:05:00.000Z",
  "decidedAt": null
}
curl -s "https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Send a held send

POST/v1/held-sends/{heldSendId}/approve

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

Sends the message as it was asked for, now: the limits, the plan's cap and the thread are checked at this moment, and message.sent fires as for any send. Its recipients become known to the inbox, as with any mail the inbox sends. It needs a console session unless the account allows its account keys to (403 session_required). A send that fails stays held and answers the error a send would. One that is no longer held answers 404. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.heldSends.approve in TypeScript, client.held_sends.approve in Python, the heldSends_approve tool and doorman held-sends approve on the command line.

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

Parameters
  • heldSendIdstring, in pathrequired

    The held send. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 201: The stored outbound message.

Response 201: SentMessage

The stored outbound message, with the identifier the sending provider assigned.

  • idstringrequired

    A message identifier. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • threadIdstringrequired

    A thread identifier. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • direction"inbound" | "outbound"required

  • rfcMessageIdstring | nullrequired

    The Message-ID header of inbound mail; null for mail this API sent. Example: <a1b2c3@example.com>

  • inReplyTostring | nullrequired

    The In-Reply-To header, when the message is a reply.

  • referencesstring[]required

    The References chain, oldest first.

  • fromNamedAddressrequired

  • toNamedAddress[]required

  • ccNamedAddress[]required

  • bccNamedAddress[]required

    Only outbound mail carries blind copies.

  • replyTostring | nullrequired

    The Reply-To address, when one was given.

  • deliveryRole"to" | "cc" | "bcc" | nullrequired

    How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.

  • subjectstringrequired

    Example: Invoice 2847

  • textstring | nullrequired

    The plain-text body, or text derived from the HTML when there was none.

  • hasHtmlbooleanrequired

    Whether an HTML body is stored; read it at /v1/messages/{messageId}/html.

  • rawUrlstring | nullrequired

    Where to download the original message/rfc822; null for outbound mail.

  • sizeBytesintegerrequired

  • category"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"required

    What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.

  • autoReplyablebooleanrequired

    False for anything an agent should not answer on its own.

  • verdict"clean" | "unverified" | "suspicious" | nullrequired

    From the authentication results; null for outbound mail.

  • spamScorenumber | nullrequired

    How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.

  • authenticationAuthenticationResults | nullrequired

  • serviceMessageService | nulloptional

    The outside service the message came from, for the inbox's passport; null for any other mail and for outbound mail. Older deployments omit it.

  • riskRiskAssessment | nulloptional

    Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.

  • redactionRedactionoptional

    What the account's healthcare guardrails found in the message (ADR-027), and whether subject, text and the attachments' parsedText carry placeholders in place of it. Absent where no guardrail applies.

  • occurredAtstring (date-time)required

    When the message arrived or was sent. Example: 2026-11-05T10:05:00.000Z

  • attachmentsAttachment[]required

  • providerMessageIdstring | nullrequired

    The provider's message identifier, used to thread replies to this message. Example: <b2c3d4@doorman.example>

Errors
StatusErrorMeaning
400recipient_suppressedA recipient previously bounced or complained and is suppressed.
400send_rejectedThe sending provider rejected the message; providerCode carries its reason.
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.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403inbox_suspendedThe inbox cannot send, or start a sign-in, at the moment.
403recipient_not_permittedA recipient is not permitted for this deployment.
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.
404thread_not_foundThe thread does not exist, belongs to another inbox or was trashed.
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.
413message_too_largeThe message exceeds the size limit, including attachments.
429rate_limit_exceededA per-inbox or per-account rate limit; Retry-After and resetsAt say when to try again.
429provider_rate_limitedThe sending provider is rate limiting this deployment.
500internal_errorSomething went wrong on the server.
502send_failedThe sending provider did not accept or could not deliver the message; providerCode carries its reason.
503sending_pausedSending is paused for this deployment pending review.
503sending_unavailableThe inbox domain is not onboarded for sending, or sending is not configured.

Example 201 response

{
  "id": "msg_01jc5b7h8j9k0m1n2p3q4r5s6t",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
  "direction": "outbound",
  "rfcMessageId": null,
  "inReplyTo": "<a1b2c3@example.com>",
  "references": [
    "<a1b2c3@example.com>"
  ],
  "from": {
    "address": "concierge@doorman.example",
    "name": "Acme concierge"
  },
  "to": [
    {
      "address": "sam@example.com",
      "name": null
    }
  ],
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "deliveryRole": null,
  "subject": "Re: Invoice 2847",
  "text": "Thanks, confirming for Thursday.",
  "hasHtml": false,
  "rawUrl": null,
  "sizeBytes": 31,
  "category": "personal",
  "autoReplyable": false,
  "verdict": null,
  "spamScore": null,
  "authentication": null,
  "occurredAt": "2026-11-05T10:05:00.000Z",
  "attachments": [],
  "providerMessageId": "<b2c3d4@doorman.example>"
}
curl -s -X POST "https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k/approve" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Discard a held send

POST/v1/held-sends/{heldSendId}/discard

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

Ends a held send without sending it and removes what it carried; send.discarded fires. Nothing brings it back. One that is no longer held answers 404. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.heldSends.discard in TypeScript, client.held_sends.discard in Python, the heldSends_discard tool and doorman held-sends discard on the command line.

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

Parameters
  • heldSendIdstring, in pathrequired

    The held send. Example: hsd_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 204: Discarded.

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 POST "https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k/discard" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

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