Healthcare

The business associate agreement an eligible team signs, and the guardrails it unlocks: protected health information replaced in everything an agent or a system is given, held or refused on the way out, and custom guardrails. Every operation answers 404 until the deployment switches the capability on.

Read the agreement's standing

GET/v1/baa

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

Where the account stands with the business associate agreement: whether it may sign (an organization whose Teams subscription pays for it, or an account on the enterprise plan), whether someone has, and whether guardrails apply.

OAuth: not available to delegated app tokens.

Also available as client.baa.get in TypeScript and client.baa.get in Python.

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

Answers 200: The account's standing.

Response 200: Baa

Where the account stands with the business associate agreement, and whether it may sign.

  • status"not_signed" | "active" | "reacceptance_required" | "terminated"required

    not_signed: nobody signed. active: the current text is signed. reacceptance_required: an earlier text is signed and the current one is not; guardrails keep applying. terminated: a person ended it, and guardrails no longer apply.

  • eligiblebooleanrequired

    Whether the account may sign and change guardrails now: an organization whose Teams subscription pays for it, or an account on the enterprise plan.

  • requirement"plan_required" | "not_signed" | "reacceptance_required" | nullrequired

    What stands between the account and changing guardrails; null when nothing does.

  • inForcebooleanrequired

    Whether guardrails apply to the account's mail now. They go on applying when the plan lapses, and stop only when a person ends the agreement.

  • versionstringrequired

    The version of the current text.

  • documentSha256stringrequired

    The SHA-256 of the current text.

  • agreementBaaAgreement | nullrequired

    The most recent record; null when nobody ever signed.

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

Example 200 response

{
  "status": "not_signed",
  "eligible": true,
  "requirement": "not_signed",
  "inForce": false,
  "version": "2026-11-draft",
  "documentSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "agreement": null
}
curl -s "https://api.doorman.fyi/v1/baa" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Read the agreement

GET/v1/baa/document

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

The current text of the business associate agreement with its version and its SHA-256. A signature names both, so what is signed is what was read.

OAuth: not available to delegated app tokens.

Also available as client.baa.document in TypeScript and client.baa.document in Python.

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

Answers 200: The text.

Response 200: BaaDocument

The current text of the business associate agreement, exactly as a signer is shown it.

  • versionstringrequired

  • sha256stringrequired

    The SHA-256 of text as UTF-8. Signing names it, so what is signed is what was read.

  • titlestringrequired

  • textstringrequired

    The agreement, as plain text.

  • placeholderbooleanrequired

    True while the text is a draft that counsel has not approved. A deployment that serves a placeholder is not offering a binding agreement.

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

Sign the agreement

POST/v1/baa/sign

Access session: a console session only; an API key gets 403 session_required.

A signed-in person signs the current text for their organization: their name, their title, the legal entity, and their name typed again as the signature. The record keeps the version and the hash of the text, the time, the signer and the address the request came from. An account that is not eligible answers 403 baa_required. A version or documentSha256 that is not the current text's answers 400 validation_error: read the document again. Signing the text that is already signed changes nothing. Guardrails apply from this moment with their defaults. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.baa.sign in TypeScript and client.baa.sign in Python.

Organizations: a member's console session needs compliance:manage. See Roles and permissions.

Request body (application/json): SignBaa

A signature on the current text. version and documentSha256 name what was read; signature is the signer's name typed again.

  • versionstringrequired

  • documentSha256stringrequired

  • namestringrequired

    The signer's full name.

  • titlestringrequired

    The signer's title at the entity.

  • entitystringrequired

    The legal entity the signer signs for and has authority to bind.

  • signaturestringrequired

    The signer's name, typed as their signature. It must equal name.

  • accepttruerequired

    The signer's statement that they read the text and may bind the entity.

Answers 200: The account's standing, with the record.

Response 200: Baa

Where the account stands with the business associate agreement, and whether it may sign.

  • status"not_signed" | "active" | "reacceptance_required" | "terminated"required

    not_signed: nobody signed. active: the current text is signed. reacceptance_required: an earlier text is signed and the current one is not; guardrails keep applying. terminated: a person ended it, and guardrails no longer apply.

  • eligiblebooleanrequired

    Whether the account may sign and change guardrails now: an organization whose Teams subscription pays for it, or an account on the enterprise plan.

  • requirement"plan_required" | "not_signed" | "reacceptance_required" | nullrequired

    What stands between the account and changing guardrails; null when nothing does.

  • inForcebooleanrequired

    Whether guardrails apply to the account's mail now. They go on applying when the plan lapses, and stop only when a person ends the agreement.

  • versionstringrequired

    The version of the current text.

  • documentSha256stringrequired

    The SHA-256 of the current text.

  • agreementBaaAgreement | nullrequired

    The most recent record; null when nobody ever signed.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403baa_requiredChanging healthcare guardrails needs a business associate agreement in force. baa says what is missing: plan_required when the account is not an organization on the Teams plan or on the enterprise plan, not_signed when nobody signed, reacceptance_required when the agreement's text changed since. Someone who may manage compliance signs it in the console.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "status": "not_signed",
  "eligible": true,
  "requirement": "not_signed",
  "inForce": false,
  "version": "2026-11-draft",
  "documentSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "agreement": null
}
curl -s -X POST "https://api.doorman.fyi/v1/baa/sign" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "version": "2026-11-draft",
    "documentSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
    "name": "Dana Ortiz",
    "title": "Privacy Officer",
    "entity": "Acme Health, Inc.",
    "signature": "Dana Ortiz",
    "accept": true
  }'

End the agreement

POST/v1/baa/terminate

Access session: a console session only; an API key gets 403 session_required.

Ends the agreement. Guardrails stop applying at once: keys, apps, webhooks and the stream are given mail as it arrived. The record is kept. An account with no agreement that stands answers 404. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.baa.terminate in TypeScript and client.baa.terminate in Python.

Organizations: a member's console session needs compliance:manage. See Roles and permissions.

Request body (application/json): TerminateBaa

Ends the agreement. From then on guardrails no longer apply and agents read mail as it arrived.

  • confirm"terminate"required

    The word terminate, so that nothing ends an agreement by accident.

Answers 200: The account's standing.

Response 200: Baa

Where the account stands with the business associate agreement, and whether it may sign.

  • status"not_signed" | "active" | "reacceptance_required" | "terminated"required

    not_signed: nobody signed. active: the current text is signed. reacceptance_required: an earlier text is signed and the current one is not; guardrails keep applying. terminated: a person ended it, and guardrails no longer apply.

  • eligiblebooleanrequired

    Whether the account may sign and change guardrails now: an organization whose Teams subscription pays for it, or an account on the enterprise plan.

  • requirement"plan_required" | "not_signed" | "reacceptance_required" | nullrequired

    What stands between the account and changing guardrails; null when nothing does.

  • inForcebooleanrequired

    Whether guardrails apply to the account's mail now. They go on applying when the plan lapses, and stop only when a person ends the agreement.

  • versionstringrequired

    The version of the current text.

  • documentSha256stringrequired

    The SHA-256 of the current text.

  • agreementBaaAgreement | nullrequired

    The most recent record; null when nobody ever signed.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "status": "not_signed",
  "eligible": true,
  "requirement": "not_signed",
  "inForce": false,
  "version": "2026-11-draft",
  "documentSha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "agreement": null
}
curl -s -X POST "https://api.doorman.fyi/v1/baa/terminate" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "confirm": "terminate"
  }'

Read the guardrails

GET/v1/guardrails

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

The account's built-in guardrails: whether they apply, which of the 14 kinds they look for, and what they do to mail that arrives and to what agents send. An account that never chose has every kind on, redacts inbound and holds outbound.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.get in TypeScript and client.guardrails.get in Python.

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

Answers 200: The account's guardrails.

Response 200: GuardrailSettings

The guardrails as they apply to the account or to one inbox, and whether they are in force.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

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

  • inheritedbooleanrequired

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

  • policyGuardrailPolicyrequired

  • inForcebooleanrequired

    Whether these guardrails apply to mail now: the account has an agreement that stands, and policy.enabled is true.

  • baa"not_signed" | "active" | "reacceptance_required" | "terminated"required

  • updatedAtstring (date-time) | nullrequired

    When the guardrails were last changed; null while they are the defaults.

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

Change the guardrails

PATCH/v1/guardrails

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

Changes single values; fields left out stay as they are. Every inbox without guardrails of its own follows the account's. It needs an agreement in force and an eligible account (403 baa_required). A change that takes protection away needs a console session unless the account allows its account keys to (403 session_required); one that adds protection does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.update in TypeScript and client.guardrails.update in Python.

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

Request body (application/json): UpdateGuardrailPolicy

Changes to the guardrails. Fields left out stay as they are; entities changes the kinds it names and leaves the others. A change that takes protection away needs a console session unless the account allows its account keys to.

  • enabledbooleanoptional

    Whether the guardrails apply at all. Off: nothing is detected, redacted, held or refused.

  • inbound"off" | "redact" | "hold"optional

    What the built-in detectors do to mail that arrives. redact: each finding is replaced in everything a key, an app, a webhook, the stream or a model is given, and the original, its HTML and affected attachments are refused to them. hold: the message waits for the owner as held mail does. off: nothing.

  • outbound"off" | "hold" | "block"optional

    What the built-in detectors do to a send by a key or an app. block: refused with 403 risk_blocked and the guard guardrail. hold: it waits for the owner as a held send. off: nothing. A person sending from the console is never refused.

  • entitiesobject of booleanoptional

    The kinds to switch on or off.

Answers 200: The guardrails as they are now.

Response 200: GuardrailSettings

The guardrails as they apply to the account or to one inbox, and whether they are in force.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

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

  • inheritedbooleanrequired

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

  • policyGuardrailPolicyrequired

  • inForcebooleanrequired

    Whether these guardrails apply to mail now: the account has an agreement that stands, and policy.enabled is true.

  • baa"not_signed" | "active" | "reacceptance_required" | "terminated"required

  • updatedAtstring (date-time) | nullrequired

    When the guardrails were last changed; null while they are the defaults.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403baa_requiredChanging healthcare guardrails needs a business associate agreement in force. baa says what is missing: plan_required when the account is not an organization on the Teams plan or on the enterprise plan, not_signed when nobody signed, reacceptance_required when the agreement's text changed since. Someone who may manage compliance signs it in the console.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s -X PATCH "https://api.doorman.fyi/v1/guardrails" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "outbound": "block"
  }'

Read an inbox's guardrails

GET/v1/inboxes/{inboxId}/guardrails

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

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

OAuth: not available to delegated app tokens.

Also available as client.inboxes.guardrails.get in TypeScript and client.inboxes.guardrails.get in Python.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Answers 200: The inbox's guardrails.

Response 200: GuardrailSettings

The guardrails as they apply to the account or to one inbox, and whether they are in force.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

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

  • inheritedbooleanrequired

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

  • policyGuardrailPolicyrequired

  • inForcebooleanrequired

    Whether these guardrails apply to mail now: the account has an agreement that stands, and policy.enabled is true.

  • baa"not_signed" | "active" | "reacceptance_required" | "terminated"required

  • updatedAtstring (date-time) | nullrequired

    When the guardrails were last changed; null while they are the defaults.

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

Give an inbox its own guardrails

PATCH/v1/inboxes/{inboxId}/guardrails

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

Starts from the guardrails in force for the inbox and applies the change; from then on the inbox no longer follows the account's. It needs an agreement in force and an eligible account (403 baa_required). A change that takes protection away needs a console session unless the account allows its account keys to (403 session_required); one that adds protection does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.guardrails.update in TypeScript and client.inboxes.guardrails.update in Python.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Request body (application/json): UpdateGuardrailPolicy

Changes to the guardrails. Fields left out stay as they are; entities changes the kinds it names and leaves the others. A change that takes protection away needs a console session unless the account allows its account keys to.

  • enabledbooleanoptional

    Whether the guardrails apply at all. Off: nothing is detected, redacted, held or refused.

  • inbound"off" | "redact" | "hold"optional

    What the built-in detectors do to mail that arrives. redact: each finding is replaced in everything a key, an app, a webhook, the stream or a model is given, and the original, its HTML and affected attachments are refused to them. hold: the message waits for the owner as held mail does. off: nothing.

  • outbound"off" | "hold" | "block"optional

    What the built-in detectors do to a send by a key or an app. block: refused with 403 risk_blocked and the guard guardrail. hold: it waits for the owner as a held send. off: nothing. A person sending from the console is never refused.

  • entitiesobject of booleanoptional

    The kinds to switch on or off.

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

Response 200: GuardrailSettings

The guardrails as they apply to the account or to one inbox, and whether they are in force.

  • scope"account" | "inbox"required

  • inboxIdstring | nullrequired

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

  • inheritedbooleanrequired

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

  • policyGuardrailPolicyrequired

  • inForcebooleanrequired

    Whether these guardrails apply to mail now: the account has an agreement that stands, and policy.enabled is true.

  • baa"not_signed" | "active" | "reacceptance_required" | "terminated"required

  • updatedAtstring (date-time) | nullrequired

    When the guardrails were last changed; null while they are the defaults.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403baa_requiredChanging healthcare guardrails needs a business associate agreement in force. baa says what is missing: plan_required when the account is not an organization on the Teams plan or on the enterprise plan, not_signed when nobody signed, reacceptance_required when the agreement's text changed since. Someone who may manage compliance signs it in the console.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s -X PATCH "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/guardrails" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "outbound": "block"
  }'

Return an inbox to the account's guardrails

DELETE/v1/inboxes/{inboxId}/guardrails

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

Removes the inbox's own guardrails, so it follows the account's again. It needs an agreement in force and an eligible account (403 baa_required). A change that takes protection away needs a console session unless the account allows its account keys to (403 session_required); one that adds protection does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.guardrails.reset in TypeScript and client.inboxes.guardrails.reset in Python.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Answers 204: The inbox follows the account's guardrails.

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403baa_requiredChanging healthcare guardrails needs a business associate agreement in force. baa says what is missing: plan_required when the account is not an organization on the Teams plan or on the enterprise plan, not_signed when nobody signed, reacceptance_required when the agreement's text changed since. Someone who may manage compliance signs it in the console.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s -X DELETE "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/guardrails" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

List custom guardrails

GET/v1/guardrails/rules

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

The account's custom guardrails, oldest first: the terms and patterns of its own that are redacted, held or refused beside the built-in kinds. What each one matches (value) is shown to a caller that may change guardrails and is null for everyone else, since it is what the guardrail keeps from agents.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.rules.list in TypeScript and client.guardrails.rules.list in Python.

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

Parameters
  • inboxIdstring, in queryoptional

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

Answers 200: The guardrails.

Response 200: GuardrailRuleList

The account's custom guardrails, oldest first.

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

Write a custom guardrail

POST/v1/guardrails/rules

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

A term or a pattern of the account's own, for the whole account or one inbox. A term is matched whole and without regard to case. A pattern is a mask and not a regular expression: # is a digit, @ a letter, * either, any other character itself, and {n} or {n,m} a count, so MRN-#{6,10} is MRN- and six to ten digits. Each part takes as many characters as it can, so a part whose length varies cannot be followed by one that could take the same characters. A match is reported as the kind custom. An account holds at most 50. It needs an agreement in force and an eligible account (403 baa_required). Recorded in the audit log by name, never by what it matches.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.rules.create in TypeScript and client.guardrails.rules.create in Python.

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

Request body (application/json): CreateGuardrailRule

A custom guardrail: a term or a pattern of your own, with what a match does in each direction, for the whole account or one inbox.

  • namestringrequired

    A label, at most 80 characters. It appears in the console and the audit log, so it should not itself be sensitive. Example: Study participant ids

  • kind"term" | "pattern"required

    term: a word or phrase, matched whole and without regard to case. pattern: a mask, where # is a digit, @ a letter, * either, any other character itself, and {n} or {n,m} a count, as in MRN-#{6,10}. A pattern is not a regular expression.

  • valuestringrequired

    The term or the pattern. Example: PT-#{6}

  • inbound"off" | "redact" | "hold"optional

    What a match does to mail that arrives. Defaults to redact.

  • outbound"off" | "hold" | "block"optional

    What a match does to a send by a key or an app. Defaults to off.

  • enabledbooleanoptional

    Whether the guardrail applies. Defaults to true.

  • inboxIdstringoptional

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

Answers 201: The guardrail.

Response 201: GuardrailRule

A custom guardrail: what it matches, what a match does, and where it applies.

  • idstringrequired

    A custom guardrail's identifier. Example: grd_01jc5f1a2b3c4d5e6f7g8h9j0k

  • namestringrequired

  • kind"term" | "pattern"required

  • valuestring | nullrequired

    The term or the pattern, for a caller that may change guardrails: a signed-in person who holds compliance:manage, or an account key where the account lets its keys manage security. Null for every other caller: what a guardrail matches is what it keeps from agents, so a key an agent holds is not told it.

  • inbound"off" | "redact" | "hold"required

  • outbound"off" | "hold" | "block"required

  • enabledbooleanrequired

  • inboxIdstring | nullrequired

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

  • createdAtstring (date-time)required

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

  • updatedAtstring (date-time)required

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

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

Example 201 response

{
  "id": "grd_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "name": "Study participant ids",
  "kind": "pattern",
  "value": "PT-#{6}",
  "inbound": "redact",
  "outbound": "block",
  "enabled": true,
  "inboxId": null,
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s -X POST "https://api.doorman.fyi/v1/guardrails/rules" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "Study participant ids",
    "kind": "pattern",
    "value": "PT-#{6}",
    "inbound": "redact",
    "outbound": "block"
  }'

Change a custom guardrail

PATCH/v1/guardrails/rules/{guardrailId}

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

Changes its name, what a match does or whether it applies. What it matches cannot be changed. It needs an agreement in force and an eligible account (403 baa_required). A change that takes protection away needs a console session unless the account allows its account keys to (403 session_required); one that adds protection does not. Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.rules.update in TypeScript and client.guardrails.rules.update in Python.

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

Parameters
  • guardrailIdstring, in pathrequired

    The custom guardrail. Example: grd_01jc5f1a2b3c4d5e6f7g8h9j0k.

Request body (application/json): UpdateGuardrailRule

Changes to a custom guardrail. What it matches cannot be changed: remove it and write another. Switching it off or lowering an action takes protection away and needs a console session unless the account allows its account keys to.

  • namestringoptional

    A label, at most 80 characters. It appears in the console and the audit log, so it should not itself be sensitive. Example: Study participant ids

  • inbound"off" | "redact" | "hold"optional

    What a match does to mail that arrives. Defaults to redact.

  • outbound"off" | "hold" | "block"optional

    What a match does to a send by a key or an app. Defaults to off.

  • enabledbooleanoptional

    Whether the guardrail applies. Defaults to true.

Answers 200: The guardrail as it is now.

Response 200: GuardrailRule

A custom guardrail: what it matches, what a match does, and where it applies.

  • idstringrequired

    A custom guardrail's identifier. Example: grd_01jc5f1a2b3c4d5e6f7g8h9j0k

  • namestringrequired

  • kind"term" | "pattern"required

  • valuestring | nullrequired

    The term or the pattern, for a caller that may change guardrails: a signed-in person who holds compliance:manage, or an account key where the account lets its keys manage security. Null for every other caller: what a guardrail matches is what it keeps from agents, so a key an agent holds is not told it.

  • inbound"off" | "redact" | "hold"required

  • outbound"off" | "hold" | "block"required

  • enabledbooleanrequired

  • inboxIdstring | nullrequired

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

  • createdAtstring (date-time)required

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

  • updatedAtstring (date-time)required

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

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403baa_requiredChanging healthcare guardrails needs a business associate agreement in force. baa says what is missing: plan_required when the account is not an organization on the Teams plan or on the enterprise plan, not_signed when nobody signed, reacceptance_required when the agreement's text changed since. Someone who may manage compliance signs it in the console.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "id": "grd_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "name": "Study participant ids",
  "kind": "pattern",
  "value": "PT-#{6}",
  "inbound": "redact",
  "outbound": "block",
  "enabled": true,
  "inboxId": null,
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}
curl -s -X PATCH "https://api.doorman.fyi/v1/guardrails/rules/grd_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "outbound": "hold"
  }'

Remove a custom guardrail

DELETE/v1/guardrails/rules/{guardrailId}

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

What it matched is no longer redacted, held or refused, in mail that already arrived too. It needs an agreement in force and an eligible account (403 baa_required). Removing one takes protection away, so it needs a console session unless the account allows its account keys to (403 session_required). Recorded in the audit log.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.rules.delete in TypeScript and client.guardrails.rules.delete in Python.

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

Parameters
  • guardrailIdstring, in pathrequired

    The custom guardrail. Example: grd_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 204: Removed.

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403baa_requiredChanging healthcare guardrails needs a business associate agreement in force. baa says what is missing: plan_required when the account is not an organization on the Teams plan or on the enterprise plan, not_signed when nobody signed, reacceptance_required when the agreement's text changed since. Someone who may manage compliance signs it in the console.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
curl -s -X DELETE "https://api.doorman.fyi/v1/guardrails/rules/grd_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Preview what the guardrails do to a text

POST/v1/guardrails/preview

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

Runs the guardrails in force, or a draft of them, over a text of your own and answers what an agent would be given, what was found and what would happen. It works before an agreement is signed, so a team can see what it would get. Nothing is stored, sent or changed, and no model is called.

OAuth: not available to delegated app tokens.

Also available as client.guardrails.preview in TypeScript and client.guardrails.preview in Python.

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

Request body (application/json): GuardrailPreviewRequest

Text to run the guardrails over. Nothing is stored or sent. Give policy or rule to try a change before making it.

  • textstringrequired

  • subjectstringoptional

  • direction"inbound" | "outbound"optional

    Whether the text is mail that arrives or a send by an agent. Defaults to inbound.

  • inboxIdstringoptional

    Evaluate as this inbox: its guardrails and its custom guardrails. Defaults to the account's. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • policyUpdateGuardrailPolicyoptional

    A draft, applied over the guardrails in force.

  • ruleobjectoptional

    A custom guardrail to try beside the ones that exist.

  • kind"term" | "pattern"required

    term: a word or phrase, matched whole and without regard to case. pattern: a mask, where # is a digit, @ a letter, * either, any other character itself, and {n} or {n,m} a count, as in MRN-#{6,10}. A pattern is not a regular expression.

  • valuestringrequired

    The term or the pattern. Example: PT-#{6}

  • inbound"off" | "redact" | "hold"optional

    What a match does to mail that arrives. Defaults to redact.

  • outbound"off" | "hold" | "block"optional

    What a match does to a send by a key or an app. Defaults to off.

Answers 200: The redacted text, the findings and the action.

Response 200: GuardrailPreview

What the guardrails do with the text: what an agent would be given, what was found, and what would happen to the message. The preview applies the guardrails as if an agreement were in force, whatever the account's standing.

  • textstringrequired

    The text with every finding replaced.

  • subjectstring | nullrequired

    The subject with every finding replaced; null when none was given.

  • redactionRedactionrequired

  • action"none" | "redact" | "hold" | "block"required

    The strictest thing a match asks for in this direction: none when nothing matched or everything that matched is off.

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

Example 200 response

{
  "text": "Patient: [REDACTED:PATIENT_NAME], DOB [REDACTED:DATE_OF_BIRTH], SSN [REDACTED:SSN].",
  "subject": null,
  "redaction": {
    "applied": true,
    "entities": [
      {
        "type": "ssn",
        "count": 1
      },
      {
        "type": "date_of_birth",
        "count": 1
      },
      {
        "type": "patient_name",
        "count": 1
      }
    ]
  },
  "action": "redact"
}
curl -s -X POST "https://api.doorman.fyi/v1/guardrails/preview" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "text": "Patient: Sam Rivera, DOB 04/12/1984, SSN 536-22-8726."
  }'

Read a message as it arrived

GET/v1/messages/{messageId}/original

Access session: a console session only; an API key gets 403 session_required.

The message without the placeholders the guardrails put in everything else: for a signed-in person who holds phi:read, and for nobody else. redaction.applied is false and redaction.entities says what the guardrails found. Every read of a message that carries findings is recorded in the audit log by the message's id. Every other read of a message, by a person too, carries the placeholders. The same permission opens the original message, its HTML body and its attachments to a person where the guardrails refuse them to keys and apps.

OAuth: not available to delegated app tokens.

Also available as client.messages.original in TypeScript and client.messages.original in Python.

Organizations: a member's console session needs phi:read and mail:read. See Roles and permissions.

Parameters
  • messageIdstring, in pathrequired

    The message. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s.

Answers 200: The message as it arrived.

Response 200: Message

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

  • idstringrequired

    A message identifier. Example: msg_01jc5a6g7h8j9k0m1n2p3q4r5s

  • inboxIdstringrequired

    An inbox identifier. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z

  • threadIdstringrequired

    A thread identifier. Example: thr_01jc5a1b2c3d4e5f6g7h8j9k0m

  • direction"inbound" | "outbound"required

  • rfcMessageIdstring | nullrequired

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

  • inReplyTostring | nullrequired

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

  • referencesstring[]required

    The References chain, oldest first.

  • fromNamedAddressrequired

  • toNamedAddress[]required

  • ccNamedAddress[]required

  • bccNamedAddress[]required

    Only outbound mail carries blind copies.

  • replyTostring | nullrequired

    The Reply-To address, when one was given.

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

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

  • subjectstringrequired

    Example: Invoice 2847

  • textstring | nullrequired

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

  • hasHtmlbooleanrequired

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

  • rawUrlstring | nullrequired

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

  • sizeBytesintegerrequired

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

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

  • autoReplyablebooleanrequired

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

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

    From the authentication results; null for outbound mail.

  • spamScorenumber | nullrequired

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

  • authenticationAuthenticationResults | nullrequired

  • serviceMessageService | nulloptional

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

  • riskRiskAssessment | nulloptional

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

  • redactionRedactionoptional

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

  • occurredAtstring (date-time)required

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

  • attachmentsAttachment[]required

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 200 response

{
  "id": "msg_01jc5a6g7h8j9k0m1n2p3q4r5s",
  "inboxId": "inb_01jc4q7w9k2m5n8p3r6t1v4x7z",
  "threadId": "thr_01jc5a1b2c3d4e5f6g7h8j9k0m",
  "direction": "inbound",
  "rfcMessageId": "<a1b2c3@example.com>",
  "inReplyTo": null,
  "references": [],
  "from": {
    "address": "sam@example.com",
    "name": "Sam Rivera"
  },
  "to": [
    {
      "address": "concierge@doorman.example",
      "name": null
    }
  ],
  "cc": [],
  "bcc": [],
  "replyTo": null,
  "deliveryRole": "to",
  "subject": "Invoice 2847",
  "text": "Hi, invoice 2847 is attached.",
  "hasHtml": true,
  "rawUrl": "https://api.doorman.example/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/raw",
  "sizeBytes": 48120,
  "category": "personal",
  "autoReplyable": true,
  "verdict": "clean",
  "spamScore": 0.02,
  "authentication": {
    "spf": "pass",
    "dkim": "pass",
    "dmarc": "pass"
  },
  "risk": {
    "score": 6,
    "level": "low",
    "labels": [],
    "reasons": [],
    "sender": {
      "standing": "known",
      "authenticated": true
    },
    "action": "delivered",
    "analysis": "full",
    "review": null
  },
  "occurredAt": "2026-11-05T10:05:00.000Z",
  "attachments": [
    {
      "filename": "invoice.pdf",
      "contentType": "application/pdf",
      "sizeBytes": 45000,
      "url": "https://api.doorman.example/v1/attachments/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/invoice.pdf",
      "parsedText": "Invoice 2847. Line 3: Setup fee, billed twice. Total 1,480.",
      "extractionMethod": "pdf"
    }
  ]
}
curl -s "https://api.doorman.fyi/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/original" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

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