# Doorman Inbox > Give your AI agent an email address. Receive messages, read attachments and send replies from one inbox. Every page below is Markdown. The same page for a browser is its address without `.md`, and any page of the documentation answers as Markdown to a request with the header `Accept: text/markdown`. ## Guides ### Get started - [Documentation](https://doorman.fyi/docs.md): Everything for building on Doorman Inbox: connect the agent you use, call the API, or write an agent that answers mail. Every page is also plain Markdown, for the agent you work with. - [Introduction](https://doorman.fyi/docs/introduction.md): What Doorman Inbox is, the nouns the API uses, and the three ways your agent is told about mail. - [Quickstart](https://doorman.fyi/docs/quickstart.md): Two ways to a first message: connect the agent you already use with one address and no key, or call the API yourself with a key, in five steps with curl. - [Connect your agent](https://doorman.fyi/docs/connect.md): Connect the agent you already use with one address and no key: the steps for each agent, what you approve, what it can do, how long it lasts and how to disconnect it. ### Mail - [Issuing inboxes](https://doorman.fyi/docs/inboxes.md): Addresses on the inbox domain: names, random names, display names, the one-call issue with a webhook and a key, your own externalId, plan limits, and deletion. - [Receiving mail](https://doorman.fyi/docs/receiving.md): How a message becomes a thread, a message and an event: attachments and their text, the raw and HTML bodies, categories, verdicts and the auto-replyable flag, threading and duplicates. - [Sending and replying](https://doorman.fyi/docs/sending.md): New messages and replies from an inbox: the fields, quoting, attachments and inline images, multipart bodies, idempotent retries, the limits, and what a refused send answers. - [Custom domains](https://doorman.fyi/docs/custom-domains.md): Addresses on a domain you own: adding the domain, publishing its DNS records automatically or by hand, verification, the days an unverified domain is kept, inboxes on the domain, and removal. ### Being told about mail - [Webhooks](https://doorman.fyi/docs/webhooks.md): Inbox and account webhooks, typed lifecycle payloads, signature verification in Node, Web Crypto and Python, retries, delivery failures, the delivery log and test deliveries. - [Events and polling](https://doorman.fyi/docs/events.md): The account's event log: what an event is, its seq, paging back through the log with cursor, and polling it forward with after. - [The WebSocket stream](https://doorman.fyi/docs/stream.md): Events pushed over a WebSocket the moment they commit: connecting, the frames in both directions, replay with last_event_id, the limits and the close codes. ### Automation and trust - [Inbound rules](https://doorman.fyi/docs/rules.md): Durable rules that act on mail as it arrives, without your code running: what a rule matches, the four actions, the order they run in, what keeps generated mail from looping, and the history of every run. - [Security and sender trust](https://doorman.fyi/docs/security.md): Inbound risk assessment, reason codes, the checks of attachments and links in both directions, sender standings, security policies and presets, held mail, outbound send guards, rule conditions and policy previews. - [The passport](https://doorman.fyi/docs/passport.md): The outside services an inbox's address is signed up for, the verification codes and sign-in links the inbox reads from its mail, and how an address signs in where a service accepts Sign in with Doorman. - [Sign in with Doorman](https://doorman.fyi/docs/sign-in.md): Let agents sign in to your service with their Doorman address: a standard OpenID Connect provider whose subject is an agent's inbox, with what a service configures, proves and reads. ### Access - [Authentication and keys](https://doorman.fyi/docs/authentication.md): The bearer credential every call carries, account and inbox scope, minting and revoking keys, and GET /v1/me. - [Organizations](https://doorman.fyi/docs/organizations.md): An account a team shares: the two roles and their permissions, which operations need which, what API keys and app tokens are not held to, connecting agents, moving a personal account in, the x-doorman-account header, and the errors. - [Apps and OAuth](https://doorman.fyi/docs/oauth.md): Delegate account access through explicit consent, S256 PKCE, resource-bound tokens and revocable installations without sharing an API key. ### Conventions - [Pagination](https://doorman.fyi/docs/pagination.md): How lists are paged: pages by offset for inboxes, threads and messages, pages by cursor for events and deliveries, polling the event log forward, every list that pages, and the iterators of each SDK. - [Idempotency](https://doorman.fyi/docs/idempotency.md): Sending a request twice without doing the thing twice: the Idempotency-Key header on a send, what a repeat answers, how each SDK, the command line and the MCP server pass the key, and which other writes are safe to repeat. - [Errors](https://doorman.fyi/docs/errors.md): How the API reports a failure and what to do about it: the shape of an error, the codes by status, what is safe to retry, and how the SDKs, the command line and the MCP server each hand an error to you. - [Plans, limits and errors](https://doorman.fyi/docs/limits.md): The plans, every limit the API enforces as it publishes them under x-doorman-limits, and the whole catalogue of error codes with their status and meaning. - [Versioning and stability](https://doorman.fyi/docs/versioning.md): What the /v1 prefix promises, which changes are additive, and the OpenAPI document the API serves about itself. - [Metrics and overview](https://doorman.fyi/docs/metrics.md): The account's counts for a dashboard: the overview the console opens on, and metrics per hour or day with categories and verdicts. ## SDKs and tools ### TypeScript SDK - [The SDK](https://doorman.fyi/docs/sdk.md): The TypeScript client library, @doorman/inbox-sdk, and the event-driven agent runtime, @doorman/inbox-agent: one client mirroring the operation ids, page iterators, typed errors, the stream, webhook verification, and event handlers. - [TypeScript SDK reference](https://doorman.fyi/docs/sdk/reference.md): Every method of @doorman/inbox-sdk, grouped as the API reference groups its operations, with its signature, what it does and the operation it sends. - [TypeScript SDK: System](https://doorman.fyi/docs/sdk/reference/system.md): The methods of the TypeScript client under System. Liveness and this document. No credential. - [TypeScript SDK: Account](https://doorman.fyi/docs/sdk/reference/account.md): The methods of the TypeScript client under Account. The account, its plan and usage, and account-wide counts. - [TypeScript SDK: Inboxes](https://doorman.fyi/docs/sdk/reference/inboxes.md): The methods of the TypeScript client under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them. - [TypeScript SDK: Domains](https://doorman.fyi/docs/sdk/reference/domains.md): The methods of the TypeScript client under Domains. Account-owned mail domains, DNS records, verification and setup. - [TypeScript SDK: API keys](https://doorman.fyi/docs/sdk/reference/api-keys.md): The methods of the TypeScript client under API keys. Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API. - [TypeScript SDK: Mail](https://doorman.fyi/docs/sdk/reference/mail.md): The methods of the TypeScript client under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text. - [TypeScript SDK: Passport](https://doorman.fyi/docs/sdk/reference/passport.md): The methods of the TypeScript client under Passport. The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman. - [TypeScript SDK: Security](https://doorman.fyi/docs/sdk/reference/security.md): The methods of the TypeScript client under 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. - [TypeScript SDK: Healthcare](https://doorman.fyi/docs/sdk/reference/healthcare.md): The methods of the TypeScript client under 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. - [TypeScript SDK: Sending](https://doorman.fyi/docs/sdk/reference/sending.md): The methods of the TypeScript client under Sending. New messages and replies from an inbox, with idempotent retries. - [TypeScript SDK: Webhooks](https://doorman.fyi/docs/sdk/reference/webhooks.md): The methods of the TypeScript client under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log. - [TypeScript SDK: Events](https://doorman.fyi/docs/sdk/reference/events.md): The methods of the TypeScript client under Events. The account's event log: page back through it, or poll it forward. - [TypeScript SDK: Stream](https://doorman.fyi/docs/sdk/reference/stream.md): The methods of the TypeScript client under Stream. Events pushed over a WebSocket, with replay. - [TypeScript SDK: Apps](https://doorman.fyi/docs/sdk/reference/apps.md): The methods of the TypeScript client under Apps. Developer clients, installed apps and explicit session-bound consent. - [TypeScript SDK: Sign in with Doorman](https://doorman.fyi/docs/sdk/reference/sign-in-with-doorman.md): The methods of the TypeScript client under Sign in with Doorman. The relying parties a developer registers, the sign-ins that wait for the owner's decision, and what the web app does for a browser on the way. Every operation answers 404 until the deployment switches sign-in on. - [TypeScript SDK: the client, errors, stream and helpers](https://doorman.fyi/docs/sdk/reference/client.md): What @doorman/inbox-sdk exports besides the resources of the API: the client and its options, the parameters of lists and sends, pagination, errors, the stream, webhook verification, OAuth and the transport. ### Agent runtime - [The agent runtime](https://doorman.fyi/docs/agent.md): Event handlers for an agent that answers mail, in @doorman/inbox-agent: one set of handlers over a signed webhook, the stream or a scheduled poll, with deduplication, replies that do not loop, and mail fenced for a model. ### Python SDK - [The Python SDK](https://doorman.fyi/docs/python.md): The generated doorman-inbox client for Python 3.11 and later: typed dictionaries, pagination, exact-byte webhook verification, resumable streams and OAuth. - [Python SDK reference](https://doorman.fyi/docs/python/reference.md): Every method of the doorman-inbox client for Python, grouped as the API reference groups its operations, with its signature and the operation it sends. - [Python SDK: System](https://doorman.fyi/docs/python/reference/system.md): The methods of the Python client under System. Liveness and this document. No credential. - [Python SDK: Account](https://doorman.fyi/docs/python/reference/account.md): The methods of the Python client under Account. The account, its plan and usage, and account-wide counts. - [Python SDK: Inboxes](https://doorman.fyi/docs/python/reference/inboxes.md): The methods of the Python client under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them. - [Python SDK: Domains](https://doorman.fyi/docs/python/reference/domains.md): The methods of the Python client under Domains. Account-owned mail domains, DNS records, verification and setup. - [Python SDK: API keys](https://doorman.fyi/docs/python/reference/api-keys.md): The methods of the Python client under API keys. Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API. - [Python SDK: Mail](https://doorman.fyi/docs/python/reference/mail.md): The methods of the Python client under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text. - [Python SDK: Passport](https://doorman.fyi/docs/python/reference/passport.md): The methods of the Python client under Passport. The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman. - [Python SDK: Security](https://doorman.fyi/docs/python/reference/security.md): The methods of the Python client under 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. - [Python SDK: Healthcare](https://doorman.fyi/docs/python/reference/healthcare.md): The methods of the Python client under 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. - [Python SDK: Sending](https://doorman.fyi/docs/python/reference/sending.md): The methods of the Python client under Sending. New messages and replies from an inbox, with idempotent retries. - [Python SDK: Webhooks](https://doorman.fyi/docs/python/reference/webhooks.md): The methods of the Python client under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log. - [Python SDK: Events](https://doorman.fyi/docs/python/reference/events.md): The methods of the Python client under Events. The account's event log: page back through it, or poll it forward. - [Python SDK: Apps](https://doorman.fyi/docs/python/reference/apps.md): The methods of the Python client under Apps. Developer clients, installed apps and explicit session-bound consent. - [Python SDK: OAuth](https://doorman.fyi/docs/python/reference/oauth.md): The methods of the Python client under OAuth. Authorization, token exchange and discovery for scoped third-party apps. - [Python SDK: Sign in with Doorman](https://doorman.fyi/docs/python/reference/sign-in-with-doorman.md): The methods of the Python client under Sign in with Doorman. The relying parties a developer registers, the sign-ins that wait for the owner's decision, and what the web app does for a browser on the way. Every operation answers 404 until the deployment switches sign-in on. - [Python SDK: the client, errors, stream and helpers](https://doorman.fyi/docs/python/reference/client.md): What doorman_inbox has besides the generated methods: the client and its arguments, the exceptions, the event stream, webhook verification and the OAuth helpers. ### MCP server - [MCP server](https://doorman.fyi/docs/mcp.md): The remote Model Context Protocol address, which needs no install and no key, and the @doorman/inbox-mcp server behind it: tools derived from the API contract, the surface sized for a model, one-time secret notices, and fenced mail bodies. - [MCP tool reference](https://doorman.fyi/docs/mcp/tools.md): Every tool the Model Context Protocol server offers, grouped as the API reference groups its operations, with its input, who is offered it, its annotations and the operation it calls. - [MCP tools: Account](https://doorman.fyi/docs/mcp/tools/account.md): The tools of the MCP server under Account. The account, its plan and usage, and account-wide counts. - [MCP tools: Inboxes](https://doorman.fyi/docs/mcp/tools/inboxes.md): The tools of the MCP server under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them. - [MCP tools: Domains](https://doorman.fyi/docs/mcp/tools/domains.md): The tools of the MCP server under Domains. Account-owned mail domains, DNS records, verification and setup. - [MCP tools: API keys](https://doorman.fyi/docs/mcp/tools/api-keys.md): The tools of the MCP server under API keys. Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API. - [MCP tools: Mail](https://doorman.fyi/docs/mcp/tools/mail.md): The tools of the MCP server under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text. - [MCP tools: Passport](https://doorman.fyi/docs/mcp/tools/passport.md): The tools of the MCP server under Passport. The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman. - [MCP tools: Security](https://doorman.fyi/docs/mcp/tools/security.md): The tools of the MCP server under 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. - [MCP tools: Sending](https://doorman.fyi/docs/mcp/tools/sending.md): The tools of the MCP server under Sending. New messages and replies from an inbox, with idempotent retries. - [MCP tools: Webhooks](https://doorman.fyi/docs/mcp/tools/webhooks.md): The tools of the MCP server under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log. - [MCP tools: Events](https://doorman.fyi/docs/mcp/tools/events.md): The tools of the MCP server under Events. The account's event log: page back through it, or poll it forward. - [MCP tools: the server package](https://doorman.fyi/docs/mcp/tools/package.md): What @doorman/inbox-mcp exports for a program that embeds the server: the two ways to build one, its options and limits, the fencing of mail content, and the pieces that turn a tool call into a request. ### Command line - [The CLI](https://doorman.fyi/docs/cli.md): The command-line interface, @doorman/inbox-cli (doorman): signing in through the browser or with a key, connecting an agent, subcommands mirroring the API resource groups, terminal tables and piped JSON, and live event streaming. - [CLI command reference](https://doorman.fyi/docs/cli/commands.md): Every command of the doorman command line, grouped as the API reference groups its operations, with its arguments, its flags and the operation it sends. - [CLI: System](https://doorman.fyi/docs/cli/commands/system.md): The commands of the doorman command line under System. Liveness and this document. No credential. - [CLI: Account](https://doorman.fyi/docs/cli/commands/account.md): The commands of the doorman command line under Account. The account, its plan and usage, and account-wide counts. - [CLI: Inboxes](https://doorman.fyi/docs/cli/commands/inboxes.md): The commands of the doorman command line under Inboxes. Addresses on the inbox domain: issue, read, rename and delete them. - [CLI: Domains](https://doorman.fyi/docs/cli/commands/domains.md): The commands of the doorman command line under Domains. Account-owned mail domains, DNS records, verification and setup. - [CLI: API keys](https://doorman.fyi/docs/cli/commands/api-keys.md): The commands of the doorman command line under API keys. Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API. - [CLI: Mail](https://doorman.fyi/docs/cli/commands/mail.md): The commands of the doorman command line under Mail. Threads, messages, raw and HTML bodies, attachments and their extracted text. - [CLI: Passport](https://doorman.fyi/docs/cli/commands/passport.md): The commands of the doorman command line under Passport. The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman. - [CLI: Security](https://doorman.fyi/docs/cli/commands/security.md): The commands of the doorman command line under 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. - [CLI: Sending](https://doorman.fyi/docs/cli/commands/sending.md): The commands of the doorman command line under Sending. New messages and replies from an inbox, with idempotent retries. - [CLI: Webhooks](https://doorman.fyi/docs/cli/commands/webhooks.md): The commands of the doorman command line under Webhooks. The inbox webhook, account endpoints, their signed deliveries and the delivery log. - [CLI: Events](https://doorman.fyi/docs/cli/commands/events.md): The commands of the doorman command line under Events. The account's event log: page back through it, or poll it forward. - [CLI: Stream](https://doorman.fyi/docs/cli/commands/stream.md): The commands of the doorman command line under Stream. Events pushed over a WebSocket, with replay. - [CLI: Apps](https://doorman.fyi/docs/cli/commands/apps.md): The commands of the doorman command line under Apps. Developer clients, installed apps and explicit session-bound consent. - [CLI: signing in, connecting and the local server](https://doorman.fyi/docs/cli/commands/session.md): The commands of the doorman command line that are not an operation of the API: login, logout, whoami, connect and mcp, the flags every command takes, and what is kept on the machine. ### Examples - [Sample integration](https://doorman.fyi/docs/sample.md): A complete integration to read and to copy from: a front desk agent on signed webhooks, an app a person connects through OAuth, and a Python digest, each with its full source. ## API reference ### API reference - [API reference](https://doorman.fyi/docs/reference.md): Every operation of the Doorman Inbox API, grouped by tag, with its parameters, schemas, errors and samples. - [System](https://doorman.fyi/docs/reference/system.md): Liveness and this document. No credential. - [Account](https://doorman.fyi/docs/reference/account.md): The account, its plan and usage, and account-wide counts. - [Inboxes](https://doorman.fyi/docs/reference/inboxes.md): Addresses on the inbox domain: issue, read, rename and delete them. - [Domains](https://doorman.fyi/docs/reference/domains.md): Account-owned mail domains, DNS records, verification and setup. - [API keys](https://doorman.fyi/docs/reference/api-keys.md): Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API. - [Mail](https://doorman.fyi/docs/reference/mail.md): Threads, messages, raw and HTML bodies, attachments and their extracted text. - [Passport](https://doorman.fyi/docs/reference/passport.md): The outside services an inbox's address is signed up for, the verification codes and sign-in links they send, and how the address signs in to the ones that accept Sign in with Doorman. - [Security](https://doorman.fyi/docs/reference/security.md): Risk assessment and sender trust: the policy that warns, holds and guards sending, the senders an inbox knows, held mail and the audit log. - [Healthcare](https://doorman.fyi/docs/reference/healthcare.md): 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. - [Sending](https://doorman.fyi/docs/reference/sending.md): New messages and replies from an inbox, with idempotent retries. - [Webhooks](https://doorman.fyi/docs/reference/webhooks.md): The inbox webhook, account endpoints, their signed deliveries and the delivery log. - [Events](https://doorman.fyi/docs/reference/events.md): The account's event log: page back through it, or poll it forward. - [Stream](https://doorman.fyi/docs/reference/stream.md): Events pushed over a WebSocket, with replay. - [Assistant](https://doorman.fyi/docs/reference/assistant.md): Ask Doorman, the console's assistant. Console sessions only. - [Apps](https://doorman.fyi/docs/reference/apps.md): Developer clients, installed apps and explicit session-bound consent. - [OAuth](https://doorman.fyi/docs/reference/oauth.md): Authorization, token exchange and discovery for scoped third-party apps. - [Sign in with Doorman](https://doorman.fyi/docs/reference/sign-in-with-doorman.md): The relying parties a developer registers, the sign-ins that wait for the owner's decision, and what the web app does for a browser on the way. Every operation answers 404 until the deployment switches sign-in on. - [OpenID Connect](https://doorman.fyi/docs/reference/openid-connect.md): The protocol a relying party speaks to sign an agent in: discovery, keys, authorization, the code exchange and userinfo. Served on the issuer's own host, to any OpenID Connect client. - [Schemas](https://doorman.fyi/docs/reference/schemas.md): Every object the operations of the reference send or receive, with its fields, types and an example. ## For programs - [Index of pages and sections](https://doorman.fyi/docs/index.json): every page with its area, topic, description, both addresses and the sections on it, as JSON. - [Search data](https://doorman.fyi/docs/search.json): every page, section, operation, tool, command, method, schema and error code with its address, as JSON. Addresses are paths on https://doorman.fyi. - [The whole documentation](https://doorman.fyi/llms-full.txt): every page in one file, in reading order. - [Guides only](https://doorman.fyi/llms/guides.txt): the pages of that area in one file. - [SDKs and tools only](https://doorman.fyi/llms/tools.txt): the pages of that area in one file. - [API reference only](https://doorman.fyi/llms/reference.txt): the pages of that area in one file. ## The API contract - [OpenAPI document](https://api.doorman.fyi/openapi.json): the API's own OpenAPI 3.1 description, with the limits under x-doorman-limits and the error catalogue under x-doorman-errors. - [Health](https://api.doorman.fyi/health): answers without a credential.