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"requiredinboxIdstring | nullrequiredThe inbox the settings are for; null for the account's.
inheritedbooleanrequiredInbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.
policySecurityPolicyrequiredenforcement"off" | "observe" | "enforce"requiredWhat the deployment does:
enforceapplies the policy;observeassesses mail and records the result without warning, holding or blocking anything;offdoes not assess.modelAnalysisAvailablebooleanrequiredWhether this deployment has a model to read content with. When false,
modelAnalysishas no effect.deepScanAvailablebooleanoptionalWhether this deployment runs the malware engine and the link sandbox. When false,
deepScanandlinkSandboxhave no effect. Older deployments omit it.updatedAtstring (date-time) | nullrequiredWhen the policy was last changed; null while it is the default.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | member_deactivated | The 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. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"const response = await fetch("https://api.doorman.fyi/v1/security", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/security",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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"optionalApply this preset's thresholds and guards. It also clears the per-label rules, unless
labelsis given with it.warnAtinteger | nulloptionalMail scoring at least this is delivered with a warning and is never answered automatically. Null means never. Example:
60holdAtinteger | nulloptionalMail scoring at least this is held for the owner and kept from agents. Null means never. Not below
warnAt. Example:85labelsobject of "warn" | "hold"optionalThe least that happens to mail carrying a label, whatever its score:
warnorhold. Replaced as a whole; {} clears it. Example:{"prompt_injection":"hold"}holdUnauthenticatedNewSendersbooleanoptionalHold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.
modelAnalysisbooleanoptionalLet 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.
replyGuardbooleanoptionalRefuse 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"optionalknown: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403risk_blockedotherwise). 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"optionalWhose 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'senforcement, exceptoff, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts onapps.allowKeyManagementbooleanoptionalLet 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.
deepScanbooleanoptionalRun 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).linkSandboxbooleanoptionalOpen 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"optionalThe least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish):
deliver,warnorhold.
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"requiredinboxIdstring | nullrequiredThe inbox the settings are for; null for the account's.
inheritedbooleanrequiredInbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.
policySecurityPolicyrequiredenforcement"off" | "observe" | "enforce"requiredWhat the deployment does:
enforceapplies the policy;observeassesses mail and records the result without warning, holding or blocking anything;offdoes not assess.modelAnalysisAvailablebooleanrequiredWhether this deployment has a model to read content with. When false,
modelAnalysishas no effect.deepScanAvailablebooleanoptionalWhether this deployment runs the malware engine and the link sandbox. When false,
deepScanandlinkSandboxhave no effect. Older deployments omit it.updatedAtstring (date-time) | nullrequiredWhen the policy was last changed; null while it is the default.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 400 | invalid_json | The request body is not JSON. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"
}'const response = await fetch("https://api.doorman.fyi/v1/security", {
method: "PATCH",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
"content-type": "application/json",
},
redirect: "manual", credentials: "omit",
body: JSON.stringify({
"level": "strict"
}),
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.patch(
"https://api.doorman.fyi/v1/security",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
json={
"level": "strict",
},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe 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"requiredinboxIdstring | nullrequiredThe inbox the settings are for; null for the account's.
inheritedbooleanrequiredInbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.
policySecurityPolicyrequiredenforcement"off" | "observe" | "enforce"requiredWhat the deployment does:
enforceapplies the policy;observeassesses mail and records the result without warning, holding or blocking anything;offdoes not assess.modelAnalysisAvailablebooleanrequiredWhether this deployment has a model to read content with. When false,
modelAnalysishas no effect.deepScanAvailablebooleanoptionalWhether this deployment runs the malware engine and the link sandbox. When false,
deepScanandlinkSandboxhave no effect. Older deployments omit it.updatedAtstring (date-time) | nullrequiredWhen the policy was last changed; null while it is the default.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"const response = await fetch("https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe 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"optionalApply this preset's thresholds and guards. It also clears the per-label rules, unless
labelsis given with it.warnAtinteger | nulloptionalMail scoring at least this is delivered with a warning and is never answered automatically. Null means never. Example:
60holdAtinteger | nulloptionalMail scoring at least this is held for the owner and kept from agents. Null means never. Not below
warnAt. Example:85labelsobject of "warn" | "hold"optionalThe least that happens to mail carrying a label, whatever its score:
warnorhold. Replaced as a whole; {} clears it. Example:{"prompt_injection":"hold"}holdUnauthenticatedNewSendersbooleanoptionalHold mail from a sender the inbox has never dealt with when it does not authenticate as its domain.
modelAnalysisbooleanoptionalLet 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.
replyGuardbooleanoptionalRefuse 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"optionalknown: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403risk_blockedotherwise). 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"optionalWhose 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'senforcement, exceptoff, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts onapps.allowKeyManagementbooleanoptionalLet 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.
deepScanbooleanoptionalRun 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).linkSandboxbooleanoptionalOpen 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"optionalThe least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish):
deliver,warnorhold.
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"requiredinboxIdstring | nullrequiredThe inbox the settings are for; null for the account's.
inheritedbooleanrequiredInbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account.
policySecurityPolicyrequiredenforcement"off" | "observe" | "enforce"requiredWhat the deployment does:
enforceapplies the policy;observeassesses mail and records the result without warning, holding or blocking anything;offdoes not assess.modelAnalysisAvailablebooleanrequiredWhether this deployment has a model to read content with. When false,
modelAnalysishas no effect.deepScanAvailablebooleanoptionalWhether this deployment runs the malware engine and the link sandbox. When false,
deepScanandlinkSandboxhave no effect. Older deployments omit it.updatedAtstring (date-time) | nullrequiredWhen the policy was last changed; null while it is the default.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 400 | invalid_json | The request body is not JSON. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"
}'const response = await fetch("https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security", {
method: "PATCH",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
"content-type": "application/json",
},
redirect: "manual", credentials: "omit",
body: JSON.stringify({
"level": "strict"
}),
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.patch(
"https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
json={
"level": "strict",
},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.
Answers 204: The inbox follows the account's policy.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s -X DELETE "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security", {
method: "DELETE",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
// 204: nothing to read.import os
import requests
response = requests.delete(
"https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/security",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
# 204: nothing to read.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 pathrequiredThe inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.standing"trusted" | "known" | "new" | "blocked", in queryoptionalOnly senders with this standing.
qstring, in queryoptionalKeep the senders whose address or name contains this text, case-insensitively.
limitinteger, in queryoptionalPage size, 1 to 100. Defaults to 50.
offsetinteger, in queryoptionalRows 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[]requiredlimitintegerrequiredThe page size that was applied.
offsetintegerrequiredThe offset that was applied.
totalintegerrequiredHow many senders match, across every page.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/senders" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/senders", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/senders",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 queryoptionalOnly the rules that apply to this inbox alone. Omit for every rule of the account. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.standing"trusted" | "blocked", in queryoptionalOnly trusted or only blocked.
qstring, in queryoptionalKeep the rules whose address or domain contains this text.
limitinteger, in queryoptionalPage size, 1 to 100. Defaults to 50.
offsetinteger, in queryoptionalRows to skip. Defaults to 0.
Answers 200: A page of rules.
Response 200: SenderRulePage
A page of sender rules, newest first.
dataSenderRule[]requiredlimitintegerrequiredThe page size that was applied.
offsetintegerrequiredThe offset that was applied.
totalintegerrequiredHow many rules match, across every page.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/sender-rules" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/sender-rules", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/sender-rules",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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.
matchstringrequiredAn address (
sam@example.com) or a domain (example.com, which covers every address at it, not its subdomains). Example:sam@example.comstanding"trusted" | "blocked"requiredtrusted: 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.inboxIdstringoptionalApply to this inbox only. Omit for every inbox of the account. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7znotestringoptionalA 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.
idstringrequiredA sender rule identifier. Example:
snr_01jc5f1a2b3c4d5e6f7g8h9j0kkind"address" | "domain"requiredmatchstringrequiredExample:
sam@example.comstanding"trusted" | "blocked"requiredinboxIdstring | nullrequiredThe inbox the rule applies to; null for the whole account.
notestring | nullrequiredcreatedAtstring (date-time)requiredExample:
2026-11-05T10:05:00.000ZupdatedAtstring (date-time)requiredExample:
2026-11-05T10:05:00.000Z
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 400 | invalid_json | The request body is not JSON. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | limit_reached | The 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. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"
}'const response = await fetch("https://api.doorman.fyi/v1/sender-rules", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
"content-type": "application/json",
},
redirect: "manual", credentials: "omit",
body: JSON.stringify({
"match": "sam@example.com",
"standing": "trusted"
}),
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/sender-rules",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
json={
"match": "sam@example.com",
"standing": "trusted",
},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe sender rule. Example:
snr_01jc5f1a2b3c4d5e6f7g8h9j0k.
Answers 204: Removed.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s -X DELETE "https://api.doorman.fyi/v1/sender-rules/snr_01jc5f1a2b3c4d5e6f7g8h9j0k" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/sender-rules/snr_01jc5f1a2b3c4d5e6f7g8h9j0k", {
method: "DELETE",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
// 204: nothing to read.import os
import requests
response = requests.delete(
"https://api.doorman.fyi/v1/sender-rules/snr_01jc5f1a2b3c4d5e6f7g8h9j0k",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
# 204: nothing to read.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 pathrequiredThe inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.limitinteger, in queryoptionalPage size, 1 to 100. Defaults to 50.
offsetinteger, in queryoptionalRows 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[]requiredlimitintegerrequiredThe page size that was applied.
offsetintegerrequiredThe offset that was applied.
totalintegerrequiredHow many messages are held, across every page.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe 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.
idstringrequiredA message identifier. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5sinboxIdstringrequiredAn inbox identifier. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7zthreadIdstringrequiredA thread identifier. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0mdirection"inbound" | "outbound"requiredrfcMessageIdstring | nullrequiredThe Message-ID header of inbound mail; null for mail this API sent. Example:
<a1b2c3@example.com>inReplyTostring | nullrequiredThe In-Reply-To header, when the message is a reply.
referencesstring[]requiredThe References chain, oldest first.
fromNamedAddressrequiredtoNamedAddress[]requiredccNamedAddress[]requiredbccNamedAddress[]requiredOnly outbound mail carries blind copies.
replyTostring | nullrequiredThe Reply-To address, when one was given.
deliveryRole"to" | "cc" | "bcc" | nullrequiredHow the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.
subjectstringrequiredExample:
Invoice 2847textstring | nullrequiredThe plain-text body, or text derived from the HTML when there was none.
hasHtmlbooleanrequiredWhether an HTML body is stored; read it at /v1/messages/{messageId}/html.
rawUrlstring | nullrequiredWhere to download the original message/rfc822; null for outbound mail.
sizeBytesintegerrequiredcategory"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"requiredWhat kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.
autoReplyablebooleanrequiredFalse for anything an agent should not answer on its own.
verdict"clean" | "unverified" | "suspicious" | nullrequiredFrom the authentication results; null for outbound mail.
spamScorenumber | nullrequiredHow likely the message is junk, from 0 to 1, when it was assessed; null otherwise.
authenticationAuthenticationResults | nullrequiredserviceMessageService | nulloptionalThe 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 | nulloptionalDoorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.
redactionRedactionoptionalWhat the account's healthcare guardrails found in the message (ADR-027), and whether
subject,textand the attachments'parsedTextcarry placeholders in place of it. Absent where no guardrail applies.occurredAtstring (date-time)requiredWhen the message arrived or was sent. Example:
2026-11-05T10:05:00.000ZattachmentsAttachment[]required
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"const response = await fetch("https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/release", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/release",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe message. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5s.
Answers 204: Discarded.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s -X POST "https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/discard" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/discard", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
// 204: nothing to read.import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/discard",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
# 204: nothing to read.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 pathrequiredThe 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.
idstringrequiredA message identifier. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5sinboxIdstringrequiredAn inbox identifier. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7zthreadIdstringrequiredA thread identifier. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0mdirection"inbound" | "outbound"requiredrfcMessageIdstring | nullrequiredThe Message-ID header of inbound mail; null for mail this API sent. Example:
<a1b2c3@example.com>inReplyTostring | nullrequiredThe In-Reply-To header, when the message is a reply.
referencesstring[]requiredThe References chain, oldest first.
fromNamedAddressrequiredtoNamedAddress[]requiredccNamedAddress[]requiredbccNamedAddress[]requiredOnly outbound mail carries blind copies.
replyTostring | nullrequiredThe Reply-To address, when one was given.
deliveryRole"to" | "cc" | "bcc" | nullrequiredHow the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.
subjectstringrequiredExample:
Invoice 2847textstring | nullrequiredThe plain-text body, or text derived from the HTML when there was none.
hasHtmlbooleanrequiredWhether an HTML body is stored; read it at /v1/messages/{messageId}/html.
rawUrlstring | nullrequiredWhere to download the original message/rfc822; null for outbound mail.
sizeBytesintegerrequiredcategory"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"requiredWhat kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.
autoReplyablebooleanrequiredFalse for anything an agent should not answer on its own.
verdict"clean" | "unverified" | "suspicious" | nullrequiredFrom the authentication results; null for outbound mail.
spamScorenumber | nullrequiredHow likely the message is junk, from 0 to 1, when it was assessed; null otherwise.
authenticationAuthenticationResults | nullrequiredserviceMessageService | nulloptionalThe 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 | nulloptionalDoorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.
redactionRedactionoptionalWhat the account's healthcare guardrails found in the message (ADR-027), and whether
subject,textand the attachments'parsedTextcarry placeholders in place of it. Absent where no guardrail applies.occurredAtstring (date-time)requiredWhen the message arrived or was sent. Example:
2026-11-05T10:05:00.000ZattachmentsAttachment[]required
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 400 | invalid_json | The request body is not JSON. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"
}'const response = await fetch("https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/feedback", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
"content-type": "application/json",
},
redirect: "manual", credentials: "omit",
body: JSON.stringify({
"verdict": "safe"
}),
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/feedback",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
json={
"verdict": "safe",
},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 queryoptionalOnly the entries about this inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.limitinteger, in queryoptionalPage size, 1 to 100. Defaults to 50.
offsetinteger, in queryoptionalRows to skip. Defaults to 0.
Answers 200: A page of entries.
Response 200: SecurityAuditPage
A page of the security audit log, newest first.
dataSecurityAuditEntry[]requiredlimitintegerrequiredThe page size that was applied.
offsetintegerrequiredThe offset that was applied.
totalintegerrequired
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/security/audit" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/security/audit", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/security/audit",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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.
inboxIdstringoptionalEvaluate 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_01jc4q7w9k2m5n8p3r6t1v4x7zmessageIdstringoptionalA stored inbound message of the account that was assessed. A held one needs a caller that may review held mail. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5ssample"ordinary" | "phishing" | "prompt_injection" | "impersonation"optionalA built-in message: ordinary mail, a phishing attempt, an injection hidden from the reader, or an impersonation.
fromstringoptionalThe sender of your own message. Defaults to a sender the inbox has never seen. Example:
stranger@example.netauthenticatedbooleanoptionalWhether 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.
subjectstringoptionaltextstringoptionalThe plain-text body of your own message.
htmlstringoptionalThe HTML body of your own message.
policyUpdateSecurityPolicyoptionalA 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.
riskRiskAssessmentrequiredrefusedbooleanrequiredTrue when the sender is blocked: the message would be refused and never stored, whatever
risk.actionsays the policy would otherwise have done.agentViewstringrequiredThe 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"requiredThe deployment's mode, so a caller can say whether this is what happens today.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 400 | invalid_json | The request body is not JSON. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"
}
}'const response = await fetch("https://api.doorman.fyi/v1/security/preview", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
"content-type": "application/json",
},
redirect: "manual", credentials: "omit",
body: JSON.stringify({
"sample": "prompt_injection",
"policy": {
"level": "strict"
}
}),
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/security/preview",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
json={
"sample": "prompt_injection",
"policy": {
"level": "strict",
},
},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe inbox. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7z.status"held" | "sent" | "discarded" | "expired", in queryoptionalOnly held sends in this state. Defaults to
held.kind"held" | "draft", in queryoptionalOnly the sends the policy kept (
held) or only drafts (draft). Both when left out.limitinteger, in queryoptionalPage size, 1 to 100. Defaults to 50.
offsetinteger, in queryoptionalRows 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[]requiredlimitintegerrequiredThe page size that was applied.
offsetintegerrequiredThe offset that was applied.
totalintegerrequiredHow many match, across every page.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | validation_error | A field is missing or invalid; the message names it. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held-sends" \
-H "authorization: Bearer $DOORMAN_API_KEY"const response = await fetch("https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held-sends", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/held-sends",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe 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).
idstringrequiredA held send's identifier. Example:
hsd_01jc5f1a2b3c4d5e6f7g8h9j0kinboxIdstringrequiredAn inbox identifier. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7zkind"held" | "draft"requiredWhy 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"requiredheldwhile it waits.sentonce the owner approved it and the mail went out.discardedwhen the owner said no.expiredwhen nobody decided in time. Only a held send can be decided.threadIdstring | nullrequiredThe thread a reply was written into; null for a new message.
tostring[]requiredWho 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[]requiredbccstring[]requiredunknownRecipientsstring[]requiredThe recipients that made it wait: addresses the inbox neither knows nor trusts. Empty for a draft. Example:
["sam@example.com"]subjectstring | nullrequiredThe 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 | nullrequiredThe 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.
attachmentsintegerrequiredHow many attachments it carries.
requestedByobjectrequiredkind"app" | "key"requiredA connected app, or an API key.
namestring | nullrequiredThe app's or the key's name, when it has one. Example:
Support agentmessageIdstring | nullrequiredThe message it became once it was sent; null otherwise.
createdAtstring (date-time)requiredExample:
2026-11-05T10:05:00.000ZexpiresAtstring (date-time)requiredWhen it expires unsent: 7 days after it was made, or 30 for a draft. Example:
2026-11-05T10:05:00.000ZdecidedAtstring (date-time) | nullrequiredWhen it was sent, discarded or expired; null while it waits.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something went wrong on the server. |
{
"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"const response = await fetch("https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k", {
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.get(
"https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe 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.
idstringrequiredA message identifier. Example:
msg_01jc5a6g7h8j9k0m1n2p3q4r5sinboxIdstringrequiredAn inbox identifier. Example:
inb_01jc4q7w9k2m5n8p3r6t1v4x7zthreadIdstringrequiredA thread identifier. Example:
thr_01jc5a1b2c3d4e5f6g7h8j9k0mdirection"inbound" | "outbound"requiredrfcMessageIdstring | nullrequiredThe Message-ID header of inbound mail; null for mail this API sent. Example:
<a1b2c3@example.com>inReplyTostring | nullrequiredThe In-Reply-To header, when the message is a reply.
referencesstring[]requiredThe References chain, oldest first.
fromNamedAddressrequiredtoNamedAddress[]requiredccNamedAddress[]requiredbccNamedAddress[]requiredOnly outbound mail carries blind copies.
replyTostring | nullrequiredThe Reply-To address, when one was given.
deliveryRole"to" | "cc" | "bcc" | nullrequiredHow the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail.
subjectstringrequiredExample:
Invoice 2847textstring | nullrequiredThe plain-text body, or text derived from the HTML when there was none.
hasHtmlbooleanrequiredWhether an HTML body is stored; read it at /v1/messages/{messageId}/html.
rawUrlstring | nullrequiredWhere to download the original message/rfc822; null for outbound mail.
sizeBytesintegerrequiredcategory"personal" | "automated" | "marketing" | "bounce" | "spam" | "malicious"requiredWhat kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated.
autoReplyablebooleanrequiredFalse for anything an agent should not answer on its own.
verdict"clean" | "unverified" | "suspicious" | nullrequiredFrom the authentication results; null for outbound mail.
spamScorenumber | nullrequiredHow likely the message is junk, from 0 to 1, when it was assessed; null otherwise.
authenticationAuthenticationResults | nullrequiredserviceMessageService | nulloptionalThe 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 | nulloptionalDoorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.
redactionRedactionoptionalWhat the account's healthcare guardrails found in the message (ADR-027), and whether
subject,textand the attachments'parsedTextcarry placeholders in place of it. Absent where no guardrail applies.occurredAtstring (date-time)requiredWhen the message arrived or was sent. Example:
2026-11-05T10:05:00.000ZattachmentsAttachment[]requiredproviderMessageIdstring | nullrequiredThe provider's message identifier, used to thread replies to this message. Example:
<b2c3d4@doorman.example>
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | recipient_suppressed | A recipient previously bounced or complained and is suppressed. |
| 400 | send_rejected | The sending provider rejected the message; providerCode carries its reason. |
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 402 | plan_limit_reached | The 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. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | session_required | Account 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. |
| 403 | inbox_suspended | The inbox cannot send, or start a sign-in, at the moment. |
| 403 | recipient_not_permitted | A recipient is not permitted for this deployment. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 404 | thread_not_found | The thread does not exist, belongs to another inbox or was trashed. |
| 409 | domain_not_verified | The custom domain has not verified its required DNS records. |
| 409 | account_mismatch | The 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. |
| 413 | message_too_large | The message exceeds the size limit, including attachments. |
| 429 | rate_limit_exceeded | A per-inbox or per-account rate limit; Retry-After and resetsAt say when to try again. |
| 429 | provider_rate_limited | The sending provider is rate limiting this deployment. |
| 500 | internal_error | Something went wrong on the server. |
| 502 | send_failed | The sending provider did not accept or could not deliver the message; providerCode carries its reason. |
| 503 | sending_paused | Sending is paused for this deployment pending review. |
| 503 | sending_unavailable | The inbox domain is not onboarded for sending, or sending is not configured. |
{
"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"const response = await fetch("https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k/approve", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
const result = await response.json();import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k/approve",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
result = response.json()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 pathrequiredThe held send. Example:
hsd_01jc5f1a2b3c4d5e6f7g8h9j0k.
Answers 204: Discarded.
Errors
| Status | Error | Meaning |
|---|---|---|
| 401 | unauthorized | The credential was missing, malformed, revoked or belongs to an inactive account. |
| 401 | session_invalid | The console session token could not be verified. |
| 401 | session_expired | The console session token has expired. |
| 401 | session_claims_missing | The session token does not carry a verified email address. |
| 403 | forbidden | The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data. |
| 403 | insufficient_scope | The app's token lacks a required scope, or the operation cannot be delegated. |
| 403 | account_suspended | The account is suspended. |
| 403 | account_deleted | The account was deleted. |
| 403 | permission_denied | The 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. |
| 403 | member_deactivated | The 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. |
| 404 | not_found | No such resource for this caller, or no such route. |
| 409 | account_mismatch | The 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. |
| 500 | internal_error | Something 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"const response = await fetch("https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k/discard", {
method: "POST",
headers: {
authorization: `Bearer ${process.env.DOORMAN_API_KEY}`,
},
redirect: "manual", credentials: "omit",
});
if (!response.ok) throw new Error(`The API answered ${response.status}.`);
// 204: nothing to read.import os
import requests
response = requests.post(
"https://api.doorman.fyi/v1/held-sends/hsd_01jc5f1a2b3c4d5e6f7g8h9j0k/discard",
headers={"authorization": f"Bearer {os.environ['DOORMAN_API_KEY']}"},
allow_redirects=False, timeout=30,
)
response.raise_for_status()
# 204: nothing to read.
