{"openapi":"3.1.0","info":{"title":"Doorman Inbox API","version":"0.1.0","summary":"A real email inbox for AI agents.","description":"A real email inbox for AI agents. Issue an address, receive mail as structured threads and messages with attachments already read into text, send and reply from the same address, and be told the moment something lands by webhook, by polling the event log, or over a WebSocket.\n\nEvery route under `/v1` needs `Authorization: Bearer <credential>`: a `dm_` API key (account-wide, or scoped to one inbox) or, from the console, a session token. Errors are JSON, `{ \"error\": \"<code>\", \"message\": \"<sentence>\" }`, with the codes listed under `x-doorman-errors` and the limits under `x-doorman-limits`. The reason codes a risk assessment can list are under `x-doorman-risk-reasons`, with a sentence for each.\n\nAn account is one person's or an organization's. A console session acting in an organization is also held to the permissions of the member's role, listed per operation and described under `x-doorman-permissions`; API keys and app tokens are not.\n\nWithin a version, changes are additive: new routes, new optional fields, new event types and new error codes may appear; existing fields keep their meaning. A breaking change would be a new prefix.\n\nSign in with Doorman, where a deployment has switched it on, makes an inbox's address an identity an outside service can ask for. It is an OpenID Connect provider on a host of its own: the operations tagged OpenID Connect name that host as their server, speak the protocol's own errors, and are read by any OpenID Connect client. Its permissions and limits are under `x-doorman-limits.signIn`.","license":{"name":"Apache-2.0","identifier":"Apache-2.0"}},"servers":[{"url":"https://api.doorman.fyi","description":"The deployment this document was served from."}],"tags":[{"name":"System","description":"Liveness and this document. No credential."},{"name":"Account","description":"The account, its plan and usage, and account-wide counts."},{"name":"Inboxes","description":"Addresses on the inbox domain: issue, read, rename and delete them."},{"name":"Domains","description":"Account-owned mail domains, DNS records, verification and setup."},{"name":"API keys","description":"Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API."},{"name":"Mail","description":"Threads, messages, raw and HTML bodies, attachments and their extracted text."},{"name":"Passport","description":"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."},{"name":"Security","description":"Risk assessment and sender trust: the policy that warns, holds and guards sending, the senders an inbox knows, held mail and the audit log."},{"name":"Healthcare","description":"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."},{"name":"Sending","description":"New messages and replies from an inbox, with idempotent retries."},{"name":"Webhooks","description":"The inbox webhook, account endpoints, their signed deliveries and the delivery log."},{"name":"Events","description":"The account's event log: page back through it, or poll it forward."},{"name":"Stream","description":"Events pushed over a WebSocket, with replay."},{"name":"Assistant","description":"Ask Doorman, the console's assistant. Console sessions only."},{"name":"Apps","description":"Developer clients, installed apps and explicit session-bound consent."},{"name":"OAuth","description":"Authorization, token exchange and discovery for scoped third-party apps."},{"name":"Sign in with Doorman","description":"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."},{"name":"OpenID Connect","description":"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."},{"name":"Operator","description":"The identity provider's webhook and the operator's account controls."},{"name":"Local development","description":"Routes that exist in local mode only."}],"paths":{"/health":{"get":{"operationId":"health","tags":["System"],"summary":"Health check","description":"Answers as soon as the Worker runs; it does not touch storage.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The service is up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/openapi.json":{"get":{"operationId":"openapi","tags":["System"],"summary":"The OpenAPI document","description":"This document, with `servers` set to the deployment's own origin. Public and cacheable, so documentation tooling can read it from any origin.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/me":{"get":{"operationId":"me","tags":["Account"],"summary":"Who am I","description":"The account, its plan and this month's usage, the caller (a key with its scope, or a session) and the inbox domain every address ends with.","security":[{"apiKey":[]},{"session":[]},{"oauth":["account:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["account:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"responses":{"200":{"description":"The account and the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/overview":{"get":{"operationId":"overview","tags":["Account"],"summary":"Overview","description":"The console's first page: inboxes against the plan, active keys, mail in the last 7 days, webhook deliveries in the last 24 hours and the getting-started checklist. Mail counts cover every inbox the account has had; unread threads cover live inboxes and untrashed threads.","security":[{"apiKey":[]},{"session":[]},{"oauth":["account:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["account:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"responses":{"200":{"description":"The account's counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Overview"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/metrics":{"get":{"operationId":"metrics","tags":["Account"],"summary":"Metrics","description":"Received, sent, delivered and failed per UTC bucket over a range, with message categories and verdicts over inbound mail. Buckets with no activity are present with zeros. A range may span 90 days, or 7 with hour buckets. Deliveries are counted in the bucket of their creation, which is when their event occurred. Inbox-scoped keys always get their own inbox.","security":[{"apiKey":[]},{"session":[]},{"oauth":["account:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["account:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"from","in":"query","required":false,"description":"Start of the range. Defaults to 7 days before `to`.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"End of the range. Defaults to now.","schema":{"type":"string","format":"date-time"}},{"name":"interval","in":"query","required":false,"description":"Bucket size. Defaults to day.","schema":{"default":"day","type":"string","enum":["hour","day"]}},{"name":"inboxId","in":"query","required":false,"description":"Only this inbox; omit for the whole account.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The series, totals, categories and verdicts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Metrics"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/organization/adopt":{"post":{"operationId":"organization.adopt","tags":["Account"],"summary":"Move a personal account into the organization","description":"Makes the signed-in person's personal account the account of the organization they are working in. Its inboxes, keys, domains, webhooks, apps and plan stay as they are and become the organization's, under the same account id. It works once for an organization, and only while the organization's own account has never been used: nothing was created in it and the operator has not changed it. Otherwise the answer is 409 `organization_not_empty`. It cannot be undone. `accountId` names the personal account, so that nothing is moved by mistake. The person starts a new, empty personal account the next time they work outside the organization.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["account:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptAccount"}}}},"responses":{"200":{"description":"The organization's account, which is the one that was moved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`organization_required`: The operation acts on an organization, and the session is in a personal account. Switch to the organization first.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","organization_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`organization_not_empty`: The organization's account has been used, or an account was already moved into the organization, so another account cannot be moved in. Used means that an inbox, key, domain or app was created in it, even one since deleted, that it has a webhook endpoint, or that the operator changed it.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["organization_not_empty","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/api-keys":{"get":{"operationId":"apiKeys.list","tags":["API keys"],"summary":"List account keys","description":"The account's active account-wide keys, oldest first. `scope=all` adds the inbox-scoped keys; every item then carries `inboxAddress`.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"scope","in":"query","required":false,"description":"Include inbox-scoped keys.","schema":{"type":"string","const":"all"}}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"apiKeys.create","tags":["API keys"],"summary":"Create an account key","description":"An account-wide key: it reaches every inbox, creates and deletes inboxes, and manages keys and webhooks. Minted from the console only, so a leaked key cannot mint another. The token is returned once; 20 may be active per account.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":["keys:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}}},"responses":{"201":{"description":"The key with its one-time token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/api-keys/{keyId}":{"get":{"operationId":"apiKeys.get","tags":["API keys"],"summary":"Read an account key","description":"One active account-wide key, without its token.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"keyId","in":"path","required":true,"description":"The key.","schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]}}],"responses":{"200":{"description":"The key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"apiKeys.revoke","tags":["API keys"],"summary":"Revoke an account key","description":"The key stops authenticating on its next request and the stream connections it opened are closed with 4001.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":["keys:manage"],"parameters":[{"name":"keyId","in":"path","required":true,"description":"The key.","schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]}}],"responses":{"204":{"description":"Revoked."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/api-keys":{"post":{"operationId":"inboxes.keys.create","tags":["API keys"],"summary":"Create an inbox key","description":"A key that reads and operates exactly one inbox, including its stream and sending, and gets 403 on inbox, key and webhook management. The token is returned once; 20 may be active per inbox.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":["keys:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKey"}}}},"responses":{"201":{"description":"The key with its one-time token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"get":{"operationId":"inboxes.keys.list","tags":["API keys"],"summary":"List an inbox's keys","description":"The inbox's active keys, oldest first.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/api-keys/{keyId}":{"get":{"operationId":"inboxes.keys.get","tags":["API keys"],"summary":"Read an inbox key","description":"One active key of the inbox, without its token.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"keyId","in":"path","required":true,"description":"The key.","schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]}}],"responses":{"200":{"description":"The key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"inboxes.keys.revoke","tags":["API keys"],"summary":"Revoke an inbox key","description":"The key stops authenticating on its next request and the stream connections it opened are closed with 4001.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["keys:manage"],"x-doorman-delegated":false,"x-doorman-permissions":["keys:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"keyId","in":"path","required":true,"description":"The key.","schema":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]}}],"responses":{"204":{"description":"Revoked."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes":{"get":{"operationId":"inboxes.list","tags":["Inboxes"],"summary":"List inboxes","description":"The account's active inboxes, oldest first, each with its unread thread count and the instant of its last message. An inbox-scoped key sees its own inbox only.","security":[{"apiKey":[]},{"session":[]},{"oauth":["inboxes:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["inboxes:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"q","in":"query","required":false,"description":"Keep the inboxes whose address or display name contains this text, case-insensitively.","schema":{"type":"string","maxLength":200}},{"name":"externalId","in":"query","required":false,"description":"Keep the inbox with exactly this `externalId`: at most one, since it is unique among the account's active inboxes.","schema":{"type":"string","minLength":1,"maxLength":200,"examples":["customer-8841"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of inboxes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"inboxes.create","tags":["Inboxes"],"summary":"Issue an inbox","description":"A new address on the inbox domain that receives mail as soon as the call returns. Omit `mailboxName` for a random one. Pass `webhookUrl` and `key` to issue a ready-to-use inbox in one call: the answer then carries the webhook's signing secret and the inbox-scoped key's token, once. `externalId` tags the inbox with your own identifier for later lookups. Creating past the plan's allowance answers 402 `plan_limit_reached`; deleting an inbox frees its slot. Every plan also has a ceiling of 100 active inboxes per account (409 `limit_reached`).","security":[{"apiKey":[]},{"session":[]},{"oauth":["inboxes:write"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["inboxes:write"],"x-doorman-delegated":true,"x-doorman-permissions":["inboxes:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInbox"}}}},"responses":{"201":{"description":"The inbox, with the webhook secret and the key token when they were requested.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedInbox"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"402":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["plan_limit_reached"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`already_exists`: The mailbox name or the `externalId` is already in use (`field` says which), or another account holds the custom domain, here or at the mail transport.\n\n`domain_not_verified`: The custom domain has not verified its required DNS records.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","already_exists","domain_not_verified","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"503":{"description":"`custom_domains_unavailable`: The custom-domain mail transport and inbound webhook are not fully configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["custom_domains_unavailable"]}}}},"/v1/inboxes/{inboxId}":{"get":{"operationId":"inboxes.get","tags":["Inboxes"],"summary":"Read an inbox","description":"One inbox. An inbox-scoped key can read its own only; anything else is 404.","security":[{"apiKey":[]},{"session":[]},{"oauth":["inboxes:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["inboxes:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The inbox.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"inboxes.update","tags":["Inboxes"],"summary":"Update an inbox","description":"Changes the display name, external identifier or metadata. Null clears either name or externalId; metadata replaces the whole map and {} clears it. Fields left out stay as they are. The address cannot change. An `externalId` already carried by another active inbox of the account answers 409 `already_exists`.","security":[{"apiKey":[]},{"session":[]},{"oauth":["inboxes:write"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["inboxes:write"],"x-doorman-delegated":true,"x-doorman-permissions":["inboxes:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInbox"}}}},"responses":{"200":{"description":"The inbox as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Inbox"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`already_exists`: The mailbox name or the `externalId` is already in use (`field` says which), or another account holds the custom domain, here or at the mail transport.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["already_exists","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"inboxes.delete","tags":["Inboxes"],"summary":"Delete an inbox","description":"Deletes the inbox, revokes its keys, removes its webhook, closes its stream connections and stops delivery. The address is held for 180 days before another account can reuse it. Where the deployment erases, what it held is erased 30 days later.","security":[{"apiKey":[]},{"session":[]},{"oauth":["inboxes:write"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["inboxes:write"],"x-doorman-delegated":true,"x-doorman-permissions":["inboxes:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/rules":{"get":{"operationId":"inboxes.rules.list","tags":["Inboxes"],"summary":"List inbound rules","description":"The inbox's rules, oldest first with id as the tie-breaker. At most 25 rules per inbox.","security":[{"apiKey":[]},{"session":[]},{"oauth":["rules:manage","mail:read","mail:write","mail:send"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["rules:manage","mail:read","mail:write","mail:send"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"inboxes.rules.create","tags":["Inboxes"],"summary":"Create an inbound rule","description":"All when conditions must match after classification. Actions run in array order; one outbound action is selected per inbound message across matching rules. Auto-replies and forwards require loop-safe personal mail, use plain text and respect send limits. At most 25 rules per inbox and 5 actions per rule. Enabled by default.","security":[{"apiKey":[]},{"session":[]},{"oauth":["rules:manage","mail:read","mail:write","mail:send"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["rules:manage","mail:read","mail:write","mail:send"],"x-doorman-delegated":true,"x-doorman-permissions":["inboxes:manage","mail:read","mail:write","mail:send"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRule"}}}},"responses":{"201":{"description":"The rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/rules/{ruleId}":{"get":{"operationId":"inboxes.rules.get","tags":["Inboxes"],"summary":"Read an inbound rule","description":"One rule belonging to this inbox.","security":[{"apiKey":[]},{"session":[]},{"oauth":["rules:manage","mail:read","mail:write","mail:send"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["rules:manage","mail:read","mail:write","mail:send"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"ruleId","in":"path","required":true,"description":"The rule.","schema":{"type":"string","pattern":"^rul_[0-9a-hjkmnp-tv-z]{26}$","examples":["rul_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"inboxes.rules.update","tags":["Inboxes"],"summary":"Update an inbound rule","description":"Replace the supplied fields. Updates cancel pending executions of the old revision; disabling a rule prevents new matches.","security":[{"apiKey":[]},{"session":[]},{"oauth":["rules:manage","mail:read","mail:write","mail:send"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["rules:manage","mail:read","mail:write","mail:send"],"x-doorman-delegated":true,"x-doorman-permissions":["inboxes:manage","mail:read","mail:write","mail:send"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"ruleId","in":"path","required":true,"description":"The rule.","schema":{"type":"string","pattern":"^rul_[0-9a-hjkmnp-tv-z]{26}$","examples":["rul_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRule"}}}},"responses":{"200":{"description":"The rule as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"inboxes.rules.delete","tags":["Inboxes"],"summary":"Delete an inbound rule","description":"Stops new matches and cancels pending executions. Already-running mail cannot be recalled. Execution history remains readable.","security":[{"apiKey":[]},{"session":[]},{"oauth":["rules:manage","mail:read","mail:write","mail:send"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["rules:manage","mail:read","mail:write","mail:send"],"x-doorman-delegated":true,"x-doorman-permissions":["inboxes:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"ruleId","in":"path","required":true,"description":"The rule.","schema":{"type":"string","pattern":"^rul_[0-9a-hjkmnp-tv-z]{26}$","examples":["rul_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/rules/{ruleId}/runs":{"get":{"operationId":"inboxes.rules.runs","tags":["Inboxes"],"summary":"List rule executions","description":"The immutable rule snapshots' execution outcomes, newest first. Interrupted or ambiguous sends are uncertain and never automatically re-sent. History remains after the rule is deleted.","security":[{"apiKey":[]},{"session":[]},{"oauth":["rules:manage","mail:read","mail:write","mail:send"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["rules:manage","mail:read","mail:write","mail:send"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"ruleId","in":"path","required":true,"description":"The rule.","schema":{"type":"string","pattern":"^rul_[0-9a-hjkmnp-tv-z]{26}$","examples":["rul_01jc5f1a2b3c4d5e6f7g8h9j0k"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of executions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/webhook":{"get":{"operationId":"inboxes.webhook.get","tags":["Webhooks"],"summary":"Read the inbox webhook","description":"The inbox's webhook URL and its masked secret; both null when the inbox has none.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxWebhook"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"put":{"operationId":"inboxes.webhook.set","tags":["Webhooks"],"summary":"Set the inbox webhook","description":"One URL per inbox that receives every event for it. Setting it again replaces the URL and mints a new signing secret, returned once.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":false,"x-doorman-permissions":["webhooks:manage","mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetInboxWebhook"}}}},"responses":{"200":{"description":"The webhook with its one-time secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxWebhookSecret"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"inboxes.webhook.delete","tags":["Webhooks"],"summary":"Remove the inbox webhook","description":"The inbox stops receiving deliveries; its delivery log stays with the events.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":false,"x-doorman-permissions":["webhooks:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"204":{"description":"Removed."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/webhook/rotate-secret":{"post":{"operationId":"inboxes.webhook.rotateSecret","tags":["Webhooks"],"summary":"Rotate the inbox webhook's secret","description":"Mints a new signing secret and returns it once. Deliveries signed with the old one stop verifying at once, so update the receiver first.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":false,"x-doorman-permissions":["webhooks:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The webhook with its new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxWebhookSecret"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`no_webhook`: The inbox has no webhook to rotate a secret for.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["no_webhook","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/webhook/deliveries":{"get":{"operationId":"inboxes.webhook.deliveries","tags":["Webhooks"],"summary":"List the inbox webhook's deliveries","description":"The inbox webhook's delivery log, newest first, including deliveries to URLs the inbox no longer points at.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The delivery id to continue from, from the previous page's `nextCursor`.","schema":{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"A page of deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/send":{"post":{"operationId":"inboxes.send","tags":["Sending"],"summary":"Send a message or reply","description":"Sends from the inbox's address. `to`, `cc` and `bcc` take a comma-separated string or an array. A reply passes `threadId`: the subject defaults to `Re: <thread subject>`, In-Reply-To and References are set from the thread, the previous message is quoted under the text unless `includeQuote` is false, `to` defaults to the last inbound message's Reply-To or sender, and the thread is marked read. Limits per inbox: 10 sends per minute and 200 per day (429 with `Retry-After`; refused sends are not counted), 50 recipients, 32 attachments, 25 MiB per message. On the free plan the account's monthly cap applies on top (402). Outbound messages are stored without a raw copy. `multipart/form-data` is accepted with the same field names and repeated `attachments` file fields. The security policy guards sends from keys and app tokens, never from a console session: a reply into a thread that holds a flagged message from a sender that is not trusted, or a recipient the inbox does not know when the policy asks for known recipients, answers 403 `risk_blocked` with `guard`. Mail an inbox rule generates is not guarded; it is never sent for a flagged message. Where the policy asks (`sendApproval`), a message to a recipient the inbox does not know answers 202 with a held send: it waits for the owner and must not be sent again (at most 50 wait, then 409). A failed file or link check answers 403 `risk_blocked`; retry a 503 `scan_unavailable`.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:send","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:send","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:send","mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"Idempotency-Key","in":"header","required":false,"description":"1 to 255 printable ASCII characters. For 24 hours the same key with the same request replays the original answer with `Idempotent-Replayed: true`; the same key with a different request is refused with 422 `idempotency_key_reused`; a key whose first attempt is still running answers 409 `idempotency_in_progress`; a failed send releases the key.","schema":{"type":"string","pattern":"^[!-~]{1,255}$","examples":["order-2847-reply"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SendMessageForm"}}}},"responses":{"201":{"description":"The stored outbound message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutcome"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when the answer was replayed for an `Idempotency-Key` seen before.","schema":{"type":"string","const":"true"}}}},"202":{"description":"The message waits for the owner: a held send. Nothing was sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOutcome"}}},"headers":{"Idempotent-Replayed":{"description":"`true` when the answer was replayed for an `Idempotency-Key` seen before.","schema":{"type":"string","const":"true"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.\n\n`invalid_form`: The multipart body could not be parsed.\n\n`recipient_suppressed`: A recipient previously bounced or complained and is suppressed.\n\n`send_rejected`: The sending provider rejected the message; `providerCode` carries its reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json","invalid_form","recipient_suppressed","send_rejected"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"402":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["plan_limit_reached"]},"403":{"description":"`inbox_suspended`: The inbox cannot send, or start a sign-in, at the moment.\n\n`recipient_not_permitted`: A recipient is not permitted for this deployment.\n\n`risk_blocked`: The send or the download was refused; `guard` says why: `reply` when the thread holds a flagged message whose sender is not trusted, `recipient` when a recipient is not one the inbox knows, `content` when an attachment did not pass the check of its bytes (`reasons` lists what was found), `guardrail` when a healthcare guardrail found what may not be sent (`entities` lists the kinds). For `reply` and `recipient` a person can send from the console, mark the message safe or trust the sender. For `content`, a program or a file dressed as another kind is refused for every caller; a locked or damaged file, a script, or a document with macros, is refused for keys and app tokens only. A link that delivered harmful software when it was opened in isolation is refused for every caller.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["inbox_suspended","recipient_not_permitted","risk_blocked","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.\n\n`thread_not_found`: The thread does not exist, belongs to another inbox or was trashed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found","thread_not_found"]},"409":{"description":"`idempotency_in_progress`: A request with this Idempotency-Key is still being processed.\n\n`domain_not_verified`: The custom domain has not verified its required DNS records.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["idempotency_in_progress","domain_not_verified","limit_reached","account_mismatch"]},"413":{"description":"`message_too_large`: The message exceeds the size limit, including attachments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["message_too_large"]},"422":{"description":"`idempotency_key_reused`: This Idempotency-Key was already used for a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["idempotency_key_reused"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.\n\n`provider_rate_limited`: The sending provider is rate limiting this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded","provider_rate_limited"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`send_failed`: The sending provider did not accept or could not deliver the message; `providerCode` carries its reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["send_failed"]},"503":{"description":"`sending_paused`: Sending is paused for this deployment pending review.\n\n`sending_unavailable`: The inbox domain is not onboarded for sending, or sending is not configured.\n\n`scan_unavailable`: The malware engine did not answer in time, so an attachment could not be checked and nothing was sent. Try again after `Retry-After`; an `Idempotency-Key` makes the retry safe.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["sending_paused","sending_unavailable","scan_unavailable"]}}}},"/v1/inboxes/{inboxId}/threads":{"get":{"operationId":"inboxes.threads.list","tags":["Mail"],"summary":"List threads","description":"The inbox's threads, newest activity first. Filter by read state, or search the subject and participants. Trashed threads are left out.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"isRead","in":"query","required":false,"description":"Only read or only unread threads.","schema":{"type":"string","enum":["true","false"]}},{"name":"q","in":"query","required":false,"description":"Keep the threads whose subject or a participant address contains this text, case-insensitively.","schema":{"type":"string","maxLength":200}},{"name":"label","in":"query","required":false,"description":"Only threads containing this exact, case-sensitive label.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]*$","examples":["needs-review"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of threads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/threads/by-seen":{"get":{"operationId":"inboxes.threads.listBySeen","tags":["Mail"],"summary":"List threads a person has or has not seen","description":"The inbox's threads, newest activity first, kept by a person's own mark: those somebody looked at in the console since mail last arrived in them, or those nobody has. It is the console's list of what is new to a person, and says nothing about `isRead`, which agents poll. Trashed threads are left out.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"isSeen","in":"query","required":true,"description":"`false` for the threads nobody has looked at, `true` for the others.","schema":{"type":"string","enum":["true","false"]}},{"name":"q","in":"query","required":false,"description":"Keep the threads whose subject or a participant address contains this text, case-insensitively.","schema":{"type":"string","maxLength":200}},{"name":"label","in":"query","required":false,"description":"Only threads containing this exact, case-sensitive label.","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]*$","examples":["needs-review"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of threads.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/threads/{threadId}":{"get":{"operationId":"threads.get","tags":["Mail"],"summary":"Read a thread","description":"One thread's summary. Its messages are at `/v1/threads/{threadId}/messages`.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"threadId","in":"path","required":true,"description":"The thread.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}}],"responses":{"200":{"description":"The thread.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"threads.update","tags":["Mail"],"summary":"Update a thread","description":"Sets read state, metadata or labels. Omitted fields stay unchanged; metadata and labels replace the whole value, with {} or [] clearing it. Sending a reply marks the thread read as well. Actual changes emit thread.updated.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:write","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:write","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:write","mail:read"],"parameters":[{"name":"threadId","in":"path","required":true,"description":"The thread.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThread"}}}},"responses":{"200":{"description":"The thread as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"threads.trash","tags":["Mail"],"summary":"Trash a thread","description":"The thread and its messages leave every list and read, a reply to it answers 404 `thread_not_found`, and a later message in the same conversation starts a new thread. Where the deployment erases, it is erased 30 days later.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:write","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:write","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:write","mail:read"],"parameters":[{"name":"threadId","in":"path","required":true,"description":"The thread.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}}],"responses":{"204":{"description":"Trashed."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/threads/{threadId}/restore":{"post":{"operationId":"threads.restore","tags":["Mail"],"summary":"Restore a trashed thread","description":"Takes a thread back out of the trash: it and its messages return to every list and read, and `thread.updated` says so. A thread that is not in the trash is answered as it is. Mail that was held, discarded or still waits for a scan is in the trash to keep it from agents and is not restored this way (404): only releasing held mail delivers it. A message that arrived in the same conversation while the thread was trashed started a thread of its own, and stays there.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:write","mail:read"],"parameters":[{"name":"threadId","in":"path","required":true,"description":"The thread.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}}],"responses":{"200":{"description":"The thread, out of the trash.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/threads/{threadId}/seen":{"put":{"operationId":"threads.seen","tags":["Mail"],"summary":"Mark a thread seen","description":"Records that a person looked at the thread in the console, or that they want it shown as new again. It moves `isSeen` and nothing else: `isRead`, which agents poll, stays as it is, and no event is emitted. Mail that arrives in the thread clears it.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"threadId","in":"path","required":true,"description":"The thread.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetThreadSeen"}}}},"responses":{"200":{"description":"The thread as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thread"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/threads/{threadId}/messages":{"get":{"operationId":"threads.messages","tags":["Mail"],"summary":"Read a thread's messages","description":"The thread and its messages in order, oldest first, each with its text, classification and attachments.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"threadId","in":"path","required":true,"description":"The thread.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}}],"responses":{"200":{"description":"The thread and its messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadMessages"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/messages":{"get":{"operationId":"inboxes.messages.list","tags":["Mail"],"summary":"List messages","description":"The inbox's messages across threads, newest first, inbound and outbound alike unless filtered. Messages in trashed threads are left out.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"direction","in":"query","required":false,"description":"Only received or only sent messages.","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageList"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}":{"get":{"operationId":"messages.get","tags":["Mail"],"summary":"Read a message","description":"One message with its text, headers, classification and attachments.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}/raw":{"get":{"operationId":"messages.raw","tags":["Mail"],"summary":"Download the original message","description":"The message as it arrived, `message/rfc822`. Outbound messages have no raw copy and answer 404. One with a `malicious` attachment is served to a console session only (403 `risk_blocked` otherwise).","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"responses":{"200":{"description":"The original message.","content":{"message/rfc822":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`risk_blocked`: The send or the download was refused; `guard` says why: `reply` when the thread holds a flagged message whose sender is not trusted, `recipient` when a recipient is not one the inbox knows, `content` when an attachment did not pass the check of its bytes (`reasons` lists what was found), `guardrail` when a healthcare guardrail found what may not be sent (`entities` lists the kinds). For `reply` and `recipient` a person can send from the console, mark the message safe or trust the sender. For `content`, a program or a file dressed as another kind is refused for every caller; a locked or damaged file, a script, or a document with macros, is refused for keys and app tokens only. A link that delivered harmful software when it was opened in isolation is refused for every caller.\n\n`guardrail_blocked`: A healthcare guardrail keeps this content from keys and apps: the original message, its HTML body or an attachment's bytes carry what the account's guardrails redact, and bytes cannot be redacted. `entities` lists the kinds that were found, never the text. The message's text is available with the findings replaced; a person with `phi:read` reads the original in the console.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["risk_blocked","guardrail_blocked","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}/html":{"get":{"operationId":"messages.html","tags":["Mail"],"summary":"Read the HTML body","description":"The stored HTML body, served as `text/html` under `cache-control: private, no-store`, `x-content-type-options: nosniff` and a content security policy that allows images and inline styles only, under `sandbox`. 404 when the message has no HTML body.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"responses":{"200":{"description":"The HTML body.","content":{"text/html":{"schema":{"type":"string"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`guardrail_blocked`: A healthcare guardrail keeps this content from keys and apps: the original message, its HTML body or an attachment's bytes carry what the account's guardrails redact, and bytes cannot be redacted. `entities` lists the kinds that were found, never the text. The message's text is available with the findings replaced; a person with `phi:read` reads the original in the console.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["guardrail_blocked","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/attachments/{messageId}/{filename}":{"get":{"operationId":"attachments.download","tags":["Mail"],"summary":"Download an attachment","description":"The attachment's bytes, served with the attachment's own content type as a download. A `malicious` attachment is served to a console session only (403 `risk_blocked` otherwise).","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}},{"name":"filename","in":"path","required":true,"description":"The attachment's file name, as the message lists it.","schema":{"type":"string","examples":["invoice.pdf"]}}],"responses":{"200":{"description":"The bytes, with the attachment's content type.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`risk_blocked`: The send or the download was refused; `guard` says why: `reply` when the thread holds a flagged message whose sender is not trusted, `recipient` when a recipient is not one the inbox knows, `content` when an attachment did not pass the check of its bytes (`reasons` lists what was found), `guardrail` when a healthcare guardrail found what may not be sent (`entities` lists the kinds). For `reply` and `recipient` a person can send from the console, mark the message safe or trust the sender. For `content`, a program or a file dressed as another kind is refused for every caller; a locked or damaged file, a script, or a document with macros, is refused for keys and app tokens only. A link that delivered harmful software when it was opened in isolation is refused for every caller.\n\n`guardrail_blocked`: A healthcare guardrail keeps this content from keys and apps: the original message, its HTML body or an attachment's bytes carry what the account's guardrails redact, and bytes cannot be redacted. `entities` lists the kinds that were found, never the text. The message's text is available with the findings replaced; a person with `phi:read` reads the original in the console.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["risk_blocked","guardrail_blocked","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/attachments/{messageId}/{filename}/text":{"get":{"operationId":"attachments.text","tags":["Mail"],"summary":"Read an attachment's text","description":"The extracted text and how it was obtained, or why it was not.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}},{"name":"filename","in":"path","required":true,"description":"The attachment's file name, as the message lists it.","schema":{"type":"string","examples":["invoice.pdf"]}}],"responses":{"200":{"description":"The text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentText"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`risk_blocked`: The send or the download was refused; `guard` says why: `reply` when the thread holds a flagged message whose sender is not trusted, `recipient` when a recipient is not one the inbox knows, `content` when an attachment did not pass the check of its bytes (`reasons` lists what was found), `guardrail` when a healthcare guardrail found what may not be sent (`entities` lists the kinds). For `reply` and `recipient` a person can send from the console, mark the message safe or trust the sender. For `content`, a program or a file dressed as another kind is refused for every caller; a locked or damaged file, a script, or a document with macros, is refused for keys and app tokens only. A link that delivered harmful software when it was opened in isolation is refused for every caller.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["risk_blocked","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/events":{"get":{"operationId":"events.list","tags":["Events"],"summary":"List or poll events","description":"The account's event log. Without `after`: newest first as a page, with `nextCursor` to continue (events with a smaller `seq`). With `after`: the events with a larger `seq`, oldest first, with `latestSeq` to poll from next; start from the newest `seq` you have, or 0. `after` and `cursor` cannot be combined. Filters apply before paging or polling, across all stored history. Inbox-scoped keys see their inbox's events only.","security":[{"apiKey":[]},{"session":[]},{"oauth":["events:read","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"query","required":false,"description":"Only this inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"threadId","in":"query","required":false,"description":"Only events whose stored payload names this thread. Can be combined with inboxId and type. A valid id with no visible matching events returns an empty result, including ids from another account or inbox. Trashing a thread does not remove its stored events.","schema":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]}},{"name":"type","in":"query","required":false,"description":"Only this event type.","schema":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"Page from here: events with a smaller `seq`.","schema":{"type":"string","pattern":"^\\d{1,18}$","examples":["1041"]}},{"name":"after","in":"query","required":false,"description":"Poll from here: events with a larger `seq`, oldest first.","schema":{"type":"string","pattern":"^\\d{1,18}$","examples":["1042"]}}],"responses":{"200":{"description":"A page, or a poll.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventList"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/events/{eventId}":{"get":{"operationId":"events.get","tags":["Events"],"summary":"Read an event","description":"The event, the payload exactly as it was signed and sent, and every delivery it produced with its status, attempts and last error. Inbox-scoped keys see the inbox webhook's delivery only.","security":[{"apiKey":[]},{"session":[]},{"oauth":["events:read","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"eventId","in":"path","required":true,"description":"The event.","schema":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}}],"responses":{"200":{"description":"The event, its payload and its deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventDetail"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/webhooks":{"get":{"operationId":"webhooks.list","tags":["Webhooks"],"summary":"List endpoints","description":"The account's webhook endpoints, oldest first. Each receives the events it subscribes to, for the inboxes it is scoped to, with its own signing secret.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"responses":{"200":{"description":"The endpoints.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"webhooks.create","tags":["Webhooks"],"summary":"Create an endpoint","description":"An https URL without credentials. Empty `eventTypes` or `inboxIds` mean all. The signing secret is returned once. An account holds at most 20 endpoints.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["webhooks:manage","mail:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEndpoint"}}}},"responses":{"201":{"description":"The endpoint with its one-time secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedEndpoint"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/webhooks/{endpointId}":{"get":{"operationId":"webhooks.get","tags":["Webhooks"],"summary":"Read an endpoint","description":"One endpoint with its newest delivery.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint.","schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"webhooks.update","tags":["Webhooks"],"summary":"Change an endpoint","description":"Any of the fields; the ones left out stay as they are. A disabled endpoint receives nothing until it is enabled again.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["webhooks:manage","mail:read"],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint.","schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEndpoint"}}}},"responses":{"200":{"description":"The endpoint as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"webhooks.delete","tags":["Webhooks"],"summary":"Delete an endpoint","description":"Removes the endpoint. Its delivery log stays with the events, and a delivery still queued for it fails as `target_unavailable`.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["webhooks:manage"],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint.","schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/webhooks/{endpointId}/rotate-secret":{"post":{"operationId":"webhooks.rotateSecret","tags":["Webhooks"],"summary":"Rotate an endpoint's secret","description":"Mints a new signing secret and returns it once. Deliveries signed with the old one stop verifying at once, so update the receiver first.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["webhooks:manage"],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint.","schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointSecret"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/webhooks/{endpointId}/test":{"post":{"operationId":"webhooks.test","tags":["Webhooks"],"summary":"Send a test delivery","description":"One signed `message.received` sample with `\"test\": true`, fresh identifiers and one of the account's inboxes as the recipient, posted to the URL whether or not the endpoint is enabled. Nothing is stored. Answers after the usual 15 second timeout at most.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["webhooks:manage"],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint.","schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"What the URL answered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointTestResult"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/webhooks/{endpointId}/deliveries":{"get":{"operationId":"webhooks.deliveries","tags":["Webhooks"],"summary":"List an endpoint's deliveries","description":"The endpoint's delivery log, newest first.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"endpointId","in":"path","required":true,"description":"The endpoint.","schema":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"The delivery id to continue from, from the previous page's `nextCursor`.","schema":{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"A page of deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/deliveries/{deliveryId}/retry":{"post":{"operationId":"deliveries.retry","tags":["Webhooks"],"summary":"Retry a delivery","description":"Puts a delivered or failed delivery back in the queue. The attempt is numbered after the previous ones: a delivery that used its whole budget gets exactly one more attempt, and one that still had attempts left follows the usual retry schedule from where it was. A retry to a target that was removed or repointed since fails as `target_unavailable`.","security":[{"apiKey":[]},{"session":[]},{"oauth":["webhooks:manage","events:read","mail:read"]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":["webhooks:manage","events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["webhooks:manage"],"parameters":[{"name":"deliveryId","in":"path","required":true,"description":"The delivery.","schema":{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"202":{"description":"The delivery, now pending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Delivery"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`delivery_pending`: The delivery is already queued; wait for the attempt to finish.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["delivery_pending","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/ws":{"get":{"operationId":"stream","tags":["Stream"],"summary":"Open the event stream","description":"A WebSocket that pushes events as they happen, the same payload as a webhook plus `delivered_at` and `attempt`. Authenticate with the Authorization header, or `?token=dm_...` for clients that cannot set headers; an app access token needs `events:read` and `mail:read`, and sessions are not accepted. Then send JSON frames (see StreamClientFrame): subscribe, with optional `inbox_ids`, `event_types` and `last_event_id` to replay up to 100 missed events; unsubscribe; ping. Limits: 10 connections per account (the next is closed with 4008), 30 frames per 10 seconds per connection (4029); a revoked key, a deleted inbox, or an app access token that ran out or was revoked closes its connections with 4001. A failed push is not retried over the socket: reconnect with `last_event_id` to catch up, with a renewed token when it was an app's.","security":[{"apiKey":[]},{"oauth":["events:read","mail:read"]}],"x-doorman-access":"key","x-doorman-audience":"public","x-doorman-scopes":["events:read","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"parameters":[{"name":"token","in":"query","required":false,"description":"The API key, for clients that cannot set the Authorization header.","schema":{"type":"string","examples":["dm_..."]}},{"name":"Upgrade","in":"header","required":true,"description":"`websocket`.","schema":{"type":"string","const":"websocket"}}],"responses":{"101":{"description":"Switching protocols: the stream is open."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope"]},"426":{"description":"`upgrade_required`: The stream needs a WebSocket upgrade.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["upgrade_required"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}},"x-doorman-frames":{"client":{"$ref":"#/components/schemas/StreamClientFrame"},"server":{"$ref":"#/components/schemas/StreamServerFrame"}},"x-doorman-close-codes":{"unauthorized":4001,"connectionLimit":4008,"rateLimit":4029}}},"/mcp":{"post":{"operationId":"mcp","tags":["System"],"summary":"Model Context Protocol endpoint","description":"The stateless Streamable HTTP endpoint for the Model Context Protocol. Authenticate with a `dm_` API key, or with an app access token issued for this address as its resource; console sessions are not accepted, and a request without a credential is answered with the challenge an agent host signs in from. A key is offered every operation in `operationTools()`, with output schemas and structured answers. An app token is offered the operations its permissions cover, sized for a model: no output schemas or examples, text-only answers, and mail text bounded with a note naming the tool that reads the rest. Neither is offered the tools of a capability the deployment has not switched on. Every answer is JSON. There is no stream to open and no session to end, so GET and DELETE answer 405.","security":[{"apiKey":[]},{"oauth":[]}],"x-doorman-access":"key","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":true,"x-doorman-permissions":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"description":"A JSON-RPC 2.0 request or notification."},"responses":{"200":{"description":"The JSON-RPC 2.0 response.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope"]},"405":{"description":"`method_not_allowed`: The MCP endpoint takes POST only: it is stateless, with no stream to open and no session to end.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["method_not_allowed"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/assistant/chat":{"post":{"operationId":"assistant.chat","tags":["Assistant"],"summary":"Ask Doorman","description":"One turn of the console's assistant. The answer is a `text/event-stream` of named events (see AssistantEvent): text deltas, the read tools that ran, a proposal the person must confirm (which ends the turn), done, or error. Read tools run with the session's account; mutations never run here, they come back as proposals the console runs after confirmation.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"x-doorman-domain-proposals","in":"header","required":false,"description":"The browser confirms it preserves domainId when running inbox proposals. Without this capability, a domain-targeted proposal ends with console_update_required instead of a proposal.","schema":{"type":"string","const":"1"}},{"name":"x-doorman-console-mode","in":"header","required":false,"description":"The console the person is in. With `simple` the assistant speaks the simple console's plain words (an address, a conversation), keeps keys, webhooks and the other developer tools out of its answers unless the person asks for them, and follows the three setup steps: choose the address, connect the agent, send a test email. Without the header, or with any other value, it answers as the developer console's assistant.","schema":{"type":"string","enum":["simple","developer"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantChatRequest"}}}},"responses":{"200":{"description":"The turn, as server-sent events.","content":{"text/event-stream":{"schema":{"type":"string"},"x-doorman-events":{"$ref":"#/components/schemas/AssistantEvent"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"503":{"description":"`assistant_unavailable`: The assistant is not configured for this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["assistant_unavailable"]}}}},"/v1/resend/webhook":{"post":{"operationId":"transport.webhook","tags":["Operator"],"summary":"The mail transport's webhook","description":"Signed mail and domain events, verified with Standard Webhooks headers before processing. Returns 404 when the custom-domain transport is unavailable.","security":[],"x-doorman-access":"signed","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWebhookEnvelope"}}}},"responses":{"200":{"description":"What the event did.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWebhookResult"}}}},"400":{"description":"`webhook_rejected`: The identity provider's webhook signature could not be verified.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["webhook_rejected","invalid_json"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]},"503":{"description":"`queue_unavailable`: The inbound event could not be queued; retry the signed webhook.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["queue_unavailable"]}}}},"/v1/entri/webhook":{"post":{"operationId":"connect.webhook","tags":["Operator"],"summary":"The DNS automation's webhook","description":"Signed DNS setup reports. They are advisory; only the mail transport can mark a domain verified. Returns 404 when automatic DNS setup is unavailable.","security":[],"x-doorman-access":"signed","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWebhookEnvelope"}}}},"responses":{"200":{"description":"What the report did.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWebhookResult"}}}},"400":{"description":"`webhook_rejected`: The identity provider's webhook signature could not be verified.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["webhook_rejected","invalid_json"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/clerk/webhook":{"post":{"operationId":"identity.webhook","tags":["Operator"],"summary":"The identity provider's webhook","description":"Receives the identity provider's `user.updated`, `user.deleted`, `organization.created`, `organization.updated` and `organization.deleted` events, verified with the endpoint's signing secret (Standard Webhooks headers `svix-id`, `svix-timestamp`, `svix-signature`). The route is a 404 until that secret is configured. Deliveries may repeat and are safe to apply twice: `user.updated` follows address and name changes; `user.deleted` marks the person's own account deleted, revokes every key, deletes its inboxes and releases their addresses; the organization events follow an organization's name, and `organization.deleted` suspends its account for the operator to review instead of deleting it.","security":[],"x-doorman-access":"signed","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"description":"The provider's event envelope."},"responses":{"200":{"description":"What the event did.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityWebhookResult"}}}},"400":{"description":"`webhook_rejected`: The identity provider's webhook signature could not be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["webhook_rejected"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/admin/accounts/{accountId}":{"get":{"operationId":"admin.accounts.get","tags":["Operator"],"summary":"Read an account","description":"Status, the linked user id, the inbox count and the last 20 operator actions. The operator routes exist only when `DOORMAN_ADMIN_TOKEN` is configured; otherwise they are 404s.","security":[{"operator":[]}],"x-doorman-access":"operator","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"accountId","in":"path","required":true,"description":"The account.","schema":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]}}],"responses":{"200":{"description":"The account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccountDetail"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/admin/accounts/{accountId}/suspend":{"post":{"operationId":"admin.accounts.suspend","tags":["Operator"],"summary":"Suspend an account","description":"The account's keys and sessions stop authenticating, its inboxes stop receiving (rejected at SMTP), sending is refused and its stream connections are closed with 4001. Recorded in the account's actions.","security":[{"operator":[]}],"x-doorman-access":"operator","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"accountId","in":"path","required":true,"description":"The account.","schema":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReason"}}}},"responses":{"200":{"description":"The account, now suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccount"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`account_deleted`: The account was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_deleted"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/admin/accounts/{accountId}/reactivate":{"post":{"operationId":"admin.accounts.reactivate","tags":["Operator"],"summary":"Reactivate an account","description":"Lifts a suspension. Recorded in the account's actions.","security":[{"operator":[]}],"x-doorman-access":"operator","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"accountId","in":"path","required":true,"description":"The account.","schema":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminReason"}}}},"responses":{"200":{"description":"The account, active again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccount"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`not_suspended`: The account is not suspended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_suspended"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/admin/accounts/{accountId}/plan":{"post":{"operationId":"admin.accounts.setPlan","tags":["Operator"],"summary":"Set an account's plan","description":"Sets the plan by hand, recorded as a plan change with the reason. It is the operator's override: an account that pays through the payment provider has its plan set by its subscription, and the next event about that subscription sets it again. A downgrade keeps the account's inboxes receiving; it stops new ones being created and applies the monthly cap to the month's real usage.","security":[{"operator":[]}],"x-doorman-access":"operator","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"accountId","in":"path","required":true,"description":"The account.","schema":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPlanChange"}}}},"responses":{"200":{"description":"The account with its new plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminAccount"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`account_deleted`: The account was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_deleted"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/admin/inboxes/review":{"get":{"operationId":"admin.inboxes.review","tags":["Operator"],"summary":"Review inbox names against the policy","description":"Reads the active inboxes on the shared domain, oldest first and 500 to a page, and lists the ones the name policy would refuse today: a mailbox name or display name that reads as a role, the company or one of its people, or a signature that presents the sender as the company. It is how inboxes issued before the policy was tightened are found. Nothing is changed: what to do about an inbox stays the operator's decision.","security":[{"operator":[]}],"x-doorman-access":"operator","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"cursor","in":"query","required":false,"description":"The inbox to read on from, from the previous page's `nextCursor`.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The inboxes of this page the policy would refuse.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminNameReview"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/dev/accounts":{"post":{"operationId":"dev.createAccount","tags":["Local development"],"summary":"Bootstrap a development account","description":"Creates an account and its first account key without a browser. Exists in local mode only (`DOORMAN_MODE=local`); anywhere else it is a 404.","security":[],"x-doorman-access":"public","x-doorman-audience":"local","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDevAccount"}}}},"responses":{"201":{"description":"The account with its bootstrap key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevAccount"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`already_exists`: The mailbox name or the `externalId` is already in use (`field` says which), or another account holds the custom domain, here or at the mail transport.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["already_exists"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/domains":{"get":{"operationId":"domains.list","tags":["Domains"],"summary":"List custom domains","description":"The account's active custom domains and their DNS records. Reading remains available when the transport is disabled.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The custom domains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"domains.create","tags":["Domains"],"summary":"Add a custom domain","description":"Creates the domain at the configured mail transport and returns its DNS records. Requires a paid plan; every plan has a ceiling of 50 active domains, and an account may add 20 domains per 24 hours. No inbox can be created on the domain until it verifies, and a domain that has not verified 7 days after it was added is removed (see `expiresAt`), which frees its name. A name another account holds, here or at the mail transport, answers 409 `already_exists`.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["domains:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDomain"}}}},"responses":{"201":{"description":"The domain and its records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"402":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["plan_limit_reached"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.\n\n`already_exists`: The mailbox name or the `externalId` is already in use (`field` says which), or another account holds the custom domain, here or at the mail transport.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","already_exists","account_mismatch"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]},"503":{"description":"`custom_domains_unavailable`: The custom-domain mail transport and inbound webhook are not fully configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["custom_domains_unavailable"]}}}},"/v1/domains/{domainId}":{"get":{"operationId":"domains.get","tags":["Domains"],"summary":"Read a custom domain","description":"One live custom domain belonging to the account; another account's domain is a 404.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"domainId","in":"path","required":true,"description":"The custom domain.","schema":{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The domain and its records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"domains.delete","tags":["Domains"],"summary":"Remove a custom domain","description":"Removes the domain and its inboxes, revokes their keys and closes their streams. Removal at the mail transport is queued.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["domains:manage"],"parameters":[{"name":"domainId","in":"path","required":true,"description":"The custom domain.","schema":{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Removed."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/domains/{domainId}/verify":{"post":{"operationId":"domains.verify","tags":["Domains"],"summary":"Check the domain's DNS","description":"Asks the mail transport to verify the required records, then returns the current status. Verification is asynchronous; repeated requests are rate limited.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["domains:manage"],"parameters":[{"name":"domainId","in":"path","required":true,"description":"The custom domain.","schema":{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"202":{"description":"The domain's current verification state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]},"503":{"description":"`custom_domains_unavailable`: The custom-domain mail transport and inbound webhook are not fully configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["custom_domains_unavailable"]}}}},"/v1/domains/{domainId}/connect-session":{"post":{"operationId":"domains.connectSession","tags":["Domains"],"summary":"Start automatic DNS setup","description":"A console-only, short-lived DNS setup token and the records to publish. Provider secrets never leave the Worker.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["domains:manage"],"parameters":[{"name":"domainId","in":"path","required":true,"description":"The custom domain.","schema":{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The short-lived setup session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainConnectSession"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]},"503":{"description":"`custom_domains_unavailable`: The custom-domain mail transport and inbound webhook are not fully configured.\n\n`connect_unavailable`: Automatic DNS setup is not configured; publish the records manually.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["custom_domains_unavailable","connect_unavailable"]}}}},"/v1/passport":{"get":{"operationId":"passport.get","tags":["Passport"],"summary":"Read passport settings","description":"Whether the account emails its owner when an authenticated service sends a password reset, a security notice, or a verification code or sign-in link that no recent agent action explains, with the owner address and whether email sending is available. And what the account's agents may do alone when they sign in with Doorman: sign in to a service the owner has not allowed yet, and tell such a service who owns them.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The account's passport settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportSettings"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"passport.update","tags":["Passport"],"summary":"Update passport settings","description":"Changes the settings given; the ones left out stay as they are. Each change that loosens something needs a console session unless the account allows its account keys to (403 `session_required`): switching owner alert emails off, letting agents sign in to services the owner has not allowed yet, and telling those services who owns the agent.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePassportSettings"}}}},"responses":{"200":{"description":"The settings as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassportSettings"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/services":{"get":{"operationId":"services.list","tags":["Passport"],"summary":"List services","description":"The outside services the account's addresses are signed up for, newest activity first: found in authenticated mail, declared by an agent, or added by a person. Without `status`, archived ones are left out. Inbox-scoped keys see their own inbox's only.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"query","required":false,"description":"Only this inbox's services.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"status","in":"query","required":false,"description":"Only services with this status. Without it, every status but archived.","schema":{"type":"string","enum":["pending","active","cancelled","archived"]}},{"name":"attention","in":"query","required":false,"description":"Only services with (`true`) or without (`false`) an active warning.","schema":{"type":"string","enum":["true","false"]}},{"name":"q","in":"query","required":false,"description":"Keep the services whose domain or name contains this text, case-insensitively.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of services.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicePage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/services/{serviceId}":{"get":{"operationId":"services.get","tags":["Passport"],"summary":"Read a service","description":"One service with the newest messages that tied it to the address, at most 20: their subjects, what each was about and where to read it, never their text.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"serviceId","in":"path","required":true,"description":"The service.","schema":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]}}],"responses":{"200":{"description":"The service and its evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceDetail"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"services.update","tags":["Passport"],"summary":"Update a service","description":"Renames the service, changes its status, replaces its note or plan, clears an active `attention` warning (`attention: null`), or decides about one of its sign-ins (`signIn`). Fields left out stay as they are; null clears the note, the plan, or `attention`. Clearing `attention`, allowing a sign-in and telling a relying party who owns the agent need a console session unless the account allows its account keys to (403 `session_required`); stopping a sign-in never does. `archived` sets a service aside as not a sign-up: mail from its domain still points at it, but never makes it pending again, and its sign-ins are stopped.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["inboxes:manage","mail:read"],"parameters":[{"name":"serviceId","in":"path","required":true,"description":"The service.","schema":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateService"}}}},"responses":{"200":{"description":"The service as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Service"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"services.delete","tags":["Passport"],"summary":"Delete a service","description":"Removes the service from the passport, with what was decided about its sign-ins. Its messages stay. A later message from the domain that concerns an account there records it again, and a later sign-in asks the owner again; archive it instead to keep it set aside.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["inboxes:manage"],"parameters":[{"name":"serviceId","in":"path","required":true,"description":"The service.","schema":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/services":{"post":{"operationId":"inboxes.services.create","tags":["Passport"],"summary":"Declare or add a service","description":"Records that the inbox's address is about to be signed up for a service, or already is. An agent calls it before it signs up: the service is recorded as pending and attributed to the agent, and the codes and links the domain sends are tied to it. A person's is recorded as active. A domain the inbox already has answers 200 with that service, and takes a cancelled or archived one up again. What it costs is recorded with `services.update`. An inbox holds at most 500 services (409 `limit_reached`).","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:write","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:write","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:write","mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateService"}}}},"responses":{"200":{"description":"The service the inbox already had for this domain, as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Service"}}}},"201":{"description":"The service, newly recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Service"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/verifications":{"get":{"operationId":"inboxes.verifications.list","tags":["Passport"],"summary":"Read verification codes","description":"The verification codes and sign-in links the inbox read from its mail in the last 60 minutes, newest first. After signing up, call it with `domain` and `waitSeconds` to be handed the code as soon as it arrives. Each says whether its sender was authenticated (`verified`), and a link whether it points at the sender's own domain (`matchesSender`): treat anything else with suspicion. An agent's read is recorded on what it was handed, and a read with `domain` confirms the pending sign-up and attributes it to the agent when no agent has. A service's invitation to join is served for 14 days with `invitation` true: accept one only when your user asked.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"domain","in":"query","required":false,"description":"Only codes and links from this service's domain, or a host under it.","schema":{"type":"string","minLength":1,"maxLength":253}},{"name":"since","in":"query","required":false,"description":"Only those that arrived after this instant.","schema":{"type":"string","format":"date-time"}},{"name":"waitSeconds","in":"query","required":false,"description":"When none has arrived yet, wait up to this many seconds for one. Defaults to 0.","schema":{"type":"integer","minimum":0,"maximum":20}}],"responses":{"200":{"description":"The codes and links, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationList"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/sign-ins":{"post":{"operationId":"inboxes.signIns.create","tags":["Passport"],"summary":"Start a sign-in","description":"Signs the inbox's address in to a service that accepts Sign in with Doorman, with no password and no email code. Call it only when your user asked you to use that service. `status` says what comes next. `ready`: open `url`, a single-use link good for 5 minutes, in the browser that should hold the session, and show it to nobody. `approval_required`: the owner has to allow the service once, at `approvalUrl`; tell your user, then call again. `blocked`: the owner stopped it, so do not sign in there another way. `unsupported`: sign up with the service's own form and the verification codes.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:write","mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:write","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:write","mail:read"],"x-doorman-feature":"signIn","parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartSignIn"}}}},"responses":{"200":{"description":"What the sign-in needs next.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInStart"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`inbox_suspended`: The inbox cannot send, or start a sign-in, at the moment.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["inbox_suspended","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/security":{"get":{"operationId":"security.get","tags":["Security"],"summary":"Read the security policy","description":"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`.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The account's settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritySettings"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"security.update","tags":["Security"],"summary":"Change the security policy","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecurityPolicy"}}}},"responses":{"200":{"description":"The settings as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritySettings"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/security":{"get":{"operationId":"inboxes.security.get","tags":["Security"],"summary":"Read an inbox's security policy","description":"The policy in force for one inbox: its own when it has one, the account's otherwise (`inherited` says which).","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The inbox's settings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritySettings"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"inboxes.security.update","tags":["Security"],"summary":"Give an inbox its own security policy","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSecurityPolicy"}}}},"responses":{"200":{"description":"The inbox's settings as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecuritySettings"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"inboxes.security.reset","tags":["Security"],"summary":"Return an inbox to the account's security policy","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"204":{"description":"The inbox follows the account's policy."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/senders":{"get":{"operationId":"inboxes.senders.list","tags":["Security"],"summary":"List an inbox's senders","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"standing","in":"query","required":false,"description":"Only senders with this standing.","schema":{"type":"string","enum":["trusted","known","new","blocked"]}},{"name":"q","in":"query","required":false,"description":"Keep the senders whose address or name contains this text, case-insensitively.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of senders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sender-rules":{"get":{"operationId":"senderRules.list","tags":["Security"],"summary":"List sender rules","description":"The account's sender rules, newest first: the addresses and domains the owner trusts or blocks, for the whole account or for one inbox.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"query","required":false,"description":"Only the rules that apply to this inbox alone. Omit for every rule of the account.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"standing","in":"query","required":false,"description":"Only trusted or only blocked.","schema":{"type":"string","enum":["trusted","blocked"]}},{"name":"q","in":"query","required":false,"description":"Keep the rules whose address or domain contains this text.","schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderRulePage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"senderRules.create","tags":["Security"],"summary":"Trust or block a sender","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSenderRule"}}}},"responses":{"201":{"description":"The rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SenderRule"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sender-rules/{senderRuleId}":{"delete":{"operationId":"senderRules.delete","tags":["Security"],"summary":"Remove a sender rule","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"parameters":[{"name":"senderRuleId","in":"path","required":true,"description":"The sender rule.","schema":{"type":"string","pattern":"^snr_[0-9a-hjkmnp-tv-z]{26}$","examples":["snr_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Removed."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/held":{"get":{"operationId":"inboxes.held.list","tags":["Security"],"summary":"List held messages","description":"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.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of held messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldMessagePage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}/release":{"post":{"operationId":"messages.release","tags":["Security"],"summary":"Release a held message","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage","mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"responses":{"200":{"description":"The message, now delivered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}/discard":{"post":{"operationId":"messages.discard","tags":["Security"],"summary":"Discard a held message","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"responses":{"204":{"description":"Discarded."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}/feedback":{"post":{"operationId":"messages.feedback","tags":["Security"],"summary":"Mark a message safe or unsafe","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage","mail:read"],"parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskFeedback"}}}},"responses":{"200":{"description":"The message with the verdict recorded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/security/audit":{"get":{"operationId":"security.audit","tags":["Security"],"summary":"Read the security audit log","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"inboxId","in":"query","required":false,"description":"Only the entries about this inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of entries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityAuditPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/security/preview":{"post":{"operationId":"security.preview","tags":["Security"],"summary":"Preview what a policy does to a message","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityPreviewRequest"}}}},"responses":{"200":{"description":"The assessment, the action and the agent's view.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityPreview"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/held-sends":{"get":{"operationId":"inboxes.heldSends.list","tags":["Security"],"summary":"List held sends","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},{"name":"status","in":"query","required":false,"description":"Only held sends in this state. Defaults to `held`.","schema":{"type":"string","enum":["held","sent","discarded","expired"]}},{"name":"kind","in":"query","required":false,"description":"Only the sends the policy kept (`held`) or only drafts (`draft`). Both when left out.","schema":{"type":"string","enum":["held","draft"]}},{"name":"limit","in":"query","required":false,"description":"Page size, 1 to 100. Defaults to 50.","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"description":"Rows to skip. Defaults to 0.","schema":{"default":0,"type":"integer","minimum":0}}],"responses":{"200":{"description":"A page of held sends.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldSendPage"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/held-sends/{heldSendId}":{"get":{"operationId":"heldSends.get","tags":["Security"],"summary":"Read a held send","description":"Where a held send stands: waiting, sent, discarded or expired. What it says is shown only to a caller that may decide.","security":[{"apiKey":[]},{"session":[]},{"oauth":["mail:read"]}],"x-doorman-access":"any","x-doorman-audience":"public","x-doorman-scopes":["mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"heldSendId","in":"path","required":true,"description":"The held send.","schema":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The held send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldSend"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/held-sends/{heldSendId}/approve":{"post":{"operationId":"heldSends.approve","tags":["Security"],"summary":"Send a held send","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage","mail:send","mail:read"],"parameters":[{"name":"heldSendId","in":"path","required":true,"description":"The held send.","schema":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"201":{"description":"The stored outbound message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SentMessage"}}}},"400":{"description":"`recipient_suppressed`: A recipient previously bounced or complained and is suppressed.\n\n`send_rejected`: The sending provider rejected the message; `providerCode` carries its reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["recipient_suppressed","send_rejected"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"402":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["plan_limit_reached"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`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.\n\n`inbox_suspended`: The inbox cannot send, or start a sign-in, at the moment.\n\n`recipient_not_permitted`: A recipient is not permitted for this deployment.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","session_required","inbox_suspended","recipient_not_permitted","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.\n\n`thread_not_found`: The thread does not exist, belongs to another inbox or was trashed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found","thread_not_found"]},"409":{"description":"`domain_not_verified`: The custom domain has not verified its required DNS records.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["domain_not_verified","account_mismatch"]},"413":{"description":"`message_too_large`: The message exceeds the size limit, including attachments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["message_too_large"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.\n\n`provider_rate_limited`: The sending provider is rate limiting this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded","provider_rate_limited"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`send_failed`: The sending provider did not accept or could not deliver the message; `providerCode` carries its reason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["send_failed"]},"503":{"description":"`sending_paused`: Sending is paused for this deployment pending review.\n\n`sending_unavailable`: The inbox domain is not onboarded for sending, or sending is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["sending_paused","sending_unavailable"]}}}},"/v1/held-sends/{heldSendId}/discard":{"post":{"operationId":"heldSends.discard","tags":["Security"],"summary":"Discard a held send","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["security:manage"],"parameters":[{"name":"heldSendId","in":"path","required":true,"description":"The held send.","schema":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Discarded."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/drafts":{"post":{"operationId":"inboxes.drafts.create","tags":["Sending"],"summary":"Write a draft for the owner to send","description":"Writes a message and leaves it for the owner: nothing is sent, and only the owner sends it, from the console or with `heldSends.approve`. The body is the one a send takes, and it is checked as a send would be (recipients, size, thread) so the owner is not handed something that cannot go out. The answer is a held send with `kind` `draft`; `send.held` fires, and `message.sent` follows if the owner sends it. An inbox has at most 100 drafts waiting, and one nobody sends expires after 30 days. A draft cannot be changed: take it back with `drafts.delete` and write it again.","security":[{"apiKey":[]},{"oauth":["mail:draft","mail:read"]}],"x-doorman-access":"key","x-doorman-audience":"public","x-doorman-scopes":["mail:draft","mail:read"],"x-doorman-delegated":true,"x-doorman-permissions":[],"x-doorman-feature":"drafts","parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/SendMessageForm"}}}},"responses":{"201":{"description":"The draft, waiting for the owner.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldSend"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.\n\n`invalid_form`: The multipart body could not be parsed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json","invalid_form"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`inbox_suspended`: The inbox cannot send, or start a sign-in, at the moment.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","inbox_suspended","insufficient_scope"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.\n\n`thread_not_found`: The thread does not exist, belongs to another inbox or was trashed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found","thread_not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached"]},"413":{"description":"`message_too_large`: The message exceeds the size limit, including attachments.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["message_too_large"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/drafts/{heldSendId}":{"delete":{"operationId":"drafts.delete","tags":["Sending"],"summary":"Take a draft back","description":"Removes a draft that still waits, with what it carried; `send.discarded` fires. For the app or the key that wrote it, or a caller that may decide. A send the security policy kept is not a draft and answers 404 here: the owner ends that one.","security":[{"apiKey":[]},{"oauth":["mail:draft"]}],"x-doorman-access":"key","x-doorman-audience":"public","x-doorman-scopes":["mail:draft"],"x-doorman-delegated":true,"x-doorman-permissions":[],"x-doorman-feature":"drafts","parameters":[{"name":"heldSendId","in":"path","required":true,"description":"The held send.","schema":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Removed."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/apps":{"get":{"operationId":"apps.list","tags":["Apps"],"summary":"List developer apps","description":"The signed-in developer's active clients. Unowned dynamic registrations are not included.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The apps.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"apps.create","tags":["Apps"],"summary":"Register an app","description":"Register exact redirect URIs and allowed scopes. Confidential clients receive a client secret once. Public clients still require S256 PKCE.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApp"}}}},"responses":{"201":{"description":"The app and its one-time secret, if any.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApp"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/apps/{appId}":{"get":{"operationId":"apps.get","tags":["Apps"],"summary":"Read an app","description":"One client owned by this developer, never its secret.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"parameters":[{"name":"appId","in":"path","required":true,"description":"The developer's client.","schema":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"apps.update","tags":["Apps"],"summary":"Update an app","description":"Replace supplied client metadata. Existing installations and pending authorization requests are invalidated.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"parameters":[{"name":"appId","in":"path","required":true,"description":"The developer's client.","schema":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApp"}}}},"responses":{"200":{"description":"The updated app.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/App"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"apps.delete","tags":["Apps"],"summary":"Delete an app","description":"Disable the client and revoke every installation. Stored history is retained.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"parameters":[{"name":"appId","in":"path","required":true,"description":"The developer's client.","schema":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/apps/{appId}/rotate-secret":{"post":{"operationId":"apps.rotateSecret","tags":["Apps"],"summary":"Rotate a client secret","description":"Replace a confidential client's secret and revoke its installations. Public clients do not have secrets.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"parameters":[{"name":"appId","in":"path","required":true,"description":"The developer's client.","schema":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The secret, shown once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppSecret"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/app-installs":{"get":{"operationId":"installs.list","tags":["Apps"],"summary":"List installed apps","description":"The account's active grants first, then recent revoked grants, newest first within each group. At most 500 entries; all active grants are included.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The installations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppInstallList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/app-installs/{installationId}":{"delete":{"operationId":"installs.revoke","tags":["Apps"],"summary":"Revoke an installation","description":"Stop future token, webhook and rule access. Already-sent mail and in-flight network requests cannot be recalled.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["agents:connect"],"parameters":[{"name":"installationId","in":"path","required":true,"description":"The installation.","schema":{"type":"string","pattern":"^ins_[0-9a-hjkmnp-tv-z]{26}$","examples":["ins_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Revoked."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/oauth/requests/{requestId}":{"get":{"operationId":"oauthRequests.get","tags":["Apps"],"summary":"Read a consent request","description":"Bind an unused request to this account and console session and return the requested permissions. This does not approve access.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["agents:connect"],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The pending consent request.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}],"responses":{"200":{"description":"The session-bound consent request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsent"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"oauthRequests.decide","tags":["Apps"],"summary":"Decide a consent request","description":"Approve or deny once, with this request's CSRF value and the same console session. Approval issues a short-lived PKCE-bound code.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["agents:connect"],"parameters":[{"name":"requestId","in":"path","required":true,"description":"The pending consent request.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideOAuth"}}}},"responses":{"200":{"description":"The validated client redirect.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthDecision"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/.well-known/oauth-authorization-server":{"get":{"operationId":"oauth.metadata","tags":["OAuth"],"summary":"Discover authorization","description":"Issuer metadata for authorization-code PKCE, rotating refresh tokens, Client ID Metadata Documents and dynamic client registration.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","responses":{"200":{"description":"Authorization-server metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthServerMetadata"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"oauth.resource","tags":["OAuth"],"summary":"Discover the API resource","description":"The Inbox REST API resource identifier, authorization server and supported scopes.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","responses":{"200":{"description":"Protected-resource metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthResourceMetadata"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"operationId":"oauth.mcpResource","tags":["OAuth"],"summary":"Discover the MCP resource","description":"The MCP resource identifier, authorization server and the permissions an agent needs by default; the other app permissions remain requestable. MCP tokens cannot be used directly at REST endpoints.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","responses":{"200":{"description":"MCP protected-resource metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthResourceMetadata"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/oauth/authorize":{"get":{"operationId":"oauth.authorize","tags":["OAuth"],"summary":"Begin app authorization","description":"Validate a client, its redirect, the resource, the requested scopes and the S256 challenge before redirecting to console consent. A client named by a metadata document URL has that document read and checked first. Unrecognized parameters are ignored. Invalid requests never redirect.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","parameters":[{"name":"response_type","in":"query","required":true,"description":"Always `code`.","schema":{"type":"string","const":"code"}},{"name":"client_id","in":"query","required":true,"description":"The client: an id this API issued, or the URL of the client's Client ID Metadata Document.","schema":{"anyOf":[{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]}],"examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]}},{"name":"redirect_uri","in":"query","required":true,"description":"A redirect the client registered. A loopback redirect matches on any port; every other redirect matches exactly.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"name":"resource","in":"query","required":true,"description":"The API origin for REST access, or the API origin followed by `/mcp` for the MCP endpoint.","schema":{"type":"string","maxLength":2048,"format":"uri"}},{"name":"scope","in":"query","required":false,"description":"Space-separated permissions. When omitted, the request is for the default agent permissions the client may hold.","schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"state","in":"query","required":false,"description":"An opaque value returned unchanged with the answer. A client that sends none gets none back.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"name":"code_challenge","in":"query","required":true,"description":"The S256 PKCE challenge of the verifier the client keeps.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"code_challenge_method","in":"query","required":true,"description":"Always `S256`.","schema":{"type":"string","const":"S256"}}],"responses":{"303":{"description":"Continue to console consent.","headers":{"Location":{"description":"The console consent page.","schema":{"type":"string","format":"uri"}}}},"400":{"description":"The OAuth request was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"Client authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"The request or allocation limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/oauth/token":{"post":{"operationId":"oauth.token","tags":["OAuth"],"summary":"Exchange or refresh tokens","description":"Form-encoded code exchange with PKCE or single-use refresh rotation. Reuse of a consumed credential revokes its token family. A connection stays alive while it is refreshed, up to an absolute limit.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthTokenRequest"}}}},"responses":{"200":{"description":"The bearer and rotating refresh tokens.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthTokens"}}}},"400":{"description":"The OAuth request was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"Client authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"The request or allocation limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/oauth/register":{"post":{"operationId":"oauth.register","tags":["OAuth"],"summary":"Register a public client dynamically","description":"Create an unverified public client with bounded lifetime and quotas. Metadata this API does not use is ignored and the answer states what was registered. Registration alone grants no account access.","security":[],"x-doorman-access":"public","x-doorman-audience":"public","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterOAuthClient"}}}},"responses":{"201":{"description":"The public client.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisteredOAuthClient"}}}},"400":{"description":"The OAuth request was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"401":{"description":"Client authentication failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"429":{"description":"The request or allocation limit was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sign-in/clients":{"get":{"operationId":"signIn.clients.list","tags":["Sign in with Doorman"],"summary":"List relying parties","description":"The relying parties this account registered, oldest first. Relying parties that publish their own identity, and those of other accounts, are not listed.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"signIn","responses":{"200":{"description":"The relying parties.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInClientList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"signIn.clients.create","tags":["Sign in with Doorman"],"summary":"Register a relying party","description":"Registers a service that lets agents sign in with Doorman, identified by its host. Every redirect and the start URL must be on that host. Unless it is a public one, the answer carries its secret, once. Until the host proves it is the service's own (`signIn.clients.verify`), only addresses of this account can sign in to it. An account registers at most 25.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"x-doorman-feature":"signIn","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignInClient"}}}},"responses":{"201":{"description":"The relying party, with its one-time secret if it has one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedSignInClient"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sign-in/clients/{clientId}":{"get":{"operationId":"signIn.clients.get","tags":["Sign in with Doorman"],"summary":"Read a relying party","description":"One relying party this account registered, with the proof its host has to serve, never its secret.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"signIn","parameters":[{"name":"clientId","in":"path","required":true,"description":"The relying party.","schema":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The relying party.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInClient"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"signIn.clients.update","tags":["Sign in with Doorman"],"summary":"Update a relying party","description":"Replaces the name, the redirects or the start URL. Sign-ins in progress end. The addresses already allowed stay allowed: they were allowed for the host, and the host never changes.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"x-doorman-feature":"signIn","parameters":[{"name":"clientId","in":"path","required":true,"description":"The relying party.","schema":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSignInClient"}}}},"responses":{"200":{"description":"The relying party as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInClient"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"signIn.clients.delete","tags":["Sign in with Doorman"],"summary":"Delete a relying party","description":"Disables the relying party. No address can sign in to it any more, and what was decided about it leaves every passport. A session the service itself keeps is the service's own.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"x-doorman-feature":"signIn","parameters":[{"name":"clientId","in":"path","required":true,"description":"The relying party.","schema":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sign-in/clients/{clientId}/rotate-secret":{"post":{"operationId":"signIn.clients.rotateSecret","tags":["Sign in with Doorman"],"summary":"Rotate a relying party's secret","description":"Replaces the secret and returns the new one once. The one before it stops working at once. A public relying party has none (400 `validation_error`).","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"x-doorman-feature":"signIn","parameters":[{"name":"clientId","in":"path","required":true,"description":"The relying party.","schema":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The new secret, shown once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInClientSecret"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sign-in/clients/{clientId}/verify":{"post":{"operationId":"signIn.clients.verify","tags":["Sign in with Doorman"],"summary":"Verify a relying party's host","description":"Reads the proof file from the relying party's host (`proof.url`): one GET over HTTPS that follows no redirect and carries no credential, within 5 seconds and 8 KiB. When the file is JSON that carries this relying party's `client_id` and `proof`, the host is verified and addresses of any account can sign in to it. Anything else answers 409 `host_proof_failed` and changes nothing. A host on the developer's own machine cannot be verified (400 `validation_error`).","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["apps:manage"],"x-doorman-feature":"signIn","parameters":[{"name":"clientId","in":"path","required":true,"description":"The relying party.","schema":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"200":{"description":"The relying party, now verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInClient"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`host_proof_failed`: The relying party's host did not serve the proof file it was given; the message says what was found instead. Publish the file and verify again.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["host_proof_failed","account_mismatch"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/sign-in/requests/{requestId}":{"get":{"operationId":"signIn.requests.get","tags":["Sign in with Doorman"],"summary":"Read a sign-in that waits for the owner","description":"Binds an unused authorization request to this account and console session, and returns who is asking, for which address and for what. It allows nothing. Each read replaces the request's `csrf`. A relying party that has not proved its host answers 404 to every account but the one that registered it.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["inboxes:manage"],"x-doorman-feature":"signIn","parameters":[{"name":"requestId","in":"path","required":true,"description":"The waiting authorization request.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","examples":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]}}],"responses":{"200":{"description":"The session-bound request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInApproval"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"signIn.requests.decide","tags":["Sign in with Doorman"],"summary":"Decide a sign-in","description":"Allows or denies once, with the request's `csrf` and the same console session. Allowing connects the address to the relying party, so its agents sign in there alone from then on, and sends the browser back with a code that lasts 60 seconds. Denying sends it back with `access_denied` and changes nothing else. Nothing but a person's session can call this.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["inboxes:manage"],"x-doorman-feature":"signIn","parameters":[{"name":"requestId","in":"path","required":true,"description":"The waiting authorization request.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","examples":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideSignIn"}}}},"responses":{"200":{"description":"Where the browser goes next.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInDecision"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/links/read":{"post":{"operationId":"signIn.links.read","tags":["Sign in with Doorman"],"summary":"Read a sign-in link","description":"What a sign-in link is for, for the page that shows it before anyone continues. Reading spends nothing. An unknown, a used and an expired link all answer 404. Called by the web app's server; the link in the body is what it answers to.","security":[],"x-doorman-access":"public","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"signIn","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInLinkRequest"}}}},"responses":{"200":{"description":"The address and the relying party the link is for.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInLinkPreview"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/links/open":{"post":{"operationId":"signIn.links.open","tags":["Sign in with Doorman"],"summary":"Open a sign-in link","description":"Spends a sign-in link, and returns a binding for the browser that opened it and where that browser continues. The binding lasts 5 minutes and finishes one sign-in, to the link's relying party only. The link is spent whatever happens next.","security":[],"x-doorman-access":"public","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"signIn","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInLinkRequest"}}}},"responses":{"200":{"description":"The binding and where the browser continues.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInLinkOpened"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/requests/resume":{"post":{"operationId":"signIn.requests.resume","tags":["Sign in with Doorman"],"summary":"Resume a sign-in","description":"Finishes a waiting authorization request for the browser it belongs to. With the binding of a sign-in link opened for the same relying party, and the address allowed there, the answer sends the browser back with a code. Without one, the owner has to decide in the console; a request that asked for no interaction is sent back with `login_required` instead. Everything is read again as it is now: an address the owner stopped goes back with `access_denied`.","security":[],"x-doorman-access":"public","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"signIn","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeSignIn"}}}},"responses":{"200":{"description":"Where the browser goes next.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInResumed"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"`rate_limit_exceeded`: A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["rate_limit_exceeded"],"headers":{"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer","examples":[37]}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/.well-known/openid-configuration":{"get":{"operationId":"signIn.discovery","tags":["OpenID Connect"],"summary":"Discover the provider","description":"OpenID Connect discovery: the issuer, its endpoints and what it supports. Cacheable for 300 seconds.","security":[],"x-doorman-access":"public","x-doorman-audience":"relying_party","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","x-doorman-feature":"signIn","x-doorman-host":"issuer","servers":[{"url":"https://id.doorman.fyi","description":"The issuer of Sign in with Doorman."}],"responses":{"200":{"description":"The provider's metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInDiscovery"}}}},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/jwks.json":{"get":{"operationId":"signIn.jwks","tags":["OpenID Connect"],"summary":"Read the signing keys","description":"The public keys id tokens are signed with, as a JSON Web Key Set. A new key is published before it signs, and an old one stays until every token it signed has expired. Cacheable for 300 seconds; read it again on a `kid` it does not list.","security":[],"x-doorman-access":"public","x-doorman-audience":"relying_party","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","x-doorman-feature":"signIn","x-doorman-host":"issuer","servers":[{"url":"https://id.doorman.fyi","description":"The issuer of Sign in with Doorman."}],"responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInJwks"}}}},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/authorize":{"get":{"operationId":"signIn.authorize","tags":["OpenID Connect"],"summary":"Begin a sign-in","description":"Checks the relying party, its redirect and the request, keeps the request for 15 minutes and sends the browser to the page that finishes it. A relying party named by the URL of its identity document has that document read and checked first. A request whose relying party or redirect cannot be trusted is answered here and never redirected. Every later refusal goes back to the redirect with `error`, `state` and `iss`. Parameters this provider does not read are ignored, except `request`, `request_uri` and `registration`, which are refused by name.","security":[],"x-doorman-access":"public","x-doorman-audience":"relying_party","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","x-doorman-feature":"signIn","x-doorman-host":"issuer","servers":[{"url":"https://id.doorman.fyi","description":"The issuer of Sign in with Doorman."}],"parameters":[{"name":"response_type","in":"query","required":true,"description":"Always `code`.","schema":{"type":"string","const":"code"}},{"name":"client_id","in":"query","required":true,"description":"The relying party: an id this API issued, or the URL of the identity document it published.","schema":{"anyOf":[{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]}],"examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]}},{"name":"redirect_uri","in":"query","required":true,"description":"A redirect the relying party registered, on its own host. Compared exactly, except the port of a redirect on the developer's own machine.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"name":"scope","in":"query","required":false,"description":"Space-separated. `openid` is required when any is named; scopes this provider does not have are ignored. When omitted, `openid email`.","schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"state","in":"query","required":false,"description":"An opaque value returned unchanged with the answer.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"name":"nonce","in":"query","required":false,"description":"An opaque value returned unchanged in the id token.","schema":{"type":"string","minLength":1,"maxLength":512}},{"name":"code_challenge","in":"query","required":false,"description":"The S256 PKCE challenge of the verifier the relying party keeps. Required of a public relying party.","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},{"name":"code_challenge_method","in":"query","required":false,"description":"Always `S256`.","schema":{"type":"string","const":"S256"}},{"name":"login_hint","in":"query","required":false,"description":"The address the relying party expects, as it was handed one when a sign-in link started the login. A hint, never a decision.","schema":{"type":"string","minLength":1,"maxLength":254}},{"name":"prompt","in":"query","required":false,"description":"`none` asks for an answer without interaction: where the owner would have to decide, the answer is `login_required`. Other values are ignored.","schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"303":{"description":"Continue in the browser, or go back to the redirect with an error.","headers":{"Location":{"description":"The page that finishes the sign-in, or the relying party's redirect.","schema":{"type":"string","format":"uri"}}}},"400":{"description":"The relying party or its redirect could not be trusted, so nothing is redirected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"Too many requests. Try again after the time `Retry-After` gives.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/token":{"post":{"operationId":"signIn.token","tags":["OpenID Connect"],"summary":"Exchange a code","description":"Exchanges a code, once, within 60 seconds of its issue, for an id token and an access token that last 10 minutes. A relying party with a secret presents it with HTTP Basic or in the body, whichever it registered, and is refused the other way (401 `invalid_client`); a public one sends its PKCE verifier. The inbox, its account and the owner's decision are read again, so a code issued before the owner stopped the address is refused. A code presented twice ends the tokens its first exchange returned. There is no refresh token.","security":[],"x-doorman-access":"public","x-doorman-audience":"relying_party","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","x-doorman-feature":"signIn","x-doorman-host":"issuer","servers":[{"url":"https://id.doorman.fyi","description":"The issuer of Sign in with Doorman."}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/SignInTokenRequest"}}}},"responses":{"200":{"description":"The id token and the access token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInTokens"}}}},"400":{"description":"The request or the code was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"401":{"description":"The relying party could not be authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"Too many requests. Try again after the time `Retry-After` gives.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/sign-in/userinfo":{"get":{"operationId":"signIn.userinfo","tags":["OpenID Connect"],"summary":"Read the signed-in address","description":"The claims about the address an access token was issued for, read again from live state: the address, its name and, where the owner allows it now, who owns it. Authenticated with the access token of the code exchange, never with an API credential. An address that was deleted or stopped since answers 401.","security":[{"signInToken":[]}],"x-doorman-access":"sign_in","x-doorman-audience":"relying_party","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","x-doorman-feature":"signIn","x-doorman-host":"issuer","servers":[{"url":"https://id.doorman.fyi","description":"The issuer of Sign in with Doorman."}],"responses":{"200":{"description":"The claims the granted scopes allow, as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInUserInfo"}}}},"401":{"description":"The access token is missing, unknown, expired or ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}},"headers":{"WWW-Authenticate":{"description":"`Bearer error=\"invalid_token\"`.","schema":{"type":"string"}}}},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"Too many requests. Try again after the time `Retry-After` gives.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"signIn.userinfoPost","tags":["OpenID Connect"],"summary":"Read the signed-in address with POST","description":"The same answer as the GET, for OpenID Connect clients that send POST. The access token goes in the Authorization header.","security":[{"signInToken":[]}],"x-doorman-access":"sign_in","x-doorman-audience":"relying_party","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-surface":"protocol","x-doorman-feature":"signIn","x-doorman-host":"issuer","servers":[{"url":"https://id.doorman.fyi","description":"The issuer of Sign in with Doorman."}],"responses":{"200":{"description":"The claims the granted scopes allow, as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInUserInfo"}}}},"401":{"description":"The access token is missing, unknown, expired or ended.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}},"headers":{"WWW-Authenticate":{"description":"`Bearer error=\"invalid_token\"`.","schema":{"type":"string"}}}},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"429":{"description":"Too many requests. Try again after the time `Retry-After` gives.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInProtocolError"}}}},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/billing/checkout":{"post":{"operationId":"billing.checkout","tags":["Account"],"summary":"Start a checkout","description":"A page at the payment provider where the person pays for the Unlimited plan, monthly. The plan changes when the provider reports the payment, never because the browser came back. An account that is already on a paid plan answers 409 `already_subscribed`. An organization's account pays for the Teams plan instead, $7 a month for each seat: the checkout is for as many seats as the organization holds, and never fewer than 3. Where the deployment does not sell that plan, an organization answers 404.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["billing:manage"],"x-doorman-feature":"billing","responses":{"200":{"description":"The checkout page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`already_subscribed`: The account is already on a paid plan, so there is nothing to check out.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["already_subscribed","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]}}}},"/v1/billing/seats":{"post":{"operationId":"billing.seats","tags":["Account"],"summary":"Change the organization's seats","description":"Sets how many seats the organization's Teams subscription holds, from 3 to 20. A seat is held by every active member and every open invitation. More seats are charged at once, for what is left of the paid month, and count from the provider's answer; a card that cannot be charged answers 402 `payment_failed` and changes nothing. Fewer seats take effect when the paid month ends, with nothing paid back, and never fewer than are held (409 `seats_in_use`). The number is the whole count, so asking twice for the same number is charged once. One change is made at a time (409 `seat_change_pending`). An account without an active Teams subscription answers 409 `no_subscription`.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["billing:manage"],"x-doorman-feature":"billing","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSeats"}}}},"responses":{"200":{"description":"The plan and the subscription as they are now, with the seats.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSynced"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"402":{"description":"`payment_failed`: The payment provider could not charge for the change, so nothing was changed. The card on file can be replaced in the billing portal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["payment_failed"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`no_subscription`: The account has never paid through the payment provider, so there is no billing to manage; or, where seats are changed, it has no Teams subscription that is active.\n\n`seats_in_use`: The organization holds more seats than the number asked for: `used` says how many. Remove a member or take an invitation back first.\n\n`seat_change_pending`: Another change to the organization's seats is still being made at the payment provider. Try again in a moment.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["no_subscription","seats_in_use","seat_change_pending","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]}}}},"/v1/billing/portal":{"post":{"operationId":"billing.portal","tags":["Account"],"summary":"Open the billing portal","description":"A page at the payment provider where the person changes the card, reads invoices and cancels. An account that never paid there answers 409 `no_subscription`.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["billing:manage"],"x-doorman-feature":"billing","responses":{"200":{"description":"The billing portal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingRedirect"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`no_subscription`: The account has never paid through the payment provider, so there is no billing to manage; or, where seats are changed, it has no Teams subscription that is active.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["no_subscription","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]}}}},"/v1/billing/sync":{"post":{"operationId":"billing.sync","tags":["Account"],"summary":"Read billing again","description":"Reads the account's subscription from the payment provider and applies it, as the provider's own event would. The console calls it when a person comes back from the checkout, so the plan shows without waiting for the event.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["billing:manage"],"x-doorman-feature":"billing","responses":{"200":{"description":"The plan and the subscription as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingSynced"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]}}}},"/v1/polar/webhook":{"post":{"operationId":"billing.webhook","tags":["Operator"],"summary":"The payment provider's webhook","description":"Signed subscription events, verified with Standard Webhooks headers before anything is read. Only the subscription's id is taken from the event: the subscription is read again from the provider and that is what is applied, so events that arrive out of order change nothing wrongly. Events about another product of the same provider account are acknowledged and ignored. Returns 404 where billing is not switched on.","security":[],"x-doorman-access":"signed","x-doorman-audience":"operator","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"billing","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWebhookEnvelope"}}}},"responses":{"200":{"description":"What the event did.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingWebhookResult"}}}},"400":{"description":"`webhook_rejected`: The identity provider's webhook signature could not be verified.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["webhook_rejected","invalid_json"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"502":{"description":"`provider_unavailable`: The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["provider_unavailable"]}}}},"/v1/push":{"get":{"operationId":"push.get","tags":["Account"],"summary":"Read notification settings","description":"Whether this deployment can send notifications, the key a browser subscribes with, and the browsers and devices the account has notifications on for. A subscription's address is never answered.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The settings and the subscriptions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSettings"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/push/subscriptions":{"post":{"operationId":"push.subscriptions.create","tags":["Account"],"summary":"Switch notifications on for a browser","description":"Records the address a browser was given when the owner allowed notifications there. From then on the account is notified there when mail is held for review, a service in its passport needs a look, or a sign-in waits to be allowed: at most once every 15 minutes and 20 times a day, and with no payload, so a notification says that something waits and never what. An address the account already has answers 200 with that subscription. An account has at most 10.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePushSubscription"}}}},"responses":{"200":{"description":"The subscription the account already had for this address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}}},"201":{"description":"The new subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushSubscription"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]},"503":{"description":"`push_unavailable`: Notifications are not configured for this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["push_unavailable"]}}}},"/v1/push/subscriptions/{subscriptionId}":{"delete":{"operationId":"push.subscriptions.delete","tags":["Account"],"summary":"Switch notifications off for a browser","description":"Forgets the subscription, so nothing more is sent there. The browser's own permission is the browser's to take back.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["mail:read"],"parameters":[{"name":"subscriptionId","in":"path","required":true,"description":"The subscription.","schema":{"type":"string","pattern":"^psh_[0-9a-hjkmnp-tv-z]{26}$","examples":["psh_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Forgotten."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/members":{"get":{"operationId":"members.list","tags":["Account"],"summary":"List the organization's members","description":"Everyone who has worked in the organization, with the role the API keeps for each of them and where they stand. Every member may read it: a team knows who is on it. A personal account has no members, and the list is empty.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"responses":{"200":{"description":"The members, in the order they joined.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/members/{userId}":{"patch":{"operationId":"members.update","tags":["Account"],"summary":"Change a member's role","description":"Gives the member another role, which holds from their next request. Only an owner may make someone an owner or change an owner's role (403 `owner_required`), and an organization keeps at least one active owner: the last one cannot be given another role (409 `last_owner`). A role the member already has changes nothing.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["members:manage"],"parameters":[{"name":"userId","in":"path","required":true,"description":"The member, by the identity provider's id of the person.","schema":{"type":"string","pattern":"^user_[A-Za-z0-9]{1,64}$","examples":["user_2abcDEF3ghiJKL"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMember"}}}},"responses":{"200":{"description":"The member with the new role.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`owner_required`: Only an owner of the organization may make someone an owner, invite an owner or change an owner's role.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","owner_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`last_owner`: The member is the organization's only active owner. Make someone else an owner first.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["last_owner","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/invitations":{"get":{"operationId":"invitations.list","tags":["Account"],"summary":"List the organization's invitations","description":"The invitations the organization sent, open and settled, newest first. An invitation nobody answered in time is listed as `expired`. Empty for a personal account.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["members:manage"],"responses":{"200":{"description":"The invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationList"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"invitations.create","tags":["Account"],"summary":"Invite someone to the organization","description":"Records an invitation and the role it grants. Nothing is sent by this call: the console's server then has the identity provider send the email, and records which invitation that was. The invitation stays open for 30 days. The person takes the role when their first session in the organization arrives with the invited address. An address that already belongs to a member answers 409 `already_member`, and one that already has an open invitation 409 `already_invited`. Only an owner may invite an owner (403 `owner_required`). An organization has at most 50 open invitations. A personal account cannot invite (403 `organization_required`). Where the deployment sells the Teams plan, an open invitation holds a seat: an organization with no seat free answers 402 `seat_required`, and so does one that has not started the plan.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["members:manage"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvitation"}}}},"responses":{"201":{"description":"The invitation, still to be sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"402":{"description":"`seat_required`: The organization has no seat free for another person. `seats` is how many its subscription pays for, or null when it has no Teams subscription yet; `used` is how many are held by members and open invitations; `seatPriceUsd` is what one more costs a month. Someone who may manage billing can start the Teams plan or add a seat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["seat_required"]},"403":{"description":"`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.\n\n`organization_required`: The operation acts on an organization, and the session is in a personal account. Switch to the organization first.\n\n`owner_required`: Only an owner of the organization may make someone an owner, invite an owner or change an owner's role.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","organization_required","owner_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"409":{"description":"`already_member`: The invited address already belongs to a member of the organization.\n\n`already_invited`: The address already has an open invitation to the organization. Take it back first, or send it again.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["already_member","already_invited","limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/invitations/{invitationId}":{"patch":{"operationId":"invitations.update","tags":["Account"],"summary":"Record that an invitation was sent","description":"Records the identity provider's invitation that was sent for this one. The console's server calls it after the provider accepted the invitation, and again with the new one after sending it again, which keeps the invitation open for another 30 days. Only an open invitation can be changed.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["members:manage"],"parameters":[{"name":"invitationId","in":"path","required":true,"description":"The invitation.","schema":{"type":"string","pattern":"^inv_[0-9a-hjkmnp-tv-z]{26}$","examples":["inv_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvitation"}}}},"responses":{"200":{"description":"The invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"invitations.revoke","tags":["Account"],"summary":"Take an invitation back","description":"Revokes an open invitation, so that the role it would have granted is granted to nobody. The console's server revokes it at the identity provider first. An invitation that was accepted, revoked or has expired answers 404.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["members:manage"],"parameters":[{"name":"invitationId","in":"path","required":true,"description":"The invitation.","schema":{"type":"string","pattern":"^inv_[0-9a-hjkmnp-tv-z]{26}$","examples":["inv_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Revoked."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/baa":{"get":{"operationId":"baa.get","tags":["Healthcare"],"summary":"Read the agreement's standing","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"healthcare","responses":{"200":{"description":"The account's standing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Baa"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/baa/document":{"get":{"operationId":"baa.document","tags":["Healthcare"],"summary":"Read the agreement","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"healthcare","responses":{"200":{"description":"The text.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaaDocument"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/baa/sign":{"post":{"operationId":"baa.sign","tags":["Healthcare"],"summary":"Sign the agreement","description":"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.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignBaa"}}}},"responses":{"200":{"description":"The account's standing, with the record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Baa"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`baa_required`: Changing 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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","baa_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/baa/terminate":{"post":{"operationId":"baa.terminate","tags":["Healthcare"],"summary":"End the agreement","description":"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.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminateBaa"}}}},"responses":{"200":{"description":"The account's standing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Baa"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/guardrails":{"get":{"operationId":"guardrails.get","tags":["Healthcare"],"summary":"Read the guardrails","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"healthcare","responses":{"200":{"description":"The account's guardrails.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailSettings"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"guardrails.update","tags":["Healthcare"],"summary":"Change the guardrails","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGuardrailPolicy"}}}},"responses":{"200":{"description":"The guardrails as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailSettings"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`baa_required`: Changing 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.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","baa_required","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/inboxes/{inboxId}/guardrails":{"get":{"operationId":"inboxes.guardrails.get","tags":["Healthcare"],"summary":"Read an inbox's guardrails","description":"The guardrails in force for one inbox: its own when it has them, the account's otherwise (`inherited` says which).","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"healthcare","parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The inbox's guardrails.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailSettings"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"patch":{"operationId":"inboxes.guardrails.update","tags":["Healthcare"],"summary":"Give an inbox its own guardrails","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGuardrailPolicy"}}}},"responses":{"200":{"description":"The inbox's guardrails as they are now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailSettings"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`baa_required`: Changing 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.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","baa_required","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"inboxes.guardrails.reset","tags":["Healthcare"],"summary":"Return an inbox to the account's guardrails","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","parameters":[{"name":"inboxId","in":"path","required":true,"description":"The inbox.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"204":{"description":"The inbox follows the account's guardrails."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`baa_required`: Changing 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.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","baa_required","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/guardrails/rules":{"get":{"operationId":"guardrails.rules.list","tags":["Healthcare"],"summary":"List custom guardrails","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":[],"x-doorman-feature":"healthcare","parameters":[{"name":"inboxId","in":"query","required":false,"description":"Only the guardrails that apply to this inbox alone. Omit for every guardrail of the account.","schema":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}}],"responses":{"200":{"description":"The guardrails.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailRuleList"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"post":{"operationId":"guardrails.rules.create","tags":["Healthcare"],"summary":"Write a custom guardrail","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGuardrailRule"}}}},"responses":{"201":{"description":"The guardrail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailRule"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`baa_required`: Changing 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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","baa_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["limit_reached","account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/guardrails/rules/{guardrailId}":{"patch":{"operationId":"guardrails.rules.update","tags":["Healthcare"],"summary":"Change a custom guardrail","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","parameters":[{"name":"guardrailId","in":"path","required":true,"description":"The custom guardrail.","schema":{"type":"string","pattern":"^grd_[0-9a-hjkmnp-tv-z]{26}$","examples":["grd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGuardrailRule"}}}},"responses":{"200":{"description":"The guardrail as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailRule"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`baa_required`: Changing 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.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","baa_required","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}},"delete":{"operationId":"guardrails.rules.delete","tags":["Healthcare"],"summary":"Remove a custom guardrail","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","parameters":[{"name":"guardrailId","in":"path","required":true,"description":"The custom guardrail.","schema":{"type":"string","pattern":"^grd_[0-9a-hjkmnp-tv-z]{26}$","examples":["grd_01jc5f1a2b3c4d5e6f7g8h9j0k"]}}],"responses":{"204":{"description":"Removed."},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`baa_required`: Changing 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.\n\n`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.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","baa_required","session_required","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/guardrails/preview":{"post":{"operationId":"guardrails.preview","tags":["Healthcare"],"summary":"Preview what the guardrails do to a text","description":"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.","security":[{"apiKey":[]},{"session":[]}],"x-doorman-access":"account","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["compliance:manage"],"x-doorman-feature":"healthcare","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailPreviewRequest"}}}},"responses":{"200":{"description":"The redacted text, the findings and the action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuardrailPreview"}}}},"400":{"description":"`validation_error`: A field is missing or invalid; the message names it.\n\n`invalid_json`: The request body is not JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["validation_error","invalid_json"]},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`forbidden`: The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.\n\n`insufficient_scope`: The app's token lacks a required scope, or the operation cannot be delegated.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["forbidden","insufficient_scope","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}},"/v1/messages/{messageId}/original":{"get":{"operationId":"messages.original","tags":["Healthcare"],"summary":"Read a message as it arrived","description":"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.","security":[{"session":[]}],"x-doorman-access":"session","x-doorman-audience":"console","x-doorman-scopes":[],"x-doorman-delegated":false,"x-doorman-permissions":["phi:read","mail:read"],"x-doorman-feature":"healthcare","parameters":[{"name":"messageId","in":"path","required":true,"description":"The message.","schema":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]}}],"responses":{"200":{"description":"The message as it arrived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"401":{"description":"`unauthorized`: The credential was missing, malformed, revoked or belongs to an inactive account.\n\n`session_invalid`: The console session token could not be verified.\n\n`session_expired`: The console session token has expired.\n\n`session_claims_missing`: The session token does not carry a verified email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["unauthorized","session_invalid","session_expired","session_claims_missing"]},"403":{"description":"`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.\n\n`account_suspended`: The account is suspended.\n\n`account_deleted`: The account was deleted.\n\n`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.\n\n`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["session_required","account_suspended","account_deleted","permission_denied","member_deactivated"]},"404":{"description":"`not_found`: No such resource for this caller, or no such route.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["not_found"]},"409":{"description":"`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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["account_mismatch"]},"500":{"description":"`internal_error`: Something went wrong on the server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"x-doorman-errors":["internal_error"]}}}}},"webhooks":{"message.received":{"post":{"summary":"message.received","description":"The `message.received` event, as it is signed and posted to webhooks and framed on the stream. Field names use snake_case. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageReceivedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"message.sent":{"post":{"summary":"message.sent","description":"A message accepted by the sending provider and stored. This is not proof of final delivery. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageSentEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"thread.updated":{"post":{"summary":"thread.updated","description":"The thread's extension state after a read-state, metadata, label or trash change. A no-op edit emits no event. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadUpdatedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"inbox.created":{"post":{"summary":"inbox.created","description":"An inbox was created. No API key or webhook signing secret is included. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxCreatedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"inbox.deleted":{"post":{"summary":"inbox.deleted","description":"An inbox was deleted through the API. Delivered to matching account endpoints, not the removed inbox webhook. The address is the one it held before deletion. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InboxDeletedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"delivery.failed":{"post":{"summary":"delivery.failed","description":"A webhook delivery reached a terminal failure. Account endpoint failures have inbox_id null and require account scope. Failure notifications never produce further failure notifications. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeliveryFailedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"message.held":{"post":{"summary":"message.held","description":"A message arrived and is held for the owner under the security policy (ADR-018). The payload says who, when and why, and nothing of the message itself: no subject, no body, no attachment. When the owner releases it, message.received follows with the content; a discarded message produces nothing further. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageHeldEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"send.held":{"post":{"summary":"send.held","description":"A message waits for the owner before it leaves the inbox: one that was asked to be sent and that the security policy kept (`sendApproval`), or a draft written for the owner to send (`kind` says which). The payload says who it is to and who asked, and nothing of what it says: no subject, no body, no attachment. When the owner sends it, message.sent follows; when the owner discards it or nobody decides in time, send.discarded does. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendHeldEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"send.discarded":{"post":{"summary":"send.discarded","description":"A held send ended without being sent: the owner discarded it, or it expired. Nothing of what it said is included. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDiscardedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"sign_in.requested":{"post":{"summary":"sign_in.requested","description":"An address asked to sign in to a service for the first time and waits for the owner to allow it (Sign in with Doorman). Asking again while it waits emits nothing. Nothing in the payload lets anyone sign in. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInRequestedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}},"sign_in.completed":{"post":{"summary":"sign_in.completed","description":"An address signed in to a service: the relying party exchanged its code for tokens (Sign in with Doorman). The payload names the service and carries no token, code or claim. Posted to matching webhooks with the Standard Webhooks headers: `webhook-id` (the event id, stable across retries), `webhook-timestamp` (seconds since the epoch) and `webhook-signature` (`v1,<base64 HMAC-SHA256>` over `<id>.<timestamp>.<body>` with the decoded `whsec_` secret). A delivery succeeds on any 2xx within 15 seconds; redirects are failures. Retries follow 30, 60, 120, 240 seconds, 5 attempts in total, and every attempt is recorded. Delivery is at least once: deduplicate on `event_id`.","parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event id, stable across retries.","schema":{"type":"string","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Seconds since the epoch when the attempt was signed; reject stale ones.","schema":{"type":"string","examples":["1793959500"]}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,` and the base64 HMAC-SHA256; several space-separated signatures may appear.","schema":{"type":"string","examples":["v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj1ieeXrkzvPSg="]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInCompletedEvent"}}}},"responses":{"2XX":{"description":"Received. Anything else, or no answer within the timeout, is retried."}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","enum":["unauthorized","session_invalid","session_expired","session_claims_missing","plan_limit_reached","seat_required","payment_failed","forbidden","permission_denied","member_deactivated","organization_required","owner_required","insufficient_scope","session_required","account_suspended","account_deleted","inbox_suspended","recipient_not_permitted","risk_blocked","baa_required","guardrail_blocked","not_found","thread_not_found","validation_error","invalid_json","invalid_form","recipient_suppressed","send_rejected","webhook_rejected","method_not_allowed","already_exists","limit_reached","no_webhook","delivery_pending","idempotency_in_progress","not_suspended","already_subscribed","no_subscription","seat_change_pending","seats_in_use","account_mismatch","last_owner","already_member","already_invited","organization_not_empty","message_too_large","idempotency_key_reused","upgrade_required","rate_limit_exceeded","provider_rate_limited","internal_error","send_failed","sending_paused","sending_unavailable","scan_unavailable","assistant_unavailable","custom_domains_unavailable","connect_unavailable","push_unavailable","domain_not_verified","host_proof_failed","provider_unavailable","queue_unavailable"],"description":"A stable code; see the error catalogue."},"message":{"type":"string","description":"One sentence for a person or a log."},"permission":{"type":"string","enum":["mail:read","mail:write","mail:send","inboxes:manage","security:manage","keys:manage","webhooks:manage","domains:manage","apps:manage","agents:connect","members:manage","billing:manage","account:manage","compliance:manage","phi:read"],"description":"`permission_denied`: the permission the member's role in the organization lacks."},"scope":{"type":"string","enum":["inboxes","account","inbox","domains"],"description":"The inbox, account, or domain allowance or rate limit that applied."},"plan":{"type":"string","description":"`plan_limit_reached`: the account's plan."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"`plan_limit_reached` and `rate_limit_exceeded`: the limit that applied."},"used":{"type":"integer","description":"`plan_limit_reached`: how much of the allowance is used. `seat_required` and `seats_in_use`: the seats held by members and open invitations."},"seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"`seat_required`: the seats the organization's subscription pays for; null when it has no Teams subscription."},"seatPriceUsd":{"type":"number","description":"`seat_required`: what one seat costs a month."},"resetsAt":{"type":"string","format":"date-time","description":"`plan_limit_reached` (sends) and `rate_limit_exceeded`: when the count starts again."},"providerCode":{"type":"string","description":"`send_rejected` and `send_failed`: the sending provider's own code."},"guard":{"type":"string","enum":["reply","recipient","content","guardrail"],"description":"`risk_blocked`: which guard refused: `reply` or `recipient` from the security policy, `content` when an attachment did not pass the check of its bytes, or `guardrail` when a healthcare guardrail found what may not be sent."},"reasons":{"type":"array","items":{"type":"string"},"description":"`risk_blocked` with the `content` guard: the reason codes from `RISK_REASONS` for what was found."},"entities":{"type":"array","items":{"type":"string","enum":["ssn","medical_record_number","insurance_id","date_of_birth","phone","email","street_address","payment_card","bank_account","ip_address","national_id","drivers_license","passport","patient_name","custom"]},"description":"`guardrail_blocked`, and `risk_blocked` with the `guardrail` guard: the kinds of protected information that were found. Never the text."},"baa":{"type":"string","enum":["plan_required","not_signed","reacceptance_required"],"description":"`baa_required`: what is missing before guardrails can be changed."},"field":{"type":"string","enum":["mailboxName","externalId"],"description":"`already_exists` on an inbox: which of the request's values is already in use."}},"required":["error","message"],"description":"Every error answer: a stable code and a sentence, plus details some codes add.","examples":[{"error":"not_found","message":"Inbox not found."},{"error":"plan_limit_reached","message":"The Free plan includes 3 inboxes. Upgrade to create more.","scope":"inboxes","plan":"free","limit":3,"used":3},{"error":"rate_limit_exceeded","message":"Max 10 sends per minute per inbox.","scope":"inbox","limit":10,"resetsAt":"2026-11-05T10:06:00.000Z"},{"error":"permission_denied","message":"Your role in this organization cannot mint or revoke API keys. Ask one of its admins.","permission":"keys:manage"}]},"Metadata":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]*$"},"additionalProperties":{"type":["string","number","boolean","null"]},"maxProperties":20,"description":"Extension state: at most 20 keys and 2048 bytes of UTF-8 JSON. Keys are 1 to 64 ASCII letters, digits, underscores, dots, colons or hyphens, starting with a letter or digit. Values are strings, finite numbers, booleans or null. Replaced as a whole; {} clears it. Do not store secrets.","examples":[{"customer":"customer-8841","reviewed":false}]},"ThreadLabel":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9][A-Za-z0-9_.:-]*$","description":"A case-sensitive label: 1 to 64 ASCII letters, digits, underscores, dots, colons or hyphens, starting with a letter or digit.","examples":["needs-review"]},"ThreadLabels":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/ThreadLabel"},"uniqueItems":true,"description":"At most 20 unique labels. Replaced as a whole; [] clears the labels.","examples":[["needs-review"]]},"Inbox":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string","description":"The full address: the mailbox name at the inbox domain.","examples":["concierge@doorman.example"]},"mailboxName":{"type":"string","description":"The part before the @.","examples":["concierge"]},"domain":{"type":"string","description":"The inbox domain of this deployment.","examples":["doorman.example"]},"domainId":{"description":"The custom domain identifier; null on the shared domain. Older deployments omit it.","anyOf":[{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","description":"A custom domain identifier.","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"null"}]},"displayName":{"description":"The sender name on outbound mail; null when none is set.","type":["string","null"]},"signature":{"description":"Plain text appended to every message the inbox sends, under a `-- ` line; null when none is set. Older deployments omit it.","examples":["Acme concierge\nacme.example"],"type":["string","null"]},"signatureHtml":{"description":"The signature as markup, appended to the HTML part of every message the inbox sends, as it was stored: scripts, style sheets, forms, event handlers and images that are not https are removed when it is set. Null when the signature is plain text only. Older deployments omit it.","examples":["<table cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"font-family:Arial,sans-serif;font-size:14px\"><b>Acme concierge</b><br><a href=\"https://acme.example\">acme.example</a></td></tr></table>"],"type":["string","null"]},"externalId":{"description":"Your own identifier for the inbox; null when none was given.","examples":["customer-8841"],"type":["string","null"]},"metadata":{"default":{},"$ref":"#/components/schemas/Metadata"},"webhookUrl":{"description":"The inbox webhook's URL, or null when the inbox has none.","type":["string","null"]},"status":{"type":"string","enum":["active","suspended","deleted"],"description":"Only active inboxes receive and send; a deleted inbox is never returned."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","address","mailboxName","domain","displayName","externalId","webhookUrl","status","createdAt","updatedAt"],"description":"An address on the inbox domain that receives mail as soon as it exists.","examples":[{"id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","address":"concierge@doorman.example","mailboxName":"concierge","domain":"doorman.example","displayName":"Acme concierge","externalId":"customer-8841","metadata":{},"webhookUrl":null,"status":"active","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"InboxListItem":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string","description":"The full address: the mailbox name at the inbox domain.","examples":["concierge@doorman.example"]},"mailboxName":{"type":"string","description":"The part before the @.","examples":["concierge"]},"domain":{"type":"string","description":"The inbox domain of this deployment.","examples":["doorman.example"]},"domainId":{"description":"The custom domain identifier; null on the shared domain. Older deployments omit it.","anyOf":[{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","description":"A custom domain identifier.","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"null"}]},"displayName":{"description":"The sender name on outbound mail; null when none is set.","type":["string","null"]},"signature":{"description":"Plain text appended to every message the inbox sends, under a `-- ` line; null when none is set. Older deployments omit it.","examples":["Acme concierge\nacme.example"],"type":["string","null"]},"signatureHtml":{"description":"The signature as markup, appended to the HTML part of every message the inbox sends, as it was stored: scripts, style sheets, forms, event handlers and images that are not https are removed when it is set. Null when the signature is plain text only. Older deployments omit it.","examples":["<table cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"font-family:Arial,sans-serif;font-size:14px\"><b>Acme concierge</b><br><a href=\"https://acme.example\">acme.example</a></td></tr></table>"],"type":["string","null"]},"externalId":{"description":"Your own identifier for the inbox; null when none was given.","examples":["customer-8841"],"type":["string","null"]},"metadata":{"default":{},"$ref":"#/components/schemas/Metadata"},"webhookUrl":{"description":"The inbox webhook's URL, or null when the inbox has none.","type":["string","null"]},"status":{"type":"string","enum":["active","suspended","deleted"],"description":"Only active inboxes receive and send; a deleted inbox is never returned."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"unreadThreads":{"type":"integer","description":"Unread, untrashed threads."},"unseenThreads":{"description":"Untrashed threads no person has looked at in the console since mail last arrived in them. Older deployments omit it.","type":"integer"},"lastMessageAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"The latest thread activity, or null when the inbox has no mail."}},"required":["id","address","mailboxName","domain","displayName","externalId","webhookUrl","status","createdAt","updatedAt","unreadThreads","lastMessageAt"],"description":"An inbox as a list shows it, with what the console displays next to it.","examples":[{"id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","address":"concierge@doorman.example","mailboxName":"concierge","domain":"doorman.example","displayName":"Acme concierge","externalId":"customer-8841","webhookUrl":null,"status":"active","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","metadata":{},"unreadThreads":3,"lastMessageAt":"2026-11-05T10:05:00.000Z"}]},"InboxPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboxListItem"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","description":"How many inboxes match, across every page."}},"required":["data","limit","offset","total"],"description":"A page of the account's inboxes, oldest first."},"CreateInbox":{"type":"object","properties":{"mailboxName":{"type":"string","minLength":3,"maxLength":30,"pattern":"^[a-z0-9](?:[a-z0-9-]|\\.(?=[a-z0-9]))*[a-z0-9]$","description":"3 to 30 lowercase letters, digits, dots or hyphens: the part before the @. Reserved names are refused with 400 validation_error: mail infrastructure (abuse, admin, administrator, api, bounce, bounces, ...), the company's role accounts (support, billing, sales, legal, security, ...), names holding such a role as a dot- or hyphen-separated label (acme-support) however the role is written (support1, supp0rt, no-reply, supportteam), and the doorman and theovex brand with its lookalikes. The full lists are under x-doorman-limits.inboxes.","examples":["concierge"]},"displayName":{"type":"string","minLength":1,"maxLength":100,"description":"The sender name on outbound mail, at most 100 characters, with at least one letter or digit and no @, <, >, URL, control or invisible characters, no Latin mixed with Cyrillic or Greek, never the doorman or theovex brand, and never a bare role such as Support or Billing team: it says who, not only what.","examples":["Acme concierge"]},"externalId":{"type":"string","minLength":1,"maxLength":200,"description":"Your own identifier for the inbox (a user, a job, a tenant), at most 200 characters and unique among the account's active inboxes. Look an inbox up with `GET /v1/inboxes?externalId=`.","examples":["customer-8841"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"domainId":{"description":"One of this account's verified custom domains. Omit for the shared domain.","type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"webhookUrl":{"type":"string","maxLength":2048,"description":"Set the inbox webhook at once: an https URL without credentials. The signing secret is in the answer's `webhook`.","examples":["https://agent.example.com/hooks/doorman"]},"key":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"A label for the key, at most 100 characters.","examples":["Acme concierge"]}},"additionalProperties":false,"description":"Mint an inbox-scoped key at once. Its token is in the answer's `key`."}},"additionalProperties":false,"description":"A new inbox. Every field is optional: an empty body issues a random address. `webhookUrl` and `key` make the inbox ready to use in one call; their secrets come back once, in the answer.","examples":[{"mailboxName":"concierge","displayName":"Acme concierge"},{"externalId":"customer-8841","webhookUrl":"https://agent.example.com/hooks/doorman","key":{"name":"Acme concierge"}}]},"UpdateInbox":{"type":"object","properties":{"displayName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"The new sender name; null or empty clears it."},"signature":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"description":"The new signature: plain text of at most 1000 characters, line breaks kept. It is appended to every message the inbox sends from then on, a rule's forward excepted. On the shared domain a signature may not present the sender as the company (the doorman or theovex brand beside a word such as team, support or security): that answers 400 validation_error, for this field and for `signatureHtml`. Null or empty clears it."},"signatureHtml":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"description":"The signature as markup, at most 10000 characters: tables, inline styles, links and https images, as a signature builder exports it. It is cleaned before it is stored (scripts, style sheets, forms, frames, event handlers, and images that are not https are removed), and the answer carries what was kept. From then on every message the inbox sends carries it in its HTML part, and a message sent as text alone gains an HTML part for it; `signature` stays the text part's. When it is set on an inbox that has no `signature`, and none is given with it, the text is read from the markup. Null or empty clears it."},"externalId":{"anyOf":[{"type":"string","minLength":1,"maxLength":200,"description":"Your own identifier for the inbox (a user, a job, a tenant), at most 200 characters and unique among the account's active inboxes. Look an inbox up with `GET /v1/inboxes?externalId=`.","examples":["customer-8841"]},{"type":"null"}],"description":"Your new identifier for the inbox; null clears it."},"metadata":{"$ref":"#/components/schemas/Metadata"}},"additionalProperties":false,"description":"Changes to an inbox; fields left out stay as they are. The address never changes.","examples":[{"displayName":"Acme concierge"},{"externalId":"customer-8841"},{"signature":"Acme concierge\nacme.example"},{"signatureHtml":"<b>Acme concierge</b><br><a href=\"https://acme.example\">acme.example</a>"}]},"DomainRecord":{"type":"object","properties":{"record":{"type":"string","enum":["MX","SPF","DKIM","DMARC"]},"host":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}]},"ttl":{"type":"integer"},"required":{"type":"boolean"},"status":{"type":"string","enum":["not_started","pending","verified","failed"]}},"required":["record","host","type","value","priority","ttl","required","status"],"description":"A DNS record to publish, with the transport's verification state."},"Domain":{"type":"object","properties":{"id":{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","description":"A custom domain identifier.","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"status":{"type":"string","enum":["pending","verified","failed"]},"transport":{"type":"string","const":"resend"},"records":{"type":"array","items":{"$ref":"#/components/schemas/DomainRecord"}},"connect":{"type":"object","properties":{"available":{"type":"boolean"},"setupType":{"anyOf":[{"type":"string","enum":["automatic","manual"]},{"type":"null"}]},"propagationStatus":{"anyOf":[{"type":"string","enum":["pending","success","failed"]},{"type":"null"}]},"provider":{"type":["string","null"]}},"required":["available","setupType","propagationStatus","provider"]},"inboxes":{"type":"integer"},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the domain is removed and its name freed, unless it verifies first. Null for a domain that has verified, which is never removed this way."},"lastCheckedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","name","status","transport","records","connect","inboxes","verifiedAt","expiresAt","lastCheckedAt","createdAt","updatedAt"],"description":"An account's custom mail domain. Only verified domains can issue inboxes; one that never verifies is removed at `expiresAt`.","examples":[{"id":"dom_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"agents.example.com","status":"pending","transport":"resend","records":[],"connect":{"available":false,"setupType":null,"propagationStatus":null,"provider":null},"inboxes":0,"verifiedAt":null,"expiresAt":"2026-11-12T10:05:00.000Z","lastCheckedAt":null,"createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"DomainList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}},"required":["data"],"description":"The account's active custom domains."},"CreateDomain":{"type":"object","properties":{"name":{"type":"string","maxLength":260,"description":"Trimmed, lowercased and validated as a domain by the Worker.","examples":["agents.example.com"]}},"required":["name"],"additionalProperties":false,"description":"A domain to connect. A subdomain avoids replacing an existing apex mailbox service.","examples":[{"name":"agents.example.com"}]},"DomainConnectSession":{"type":"object","properties":{"applicationId":{"type":"string"},"token":{"type":"string"},"prefilledDomain":{"type":"string"},"userId":{"type":"string"},"dnsRecords":{"type":"object","properties":{"domain":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"host":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"},"priority":{"type":"integer"},"optional":{"type":"boolean"}},"required":["type","host","value","ttl"]}},"subDomain":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"host":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"integer"},"priority":{"type":"integer"},"optional":{"type":"boolean"}},"required":["type","host","value","ttl"]}}}}},"required":["applicationId","token","prefilledDomain","userId","dnsRecords"],"description":"A short-lived DNS setup token and records, returned to the console only."},"DomainWebhookEnvelope":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"An opaque provider event. Its signature is verified before any fields are processed."},"DomainWebhookResult":{"type":"object","properties":{"received":{"type":"boolean","const":true},"outcome":{"type":"string","enum":["queued","updated","deleted","ignored","recorded"]}},"required":["received","outcome"],"description":"What a signed provider webhook did."},"ApiKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"An API key identifier.","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox an inbox-scoped key reaches; null for an account key."},"name":{"type":"string","description":"A label, possibly empty.","examples":["Orchestrator"]},"tokenPrefix":{"type":"string","description":"The first ten characters of the token, starting with dm_.","examples":["dm_9f3abcd"]},"last4":{"type":"string","description":"The last four characters of the token.","examples":["m2x8"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the key last authenticated a request, to the minute; null until then."},"createdBy":{"description":"The signed-in person who minted the key, so a team can tell whose it is. Null for a key minted with another key, or before this was recorded. Older deployments omit it.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","description":"The identity provider's user id.","examples":["user_2abcDEF3ghiJKL"]},"name":{"type":"string","description":"The person's name when the key was minted, or their address when they had no name.","examples":["Dana Ortiz"]}},"required":["userId","name"]},{"type":"null"}]}},"required":["id","inboxId","name","tokenPrefix","last4","createdAt","lastUsedAt"],"description":"An API key as the API lists it. The token itself appears once, when the key is created.","examples":[{"id":"key_01jc5c0z9y8x7w6v5t4t3s2r1q","inboxId":null,"name":"Orchestrator","tokenPrefix":"dm_9f3abcd","last4":"m2x8","createdAt":"2026-11-05T10:05:00.000Z","lastUsedAt":null}]},"ApiKeyListItem":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"An API key identifier.","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox an inbox-scoped key reaches; null for an account key."},"name":{"type":"string","description":"A label, possibly empty.","examples":["Orchestrator"]},"tokenPrefix":{"type":"string","description":"The first ten characters of the token, starting with dm_.","examples":["dm_9f3abcd"]},"last4":{"type":"string","description":"The last four characters of the token.","examples":["m2x8"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the key last authenticated a request, to the minute; null until then."},"createdBy":{"description":"The signed-in person who minted the key, so a team can tell whose it is. Null for a key minted with another key, or before this was recorded. Older deployments omit it.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","description":"The identity provider's user id.","examples":["user_2abcDEF3ghiJKL"]},"name":{"type":"string","description":"The person's name when the key was minted, or their address when they had no name.","examples":["Dana Ortiz"]}},"required":["userId","name"]},{"type":"null"}]},"inboxAddress":{"description":"The address of an inbox-scoped key's inbox; null for an account key. Only with `scope=all`.","type":["string","null"]}},"required":["id","inboxId","name","tokenPrefix","last4","createdAt","lastUsedAt"],"description":"A key in the account-wide list; `inboxAddress` is present when inbox-scoped keys were included.","examples":[{"id":"key_01jc5c0z9y8x7w6v5t4t3s2r1q","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","name":"Support agent on the laptop","tokenPrefix":"dm_7c1xyza","last4":"k9q2","createdAt":"2026-11-05T10:05:00.000Z","lastUsedAt":"2026-11-05T10:05:00.000Z","inboxAddress":"concierge@doorman.example"}]},"ApiKeyList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyListItem"}}},"required":["data"],"description":"Active keys, oldest first."},"CreatedApiKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"An API key identifier.","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox an inbox-scoped key reaches; null for an account key."},"name":{"type":"string","description":"A label, possibly empty.","examples":["Orchestrator"]},"tokenPrefix":{"type":"string","description":"The first ten characters of the token, starting with dm_.","examples":["dm_9f3abcd"]},"last4":{"type":"string","description":"The last four characters of the token.","examples":["m2x8"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the key last authenticated a request, to the minute; null until then."},"createdBy":{"description":"The signed-in person who minted the key, so a team can tell whose it is. Null for a key minted with another key, or before this was recorded. Older deployments omit it.","anyOf":[{"type":"object","properties":{"userId":{"type":"string","description":"The identity provider's user id.","examples":["user_2abcDEF3ghiJKL"]},"name":{"type":"string","description":"The person's name when the key was minted, or their address when they had no name.","examples":["Dana Ortiz"]}},"required":["userId","name"]},{"type":"null"}]},"token":{"type":"string","pattern":"^dm_[0-9a-hjkmnp-tv-z]{52}$","description":"The bearer token. Store it now; it cannot be read again.","examples":["dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"]}},"required":["id","inboxId","name","tokenPrefix","last4","createdAt","lastUsedAt","token"],"description":"A freshly minted key with its token, which is shown once and stored only as a hash.","examples":[{"id":"key_01jc5c0z9y8x7w6v5t4t3s2r1q","inboxId":null,"name":"Orchestrator","tokenPrefix":"dm_9f3abcd","last4":"m2x8","createdAt":"2026-11-05T10:05:00.000Z","lastUsedAt":null,"token":"dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"}]},"CreateApiKey":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"A label, at most 100 characters.","examples":["Orchestrator"]}},"additionalProperties":false,"description":"A new key. The name is a label for people.","examples":[{"name":"Orchestrator"}]},"RiskAssessment":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":100,"description":"0 is no sign of danger, 100 is as certain as it gets."},"level":{"type":"string","enum":["low","medium","high","critical"],"description":"The score as a level: low from 0, medium from 30, high from 60, critical from 85. The floors are the same for every account."},"labels":{"type":"array","items":{"type":"string","enum":["prompt_injection","phishing","scam","impersonation","spam","malware"]},"description":"What kind of danger was found; empty when none was."},"reasons":{"maxItems":12,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"description":"Stable reason codes, strongest first. The catalogue, with a sentence for each, is `RISK_REASONS` in the contract package and `x-doorman-risk-reasons` in the OpenAPI document. New codes are additive.","examples":[["hidden_text","instruction_override"]]},"sender":{"type":"object","properties":{"standing":{"type":"string","enum":["trusted","known","new","blocked"],"description":"How well the inbox knew the sender when the message arrived: `trusted` or `blocked` by the owner's rule, `known` when earned, `new` otherwise."},"authenticated":{"type":"boolean","description":"Whether the message passed DMARC for the domain in its From address. Standing only counts for a message that did."}},"required":["standing","authenticated"]},"action":{"type":"string","enum":["delivered","warned","held","released"],"description":"What was done with the message: `delivered`; `warned` (delivered with this record as a warning, never answered automatically); `held` (kept from agents until the owner releases or discards it); `released` (held, then released by the owner)."},"analysis":{"type":"string","enum":["full","signals"],"description":"`full` when a model read the content as well; `signals` when only the deterministic signals ran."},"review":{"anyOf":[{"type":"string","enum":["safe","unsafe"]},{"type":"null"}],"description":"What the owner said about the message afterwards, or null. A message marked `safe` no longer blocks replies."}},"required":["score","level","labels","reasons","sender","action","analysis","review"],"description":"What Doorman concluded about an inbound message before any agent saw it (ADR-018). It is Doorman's own judgment, never text from the message: an agent can rely on it where it cannot rely on the mail.","examples":[{"score":6,"level":"low","labels":[],"reasons":[],"sender":{"standing":"known","authenticated":true},"action":"delivered","analysis":"full","review":null},{"score":92,"level":"critical","labels":["prompt_injection","impersonation"],"reasons":["hidden_text","instruction_override","exfiltration_request","dmarc_fail"],"sender":{"standing":"new","authenticated":false},"action":"held","analysis":"full","review":null}]},"Redaction":{"type":"object","properties":{"applied":{"type":"boolean","description":"True when the findings are replaced in this answer with placeholders such as `[REDACTED:SSN]`, as they are for every key, app, webhook and stream. False when the caller is a signed-in person who may read the original."},"entities":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ssn","medical_record_number","insurance_id","date_of_birth","phone","email","street_address","payment_card","bank_account","ip_address","national_id","drivers_license","passport","patient_name","custom"],"description":"A built-in kind, or `custom` for what a custom guardrail matched."},"count":{"type":"integer","minimum":1}},"required":["type","count"]},"description":"The kinds found, in the catalogue's order; empty when nothing was."}},"required":["applied","entities"],"description":"What the account's healthcare guardrails found in a message (ADR-027): the kinds of protected health information and personal data, and how many of each. Never the text itself. Detection is deterministic and is no guarantee that nothing else is there.","examples":[{"applied":true,"entities":[{"type":"ssn","count":1},{"type":"date_of_birth","count":1}]}]},"BaaAgreement":{"type":"object","properties":{"id":{"type":"string","pattern":"^baa_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of a signed business associate agreement.","examples":["baa_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"version":{"type":"string","description":"The version of the text that was signed.","examples":["2026-11-draft"]},"documentSha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The SHA-256 of the exact text the signer was shown, in hexadecimal."},"signer":{"type":"object","properties":{"userId":{"type":"string","description":"The identity provider's user id of the person who signed."},"name":{"type":"string"},"title":{"type":"string"},"entity":{"type":"string","description":"The legal entity the person signed for."}},"required":["userId","name","title","entity"]},"signedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"terminatedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When a person ended the agreement; null while it stands."}},"required":["id","version","documentSha256","signer","signedAt","terminatedAt"],"description":"The record of a signed business associate agreement: which text, who signed for whom, and when. Records are kept after an agreement ends.","examples":[{"id":"baa_01jc5f1a2b3c4d5e6f7g8h9j0k","version":"2026-11-draft","documentSha256":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","signer":{"userId":"user_2abc","name":"Dana Ortiz","title":"Privacy Officer","entity":"Acme Health, Inc."},"signedAt":"2026-11-05T10:05:00.000Z","terminatedAt":null}]},"Baa":{"type":"object","properties":{"status":{"type":"string","enum":["not_signed","active","reacceptance_required","terminated"],"description":"`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."},"eligible":{"type":"boolean","description":"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":{"anyOf":[{"type":"string","enum":["plan_required","not_signed","reacceptance_required"]},{"type":"null"}],"description":"What stands between the account and changing guardrails; null when nothing does."},"inForce":{"type":"boolean","description":"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."},"version":{"type":"string","description":"The version of the current text."},"documentSha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The SHA-256 of the current text."},"agreement":{"anyOf":[{"$ref":"#/components/schemas/BaaAgreement"},{"type":"null"}],"description":"The most recent record; null when nobody ever signed."}},"required":["status","eligible","requirement","inForce","version","documentSha256","agreement"],"description":"Where the account stands with the business associate agreement, and whether it may sign.","examples":[{"status":"not_signed","eligible":true,"requirement":"not_signed","inForce":false,"version":"2026-11-draft","documentSha256":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","agreement":null}]},"BaaDocument":{"type":"object","properties":{"version":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The SHA-256 of `text` as UTF-8. Signing names it, so what is signed is what was read."},"title":{"type":"string"},"text":{"type":"string","description":"The agreement, as plain text."},"placeholder":{"type":"boolean","description":"True while the text is a draft that counsel has not approved. A deployment that serves a placeholder is not offering a binding agreement."}},"required":["version","sha256","title","text","placeholder"],"description":"The current text of the business associate agreement, exactly as a signer is shown it."},"SignBaa":{"type":"object","properties":{"version":{"type":"string","maxLength":64},"documentSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string","minLength":1,"maxLength":200,"description":"The signer's full name."},"title":{"type":"string","minLength":1,"maxLength":200,"description":"The signer's title at the entity."},"entity":{"type":"string","minLength":1,"maxLength":200,"description":"The legal entity the signer signs for and has authority to bind."},"signature":{"type":"string","minLength":1,"maxLength":200,"description":"The signer's name, typed as their signature. It must equal `name`."},"accept":{"type":"boolean","const":true,"description":"The signer's statement that they read the text and may bind the entity."}},"required":["version","documentSha256","name","title","entity","signature","accept"],"additionalProperties":false,"description":"A signature on the current text. `version` and `documentSha256` name what was read; `signature` is the signer's name typed again.","examples":[{"version":"2026-11-draft","documentSha256":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","name":"Dana Ortiz","title":"Privacy Officer","entity":"Acme Health, Inc.","signature":"Dana Ortiz","accept":true}]},"TerminateBaa":{"type":"object","properties":{"confirm":{"type":"string","const":"terminate","description":"The word `terminate`, so that nothing ends an agreement by accident."}},"required":["confirm"],"additionalProperties":false,"description":"Ends the agreement. From then on guardrails no longer apply and agents read mail as it arrived.","examples":[{"confirm":"terminate"}]},"GuardrailPolicy":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the guardrails apply at all. Off: nothing is detected, redacted, held or refused."},"inbound":{"type":"string","enum":["off","redact","hold"],"description":"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":{"type":"string","enum":["off","hold","block"],"description":"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."},"entities":{"type":"object","propertyNames":{"type":"string","enum":["ssn","medical_record_number","insurance_id","date_of_birth","phone","email","street_address","payment_card","bank_account","ip_address","national_id","drivers_license","passport","patient_name"]},"additionalProperties":{"type":"boolean"},"required":["ssn","medical_record_number","insurance_id","date_of_birth","phone","email","street_address","payment_card","bank_account","ip_address","national_id","drivers_license","passport","patient_name"],"description":"Which kinds the detectors look for. Every kind is listed."}},"required":["enabled","inbound","outbound","entities"],"description":"The built-in healthcare guardrails: whether they apply, which kinds they look for, and what they do in each direction.","examples":[{"enabled":true,"inbound":"redact","outbound":"hold","entities":{"ssn":true,"medical_record_number":true,"insurance_id":true,"date_of_birth":true,"phone":true,"email":true,"street_address":true,"payment_card":true,"bank_account":true,"ip_address":true,"national_id":true,"drivers_license":true,"passport":true,"patient_name":true}}]},"UpdateGuardrailPolicy":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the guardrails apply at all. Off: nothing is detected, redacted, held or refused."},"inbound":{"type":"string","enum":["off","redact","hold"],"description":"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":{"type":"string","enum":["off","hold","block"],"description":"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."},"entities":{"type":"object","propertyNames":{"type":"string","enum":["ssn","medical_record_number","insurance_id","date_of_birth","phone","email","street_address","payment_card","bank_account","ip_address","national_id","drivers_license","passport","patient_name"]},"additionalProperties":{"type":"boolean"},"description":"The kinds to switch on or off."}},"additionalProperties":false,"description":"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.","examples":[{"outbound":"block"},{"entities":{"email":false}}]},"GuardrailSettings":{"type":"object","properties":{"scope":{"type":"string","enum":["account","inbox"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox the settings are for; null for the account's."},"inherited":{"type":"boolean","description":"Inbox scope: true while the inbox has no guardrails of its own and follows the account's. Always false for the account."},"policy":{"$ref":"#/components/schemas/GuardrailPolicy"},"inForce":{"type":"boolean","description":"Whether these guardrails apply to mail now: the account has an agreement that stands, and `policy.enabled` is true."},"baa":{"type":"string","enum":["not_signed","active","reacceptance_required","terminated"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the guardrails were last changed; null while they are the defaults."}},"required":["scope","inboxId","inherited","policy","inForce","baa","updatedAt"],"description":"The guardrails as they apply to the account or to one inbox, and whether they are in force."},"CreateGuardrailRule":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A label, at most 80 characters. It appears in the console and the audit log, so it should not itself be sensitive.","examples":["Study participant ids"]},"kind":{"type":"string","enum":["term","pattern"],"description":"`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."},"value":{"type":"string","minLength":1,"maxLength":120,"description":"The term or the pattern.","examples":["PT-#{6}"]},"inbound":{"type":"string","enum":["off","redact","hold"],"description":"What a match does to mail that arrives. Defaults to `redact`."},"outbound":{"type":"string","enum":["off","hold","block"],"description":"What a match does to a send by a key or an app. Defaults to `off`."},"enabled":{"type":"boolean","description":"Whether the guardrail applies. Defaults to true."},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"Apply to this inbox only. Omit for every inbox of the account.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}},"required":["name","kind","value"],"additionalProperties":false,"description":"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.","examples":[{"name":"Study participant ids","kind":"pattern","value":"PT-#{6}","inbound":"redact","outbound":"block"}]},"UpdateGuardrailRule":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"A label, at most 80 characters. It appears in the console and the audit log, so it should not itself be sensitive.","examples":["Study participant ids"]},"inbound":{"type":"string","enum":["off","redact","hold"],"description":"What a match does to mail that arrives. Defaults to `redact`."},"outbound":{"type":"string","enum":["off","hold","block"],"description":"What a match does to a send by a key or an app. Defaults to `off`."},"enabled":{"type":"boolean","description":"Whether the guardrail applies. Defaults to true."}},"additionalProperties":false,"description":"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.","examples":[{"outbound":"hold"}]},"GuardrailRule":{"type":"object","properties":{"id":{"type":"string","pattern":"^grd_[0-9a-hjkmnp-tv-z]{26}$","description":"A custom guardrail's identifier.","examples":["grd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"kind":{"type":"string","enum":["term","pattern"]},"value":{"description":"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.","type":["string","null"]},"inbound":{"type":"string","enum":["off","redact","hold"]},"outbound":{"type":"string","enum":["off","hold","block"]},"enabled":{"type":"boolean"},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox the guardrail applies to; null for the whole account."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","name","kind","value","inbound","outbound","enabled","inboxId","createdAt","updatedAt"],"description":"A custom guardrail: what it matches, what a match does, and where it applies.","examples":[{"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"}]},"GuardrailRuleList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GuardrailRule"}}},"required":["data"],"description":"The account's custom guardrails, oldest first."},"GuardrailPreviewRequest":{"type":"object","properties":{"text":{"type":"string","maxLength":20000},"subject":{"type":"string","maxLength":998},"direction":{"type":"string","enum":["inbound","outbound"],"description":"Whether the text is mail that arrives or a send by an agent. Defaults to `inbound`."},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"Evaluate as this inbox: its guardrails and its custom guardrails. Defaults to the account's.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"policy":{"description":"A draft, applied over the guardrails in force.","$ref":"#/components/schemas/UpdateGuardrailPolicy"},"rule":{"description":"A custom guardrail to try beside the ones that exist.","type":"object","properties":{"kind":{"type":"string","enum":["term","pattern"],"description":"`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."},"value":{"type":"string","minLength":1,"maxLength":120,"description":"The term or the pattern.","examples":["PT-#{6}"]},"inbound":{"type":"string","enum":["off","redact","hold"],"description":"What a match does to mail that arrives. Defaults to `redact`."},"outbound":{"type":"string","enum":["off","hold","block"],"description":"What a match does to a send by a key or an app. Defaults to `off`."}},"required":["kind","value"],"additionalProperties":false}},"required":["text"],"additionalProperties":false,"description":"Text to run the guardrails over. Nothing is stored or sent. Give `policy` or `rule` to try a change before making it.","examples":[{"text":"Patient: Sam Rivera, DOB 04/12/1984, SSN 536-22-8726."}]},"GuardrailPreview":{"type":"object","properties":{"text":{"type":"string","description":"The text with every finding replaced."},"subject":{"description":"The subject with every finding replaced; null when none was given.","type":["string","null"]},"redaction":{"$ref":"#/components/schemas/Redaction"},"action":{"type":"string","enum":["none","redact","hold","block"],"description":"The strictest thing a match asks for in this direction: `none` when nothing matched or everything that matched is off."}},"required":["text","subject","redaction","action"],"description":"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.","examples":[{"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"}]},"AttachmentScan":{"type":"object","properties":{"status":{"type":"string","enum":["clean","suspicious","malicious","unscanned"],"description":"`clean`: nothing was found. `suspicious`: the file carries something that can act, such as macros or script. `malicious`: it is a program dressed as another kind of file, or an archive built to exhaust whoever unpacks it; keys and app tokens cannot download it. `unscanned`: it is locked or damaged and could not be read."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The SHA-256 of the bytes, in hexadecimal."},"detectedType":{"description":"The kind of file the bytes are, for example `pdf`, `zip` or `executable`; null when they match no known format.","examples":["pdf"],"type":["string","null"]},"findings":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"description":"Reason codes from `RISK_REASONS` for what was found; empty for a clean file.","examples":[["macro_document"]]}},"required":["status","sha256","detectedType","findings"],"description":"What Doorman read from an attachment's bytes, whatever the file is called (ADR-021). It is a check of structure, not a guarantee: a file marked `clean` showed nothing known to be dangerous.","examples":[{"status":"clean","sha256":"9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08","detectedType":"pdf","findings":[]}]},"Attachment":{"type":"object","properties":{"filename":{"type":"string","description":"Unique within the message; the download route uses it.","examples":["invoice.pdf"]},"contentType":{"type":"string","examples":["application/pdf"]},"sizeBytes":{"type":"integer","examples":[45000]},"url":{"type":"string","description":"Where to download the bytes, with the same credential as the API.","examples":["https://api.doorman.example/v1/attachments/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/invoice.pdf"]},"parsedText":{"type":"string","description":"The extracted text, present when extraction produced any."},"extractionMethod":{"type":"string","enum":["text","csv","pdf","ocr","office","unsupported","skipped","skipped_too_large","unavailable","timeout","pdf_error","ocr_error","office_error","html_error"],"description":"How the text was obtained (text, csv, pdf, ocr, office), or why it was not."},"scan":{"description":"The check of the file's bytes. Absent for mail stored before the check existed and where the deployment does not assess mail. The text of a `malicious` file is never included.","$ref":"#/components/schemas/AttachmentScan"}},"required":["filename","contentType","sizeBytes","url","extractionMethod"],"description":"A file that arrived with a message, stored durably and read into text when possible.","examples":[{"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"}]},"AttachmentText":{"type":"object","properties":{"filename":{"type":"string"},"contentType":{"type":"string"},"extractionMethod":{"type":"string","enum":["text","csv","pdf","ocr","office","unsupported","skipped","skipped_too_large","unavailable","timeout","pdf_error","ocr_error","office_error","html_error"]},"text":{"description":"The text, or null when nothing was extracted; `extractionMethod` says why.","type":["string","null"]}},"required":["filename","contentType","extractionMethod","text"],"description":"The extracted text of an attachment and how it was obtained.","examples":[{"filename":"invoice.pdf","contentType":"application/pdf","extractionMethod":"pdf","text":"Invoice 2847. Total 1,480."}]},"NamedAddress":{"type":"object","properties":{"address":{"type":"string","examples":["sam@example.com"]},"name":{"examples":["Sam Rivera"],"type":["string","null"]}},"required":["address","name"],"description":"An address with the display name its header carried.","examples":[{"address":"sam@example.com","name":"Sam Rivera"}]},"AuthenticationResults":{"type":"object","properties":{"spf":{"type":["string","null"]},"dkim":{"type":["string","null"]},"dmarc":{"type":["string","null"]}},"required":["spf","dkim","dmarc"],"description":"The first Authentication-Results header, read only when the mail platform wrote it.","examples":[{"spf":"pass","dkim":"pass","dmarc":"pass"}]},"MessageService":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},{"type":"null"}],"description":"The service in the inbox's passport; null when none was recorded, because the inbox holds as many as it may."},"domain":{"type":"string","description":"The sender's registrable domain, which identifies the service.","examples":["example.net"]},"signal":{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"],"description":"What the message says about the account: a verification code or link, a welcome, a receipt, a password reset, a security notice, a trial, a cancellation, or other mail."}},"required":["id","domain","signal"],"description":"The outside service a message came from: set when its sender was authenticated (DMARC passed) and the message concerns an account there, or comes from a service the inbox already has.","examples":[{"id":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","domain":"example.net","signal":"verification"}]},"Message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"threadId":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"direction":{"type":"string","enum":["inbound","outbound"]},"rfcMessageId":{"description":"The Message-ID header of inbound mail; null for mail this API sent.","examples":["<a1b2c3@example.com>"],"type":["string","null"]},"inReplyTo":{"description":"The In-Reply-To header, when the message is a reply.","type":["string","null"]},"references":{"type":"array","items":{"type":"string"},"description":"The References chain, oldest first."},"from":{"$ref":"#/components/schemas/NamedAddress"},"to":{"type":"array","items":{"$ref":"#/components/schemas/NamedAddress"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/NamedAddress"}},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/NamedAddress"},"description":"Only outbound mail carries blind copies."},"replyTo":{"description":"The Reply-To address, when one was given.","type":["string","null"]},"deliveryRole":{"anyOf":[{"type":"string","enum":["to","cc","bcc"]},{"type":"null"}],"description":"How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail."},"subject":{"type":"string","examples":["Invoice 2847"]},"text":{"description":"The plain-text body, or text derived from the HTML when there was none.","type":["string","null"]},"hasHtml":{"type":"boolean","description":"Whether an HTML body is stored; read it at /v1/messages/{messageId}/html."},"rawUrl":{"description":"Where to download the original message/rfc822; null for outbound mail.","type":["string","null"]},"sizeBytes":{"type":"integer"},"category":{"type":"string","enum":["personal","automated","marketing","bounce","spam","malicious"],"description":"What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated."},"autoReplyable":{"type":"boolean","description":"False for anything an agent should not answer on its own."},"verdict":{"anyOf":[{"type":"string","enum":["clean","unverified","suspicious"]},{"type":"null"}],"description":"From the authentication results; null for outbound mail."},"spamScore":{"description":"How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.","type":["number","null"]},"authentication":{"anyOf":[{"$ref":"#/components/schemas/AuthenticationResults"},{"type":"null"}]},"service":{"description":"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.","anyOf":[{"$ref":"#/components/schemas/MessageService"},{"type":"null"}]},"risk":{"description":"Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.","anyOf":[{"$ref":"#/components/schemas/RiskAssessment"},{"type":"null"}]},"redaction":{"description":"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.","$ref":"#/components/schemas/Redaction"},"occurredAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When the message arrived or was sent."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}}},"required":["id","inboxId","threadId","direction","rfcMessageId","inReplyTo","references","from","to","cc","bcc","replyTo","deliveryRole","subject","text","hasHtml","rawUrl","sizeBytes","category","autoReplyable","verdict","spamScore","authentication","occurredAt","attachments"],"description":"One message, inbound or outbound, with its text, headers, classification and attachments.","examples":[{"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"}]}]},"SentMessage":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"threadId":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"direction":{"type":"string","enum":["inbound","outbound"]},"rfcMessageId":{"description":"The Message-ID header of inbound mail; null for mail this API sent.","examples":["<a1b2c3@example.com>"],"type":["string","null"]},"inReplyTo":{"description":"The In-Reply-To header, when the message is a reply.","type":["string","null"]},"references":{"type":"array","items":{"type":"string"},"description":"The References chain, oldest first."},"from":{"$ref":"#/components/schemas/NamedAddress"},"to":{"type":"array","items":{"$ref":"#/components/schemas/NamedAddress"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/NamedAddress"}},"bcc":{"type":"array","items":{"$ref":"#/components/schemas/NamedAddress"},"description":"Only outbound mail carries blind copies."},"replyTo":{"description":"The Reply-To address, when one was given.","type":["string","null"]},"deliveryRole":{"anyOf":[{"type":"string","enum":["to","cc","bcc"]},{"type":"null"}],"description":"How the inbox received the message: as a to, cc or bcc recipient. Null for outbound mail."},"subject":{"type":"string","examples":["Invoice 2847"]},"text":{"description":"The plain-text body, or text derived from the HTML when there was none.","type":["string","null"]},"hasHtml":{"type":"boolean","description":"Whether an HTML body is stored; read it at /v1/messages/{messageId}/html."},"rawUrl":{"description":"Where to download the original message/rfc822; null for outbound mail.","type":["string","null"]},"sizeBytes":{"type":"integer"},"category":{"type":"string","enum":["personal","automated","marketing","bounce","spam","malicious"],"description":"What kind of mail this is; ordinary outbound mail is personal and rule-generated mail is automated."},"autoReplyable":{"type":"boolean","description":"False for anything an agent should not answer on its own."},"verdict":{"anyOf":[{"type":"string","enum":["clean","unverified","suspicious"]},{"type":"null"}],"description":"From the authentication results; null for outbound mail."},"spamScore":{"description":"How likely the message is junk, from 0 to 1, when it was assessed; null otherwise.","type":["number","null"]},"authentication":{"anyOf":[{"$ref":"#/components/schemas/AuthenticationResults"},{"type":"null"}]},"service":{"description":"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.","anyOf":[{"$ref":"#/components/schemas/MessageService"},{"type":"null"}]},"risk":{"description":"Doorman's assessment of an inbound message (ADR-019). Null for outbound mail and for mail that was not assessed. Older deployments omit it.","anyOf":[{"$ref":"#/components/schemas/RiskAssessment"},{"type":"null"}]},"redaction":{"description":"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.","$ref":"#/components/schemas/Redaction"},"occurredAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When the message arrived or was sent."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"providerMessageId":{"description":"The provider's message identifier, used to thread replies to this message.","examples":["<b2c3d4@doorman.example>"],"type":["string","null"]}},"required":["id","inboxId","threadId","direction","rfcMessageId","inReplyTo","references","from","to","cc","bcc","replyTo","deliveryRole","subject","text","hasHtml","rawUrl","sizeBytes","category","autoReplyable","verdict","spamScore","authentication","occurredAt","attachments","providerMessageId"],"description":"The stored outbound message, with the identifier the sending provider assigned.","examples":[{"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>"}]},"MessageList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."}},"required":["data","limit","offset"],"description":"A page of an inbox's messages, newest first."},"Thread":{"type":"object","properties":{"id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"subject":{"type":"string","description":"The subject of the first message.","examples":["Invoice 2847"]},"participants":{"type":"array","items":{"type":"string"},"description":"Every address seen in the thread other than the inbox's own, sorted.","examples":[["sam@example.com"]]},"messageCount":{"type":"integer"},"isRead":{"type":"boolean","description":"False until the thread is marked read or a reply is sent."},"isSeen":{"description":"Whether a person has looked at the thread in the console since mail last arrived in it. It is the console's own mark and says nothing about `isRead`, which is what an agent polls: a person looking at a thread does not mark it read. Older deployments omit it.","type":"boolean"},"metadata":{"default":{},"$ref":"#/components/schemas/Metadata"},"labels":{"default":[],"$ref":"#/components/schemas/ThreadLabels"},"riskLevel":{"description":"The highest risk level among the thread's inbound messages that the owner has not marked safe; null when none was assessed. Older deployments omit it.","anyOf":[{"type":"string","enum":["low","medium","high","critical"]},{"type":"null"}]},"firstMessageAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastMessageAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastMessageId":{"anyOf":[{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","inboxId","subject","participants","messageCount","isRead","firstMessageAt","lastMessageAt","lastMessageId","createdAt"],"description":"A conversation: the messages that reply to each other, or share a subject and a participant.","examples":[{"id":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","subject":"Invoice 2847","participants":["sam@example.com"],"messageCount":1,"isRead":false,"metadata":{},"labels":[],"riskLevel":"low","firstMessageAt":"2026-11-05T10:05:00.000Z","lastMessageAt":"2026-11-05T10:05:00.000Z","lastMessageId":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","createdAt":"2026-11-05T10:05:00.000Z"}]},"ThreadPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Thread"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","description":"How many threads match, across every page."}},"required":["data","limit","offset","total"],"description":"A page of an inbox's threads, newest activity first. Trashed threads are left out."},"ThreadMessages":{"type":"object","properties":{"thread":{"$ref":"#/components/schemas/Thread"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"Oldest first, at most 500."}},"required":["thread","data"],"description":"A thread with its messages in order."},"UpdateThread":{"type":"object","properties":{"isRead":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/Metadata"},"labels":{"$ref":"#/components/schemas/ThreadLabels"}},"additionalProperties":false,"description":"Changes to the thread's read state, metadata or labels. Omitted fields stay as they are; metadata and labels replace the entire value.","examples":[{"isRead":true}]},"SetThreadSeen":{"type":"object","properties":{"seen":{"type":"boolean"}},"required":["seen"],"additionalProperties":false,"description":"Whether a person has looked at the thread: true once they opened it, false to show it as new again.","examples":[{"seen":true}]},"SendAttachment":{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":255,"examples":["application/pdf"]},"content":{"type":"string","maxLength":36000000,"description":"Base64. The 25 MiB message limit is enforced after decoding.","format":"byte"},"disposition":{"type":"string","enum":["attachment","inline"],"description":"Inline attachments are referenced from the HTML body by `contentId`."},"contentId":{"type":"string","minLength":1,"maxLength":998,"description":"The Content-ID an inline image is referenced by, as `cid:<contentId>`."}},"required":["filename","contentType","content"],"additionalProperties":false,"description":"A file to attach, base64-encoded.","examples":[{"filename":"report.pdf","contentType":"application/pdf","content":"JVBERi0xLjQK..."}]},"SendMessage":{"type":"object","properties":{"to":{"anyOf":[{"type":"string","maxLength":20000,"description":"One address, or several separated by commas."},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":254}}],"description":"Recipients. Optional on a reply, where it defaults to the last inbound message's Reply-To or sender."},"cc":{"anyOf":[{"type":"string","maxLength":20000,"description":"One address, or several separated by commas."},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":254}}]},"bcc":{"anyOf":[{"type":"string","maxLength":20000,"description":"One address, or several separated by commas."},{"maxItems":50,"type":"array","items":{"type":"string","maxLength":254}}]},"replyTo":{"type":"string","maxLength":254,"description":"The address replies should go to instead of the inbox."},"subject":{"type":"string","maxLength":998,"description":"Required on a new message. A reply defaults to `Re: <thread subject>`."},"text":{"type":"string","maxLength":2000000,"description":"The plain-text body."},"html":{"type":"string","maxLength":2000000,"description":"The HTML body. Text is derived from it when `text` is absent."},"body":{"type":"string","maxLength":2000000,"description":"A convenience: treated as HTML when it looks like HTML, as text otherwise. Ignored when `text` or `html` is given."},"threadId":{"type":"string","maxLength":64,"description":"A thread id (thr_...). Makes the message a reply in this thread: threading headers, the default subject and recipient, and the quoted previous message come from it. An unknown, foreign or trashed thread answers 404 `thread_not_found`.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"includeQuote":{"type":"boolean","description":"On a reply, quote the previous message under the text. Defaults to true."},"attachments":{"maxItems":32,"type":"array","items":{"$ref":"#/components/schemas/SendAttachment"}}},"additionalProperties":false,"description":"A message to send from an inbox: a new one with `to` and `subject`, or a reply with `threadId`.","examples":[{"to":"sam@example.com","subject":"Thursday","text":"Thursday works."},{"threadId":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","text":"Thanks, confirming for Thursday.","includeQuote":true}]},"SendMessageForm":{"type":"object","properties":{"to":{"type":"string"},"cc":{"type":"string"},"bcc":{"type":"string"},"replyTo":{"type":"string"},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"body":{"type":"string"},"threadId":{"type":"string"},"includeQuote":{"type":"string"},"attachments":{"type":"array","items":{"type":"string","format":"binary"}}},"description":"The same send as multipart/form-data: the text fields by name, repeated `attachments` file fields, `includeQuote` as text (`false`, `0` or `no` turn the quote off)."},"SecurityPolicy":{"type":"object","properties":{"level":{"type":"string","enum":["relaxed","balanced","strict","custom"],"description":"The preset the policy equals (`relaxed`, `balanced`, `strict`), or `custom` when it matches none."},"warnAt":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}],"description":"Mail scoring at least this is delivered with a warning and is never answered automatically. Null means never.","examples":[60]},"holdAt":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}],"description":"Mail scoring at least this is held for the owner and kept from agents. Null means never. Not below `warnAt`.","examples":[85]},"labels":{"type":"object","propertyNames":{"type":"string","enum":["prompt_injection","phishing","scam","impersonation","spam","malware"]},"additionalProperties":{"type":"string","enum":["warn","hold"]},"description":"The least that happens to mail carrying a label, whatever its score: `warn` or `hold`. Replaced as a whole; {} clears it.","examples":[{"prompt_injection":"hold"}]},"holdUnauthenticatedNewSenders":{"type":"boolean","description":"Hold mail from a sender the inbox has never dealt with when it does not authenticate as its domain."},"modelAnalysis":{"type":"boolean","description":"Let a model read the content of mail the signals leave undecided. The text goes to the deployment's AI gateway, is not kept and is never used for training. Off: assessments rest on the deterministic signals alone."},"replyGuard":{"type":"boolean","description":"Refuse an agent's reply into a thread that holds a flagged message: one this policy warns about or holds, by its score or a label, or one the owner marked unsafe (403 `risk_blocked`). A message stops counting once the owner marks it safe, or while its sender is trusted and it passed authentication. A console session is never refused."},"recipients":{"type":"string","enum":["any","known"],"description":"`known`: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403 `risk_blocked` otherwise). Having written to the inbox, or being named in a message, does not make a recipient known: answering a stranger takes a person, or trusting them first. `any`: no such limit. A console session is never refused."},"sendApproval":{"type":"string","enum":["off","apps","all"],"description":"Whose sends wait for the owner when a recipient is not one the inbox knows or trusts, nor one of the account's own inboxes. `apps`: a connected app's. `all`: an app's and an API key's. `off`: nobody's. A send that waits answers 202 with a held send, which the owner sends or discards; it expires unsent after 7 days. A console session is never held, and neither is mail an inbox rule generates. It applies whatever the deployment's `enforcement`, except `off`, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts on `apps`."},"allowKeyManagement":{"type":"boolean","description":"Let account keys loosen protection (trust a sender, raise a threshold, release held mail, approve a held send). Off by default, and only a console session can switch it on. Account scope only."},"deepScan":{"type":"boolean","description":"Run every attachment, in both directions, through the deployment's malware engine. The bytes go to an isolated scanner that keeps nothing. Off: attachments are still checked by their structure. No effect where the deployment has no engine (`deepScanAvailable`)."},"linkSandbox":{"type":"boolean","description":"Open the most suspect links of a message in an isolated browser before the message is delivered, to see where they lead. The site a link points at sees a visit. Links that verify an address, sign in, accept an invitation or unsubscribe are never opened, and neither are an authenticated sender's links to its own site. No effect where the deployment has no sandbox."},"unscannable":{"type":"string","enum":["deliver","warn","hold"],"description":"The least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish): `deliver`, `warn` or `hold`."}},"required":["level","warnAt","holdAt","labels","holdUnauthenticatedNewSenders","modelAnalysis","replyGuard","recipients","sendApproval","allowKeyManagement","deepScan","linkSandbox","unscannable"],"description":"What happens to assessed mail and what an agent may send afterwards (ADR-018). Two thresholds on the risk score decide between delivering, warning and holding; a message from a blocked sender is refused whatever its score.","examples":[{"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}]},"UpdateSecurityPolicy":{"type":"object","properties":{"level":{"type":"string","enum":["relaxed","balanced","strict"],"description":"Apply this preset's thresholds and guards. It also clears the per-label rules, unless `labels` is given with it."},"warnAt":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}],"description":"Mail scoring at least this is delivered with a warning and is never answered automatically. Null means never.","examples":[60]},"holdAt":{"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}],"description":"Mail scoring at least this is held for the owner and kept from agents. Null means never. Not below `warnAt`.","examples":[85]},"labels":{"type":"object","propertyNames":{"type":"string","enum":["prompt_injection","phishing","scam","impersonation","spam","malware"]},"additionalProperties":{"type":"string","enum":["warn","hold"]},"description":"The least that happens to mail carrying a label, whatever its score: `warn` or `hold`. Replaced as a whole; {} clears it.","examples":[{"prompt_injection":"hold"}]},"holdUnauthenticatedNewSenders":{"type":"boolean","description":"Hold mail from a sender the inbox has never dealt with when it does not authenticate as its domain."},"modelAnalysis":{"type":"boolean","description":"Let a model read the content of mail the signals leave undecided. The text goes to the deployment's AI gateway, is not kept and is never used for training. Off: assessments rest on the deterministic signals alone."},"replyGuard":{"type":"boolean","description":"Refuse an agent's reply into a thread that holds a flagged message: one this policy warns about or holds, by its score or a label, or one the owner marked unsafe (403 `risk_blocked`). A message stops counting once the owner marks it safe, or while its sender is trusted and it passed authentication. A console session is never refused."},"recipients":{"type":"string","enum":["any","known"],"description":"`known`: an agent may write only to senders the inbox trusts or knows, and to the account's own inboxes (403 `risk_blocked` otherwise). Having written to the inbox, or being named in a message, does not make a recipient known: answering a stranger takes a person, or trusting them first. `any`: no such limit. A console session is never refused."},"sendApproval":{"type":"string","enum":["off","apps","all"],"description":"Whose sends wait for the owner when a recipient is not one the inbox knows or trusts, nor one of the account's own inboxes. `apps`: a connected app's. `all`: an app's and an API key's. `off`: nobody's. A send that waits answers 202 with a held send, which the owner sends or discards; it expires unsent after 7 days. A console session is never held, and neither is mail an inbox rule generates. It applies whatever the deployment's `enforcement`, except `off`, where no record of senders is kept and nothing is held. No preset changes it. An account that never chose starts on `apps`."},"allowKeyManagement":{"type":"boolean","description":"Let account keys loosen protection (trust a sender, raise a threshold, release held mail, approve a held send). Off by default, and only a console session can switch it on. Account scope only."},"deepScan":{"type":"boolean","description":"Run every attachment, in both directions, through the deployment's malware engine. The bytes go to an isolated scanner that keeps nothing. Off: attachments are still checked by their structure. No effect where the deployment has no engine (`deepScanAvailable`)."},"linkSandbox":{"type":"boolean","description":"Open the most suspect links of a message in an isolated browser before the message is delivered, to see where they lead. The site a link points at sees a visit. Links that verify an address, sign in, accept an invitation or unsubscribe are never opened, and neither are an authenticated sender's links to its own site. No effect where the deployment has no sandbox."},"unscannable":{"type":"string","enum":["deliver","warn","hold"],"description":"The least that happens to mail carrying something that could not be checked (a locked archive, or a scan that did not finish): `deliver`, `warn` or `hold`."}},"additionalProperties":false,"description":"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.","examples":[{"level":"strict"},{"holdAt":70,"labels":{"prompt_injection":"hold"}}]},"SecuritySettings":{"type":"object","properties":{"scope":{"type":"string","enum":["account","inbox"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox the settings are for; null for the account's."},"inherited":{"type":"boolean","description":"Inbox scope: true while the inbox has no policy of its own and follows the account's. Always false for the account."},"policy":{"$ref":"#/components/schemas/SecurityPolicy"},"enforcement":{"type":"string","enum":["off","observe","enforce"],"description":"What the deployment does: `enforce` applies the policy; `observe` assesses mail and records the result without warning, holding or blocking anything; `off` does not assess."},"modelAnalysisAvailable":{"type":"boolean","description":"Whether this deployment has a model to read content with. When false, `modelAnalysis` has no effect."},"deepScanAvailable":{"description":"Whether this deployment runs the malware engine and the link sandbox. When false, `deepScan` and `linkSandbox` have no effect. Older deployments omit it.","type":"boolean"},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the policy was last changed; null while it is the default."}},"required":["scope","inboxId","inherited","policy","enforcement","modelAnalysisAvailable","updatedAt"],"description":"A policy as it applies to the account or to one inbox, with what this deployment does with it.","examples":[{"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}]},"Sender":{"type":"object","properties":{"address":{"type":"string","examples":["sam@example.com"]},"name":{"description":"The display name last seen on their mail.","examples":["Sam Rivera"],"type":["string","null"]},"standing":{"type":"string","enum":["trusted","known","new","blocked"],"description":"The standing in force: the owner's rule when one matches, otherwise what the sender earned."},"source":{"type":"string","enum":["rule","learned"],"description":"`rule` when a sender rule for the address or its domain decides the standing; `learned` otherwise."},"kind":{"type":"string","enum":["person","automated","bulk"],"description":"What their mail has mostly been: from a person, automated, or bulk."},"received":{"type":"integer","minimum":0,"description":"Messages received from the address."},"authenticated":{"type":"integer","minimum":0,"description":"How many of them passed DMARC."},"sent":{"type":"integer","minimum":0,"description":"Messages the inbox sent to the address. One is enough to make the sender known."},"flagged":{"type":"integer","minimum":0,"description":"Messages from the address that were warned about, held or marked unsafe. Any flag keeps a sender from being known."},"lastRiskLevel":{"anyOf":[{"type":"string","enum":["low","medium","high","critical"]},{"type":"null"}]},"firstSeenAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastSeenAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["address","name","standing","source","kind","received","authenticated","sent","flagged","lastRiskLevel","firstSeenAt","lastSeenAt"],"description":"A sender as one inbox knows them: what arrived from the address, what the inbox sent it, and the standing that follows. The name is text the sender chose, not a verified identity.","examples":[{"address":"sam@example.com","name":"Sam Rivera","standing":"known","source":"learned","kind":"person","received":14,"authenticated":14,"sent":9,"flagged":0,"lastRiskLevel":"low","firstSeenAt":"2026-11-05T10:05:00.000Z","lastSeenAt":"2026-11-05T10:05:00.000Z"}]},"SenderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sender"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","minimum":0,"description":"How many senders match, across every page."}},"required":["data","limit","offset","total"],"description":"A page of an inbox's senders, most recent first."},"CreateSenderRule":{"type":"object","properties":{"match":{"type":"string","maxLength":254,"description":"An address (`sam@example.com`) or a domain (`example.com`, which covers every address at it, not its subdomains).","examples":["sam@example.com"]},"standing":{"type":"string","enum":["trusted","blocked"],"description":"`trusted`: their authenticated mail is treated as low risk and replies to them are never guarded. `blocked`: their mail is refused. Trusting needs a console session unless the account allows its account keys to."},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"Apply to this inbox only. Omit for every inbox of the account.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"note":{"type":"string","maxLength":200,"description":"A label for whoever reads the list later, at most 200 characters."}},"required":["match","standing"],"additionalProperties":false,"description":"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.","examples":[{"match":"sam@example.com","standing":"trusted"},{"match":"example.net","standing":"blocked","note":"Invoice scam, March"}]},"SenderRule":{"type":"object","properties":{"id":{"type":"string","pattern":"^snr_[0-9a-hjkmnp-tv-z]{26}$","description":"A sender rule identifier.","examples":["snr_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"kind":{"type":"string","enum":["address","domain"]},"match":{"type":"string","examples":["sam@example.com"]},"standing":{"type":"string","enum":["trusted","blocked"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox the rule applies to; null for the whole account."},"note":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","kind","match","standing","inboxId","note","createdAt","updatedAt"],"description":"A sender rule: who it matches, what it says, and where it applies.","examples":[{"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"}]},"SenderRulePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SenderRule"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","minimum":0,"description":"How many rules match, across every page."}},"required":["data","limit","offset","total"],"description":"A page of sender rules, newest first."},"HeldMessage":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"from":{"type":"string","description":"The sender's address.","examples":["billing@example.net"]},"subject":{"description":"The subject, for a caller that may review held mail (a console session, or an account key the account allows); null for every other caller.","type":["string","null"]},"attachments":{"type":"integer","minimum":0,"description":"How many attachments the message carries."},"sizeBytes":{"type":"integer"},"receivedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"risk":{"$ref":"#/components/schemas/RiskAssessment"}},"required":["id","inboxId","from","subject","attachments","sizeBytes","receivedAt","risk"],"description":"A message kept from agents until the owner decides. Keys and app tokens get this stub and nothing else of the message: who, when and why, never the subject, the body or an attachment.","examples":[{"id":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","from":"billing@example.net","subject":null,"attachments":1,"sizeBytes":48120,"receivedAt":"2026-11-05T10:05:00.000Z","risk":{"score":92,"level":"critical","labels":["prompt_injection","impersonation"],"reasons":["hidden_text","instruction_override","dmarc_fail"],"sender":{"standing":"new","authenticated":false},"action":"held","analysis":"full","review":null}}]},"HeldMessagePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HeldMessage"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","minimum":0,"description":"How many messages are held, across every page."}},"required":["data","limit","offset","total"],"description":"A page of an inbox's held messages, newest first."},"RiskFeedback":{"type":"object","properties":{"verdict":{"type":"string","enum":["safe","unsafe"]}},"required":["verdict"],"additionalProperties":false,"description":"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.","examples":[{"verdict":"safe"}]},"SecurityAuditEntry":{"type":"object","properties":{"id":{"type":"string","pattern":"^sau_[0-9a-hjkmnp-tv-z]{26}$","description":"A security audit entry identifier.","examples":["sau_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"action":{"type":"string","enum":["policy_updated","inbox_policy_updated","inbox_policy_reset","sender_trusted","sender_blocked","sender_rule_removed","message_released","message_discarded","message_marked_safe","message_marked_unsafe","send_blocked","send_approved","send_discarded","sign_in_allowed","sign_in_blocked","baa_signed","baa_terminated","guardrails_updated","inbox_guardrails_updated","inbox_guardrails_reset","guardrail_created","guardrail_updated","guardrail_deleted","original_viewed"]},"actor":{"type":"object","properties":{"kind":{"type":"string","enum":["session","key"],"description":"A person in the console, or an API key."},"id":{"description":"The identity provider's user id, or the key's id.","type":["string","null"]}},"required":["kind","id"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox the change was about; null for the account."},"target":{"description":"The address, domain, message id or held send id the change was about.","type":["string","null"]},"detail":{"description":"What changed, in a few words: the fields of a policy, or the standing of a rule.","type":["string","null"]},"at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","action","actor","inboxId","target","detail","at"],"description":"One change to what protects the account: who made it, to what, and when. Entries carry no mail content.","examples":[{"id":"sau_01jc5f1a2b3c4d5e6f7g8h9j0k","action":"sender_trusted","actor":{"kind":"session","id":"user_2abc"},"inboxId":null,"target":"sam@example.com","detail":"trusted","at":"2026-11-05T10:05:00.000Z"}]},"SecurityAuditPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SecurityAuditEntry"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","minimum":0}},"required":["data","limit","offset","total"],"description":"A page of the security audit log, newest first."},"SecurityPreviewRequest":{"type":"object","properties":{"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"Evaluate as this inbox: its senders and, without `policy`, its policy. Defaults to the message's inbox, or to the account's policy with no sender history.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"messageId":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A stored inbound message of the account that was assessed. A held one needs a caller that may review held mail.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"sample":{"type":"string","enum":["ordinary","phishing","prompt_injection","impersonation"],"description":"A built-in message: ordinary mail, a phishing attempt, an injection hidden from the reader, or an impersonation."},"from":{"type":"string","maxLength":254,"description":"The sender of your own message. Defaults to a sender the inbox has never seen.","examples":["stranger@example.net"]},"authenticated":{"type":"boolean","description":"Whether your own message passed authentication for its sender's domain. Defaults to true, so the content decides; false shows what a forged sender looks like."},"subject":{"type":"string","maxLength":998},"text":{"type":"string","maxLength":20000,"description":"The plain-text body of your own message."},"html":{"type":"string","maxLength":20000,"description":"The HTML body of your own message."},"policy":{"description":"A draft to evaluate under, applied over the policy in force. Omit to use the policy in force.","$ref":"#/components/schemas/UpdateSecurityPolicy"}},"additionalProperties":false,"description":"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.","examples":[{"sample":"prompt_injection","policy":{"level":"strict"}}]},"SecurityPreview":{"type":"object","properties":{"risk":{"$ref":"#/components/schemas/RiskAssessment"},"refused":{"type":"boolean","description":"True when the sender is blocked: the message would be refused and never stored, whatever `risk.action` says the policy would otherwise have done."},"agentView":{"type":"string","description":"The text an agent receives for the message: the fenced mail, the mail behind a warning, the stub of a held message, or nothing but a note for mail that is refused."},"enforcement":{"type":"string","enum":["off","observe","enforce"],"description":"The deployment's mode, so a caller can say whether this is what happens today."}},"required":["risk","refused","agentView","enforcement"],"description":"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.","examples":[{"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"}]},"HeldSend":{"type":"object","properties":{"id":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","description":"A held send's identifier.","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"kind":{"type":"string","enum":["held","draft"],"description":"Why it waits. `held`: the security policy kept a send for the owner. `draft`: an app or a key wrote it as a draft, and only the owner sends it."},"status":{"type":"string","enum":["held","sent","discarded","expired"],"description":"`held` while it waits. `sent` once the owner approved it and the mail went out. `discarded` when the owner said no. `expired` when nobody decided in time. Only a held send can be decided."},"threadId":{"anyOf":[{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},{"type":"null"}],"description":"The thread a reply was written into; null for a new message."},"to":{"type":"array","items":{"type":"string"},"description":"Who it would go to: the recipients the request named, or on a reply that named none, the one the thread gives.","examples":[["sam@example.com"]]},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"unknownRecipients":{"type":"array","items":{"type":"string"},"description":"The recipients that made it wait: addresses the inbox neither knows nor trusts. Empty for a draft.","examples":[["sam@example.com"]]},"subject":{"description":"The subject as written, for a caller that may decide; null for every other caller, and on a reply that left it to the thread.","type":["string","null"]},"text":{"description":"The text as written (derived from the HTML when only HTML was given, and cut at 200,000 characters), for a caller that may decide; null for every other caller.","type":["string","null"]},"attachments":{"type":"integer","minimum":0,"description":"How many attachments it carries."},"requestedBy":{"type":"object","properties":{"kind":{"type":"string","enum":["app","key"],"description":"A connected app, or an API key."},"name":{"description":"The app's or the key's name, when it has one.","examples":["Support agent"],"type":["string","null"]}},"required":["kind","name"]},"messageId":{"anyOf":[{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},{"type":"null"}],"description":"The message it became once it was sent; null otherwise."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"expiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When it expires unsent: 7 days after it was made, or 30 for a draft."},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When it was sent, discarded or expired; null while it waits."}},"required":["id","inboxId","kind","status","threadId","to","cc","bcc","unknownRecipients","subject","text","attachments","requestedBy","messageId","createdAt","expiresAt","decidedAt"],"description":"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).","examples":[{"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}]},"HeldSendPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HeldSend"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","minimum":0,"description":"How many match, across every page."}},"required":["data","limit","offset","total"],"description":"A page of an inbox's held sends, newest first."},"SendOutcome":{"anyOf":[{"$ref":"#/components/schemas/SentMessage"},{"$ref":"#/components/schemas/HeldSend"}],"description":"What a send answers: the stored message when it went out (201), or a held send when it waits for the owner (202). A held send has `status`; a sent message has `direction`. A message that waits has not been sent and must not be sent again: the owner decides.","examples":[{"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>"},{"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}]},"RuleWhen":{"type":"object","properties":{"category":{"type":"string","enum":["personal","automated","marketing","bounce","spam","malicious"]},"sender":{"type":"string","maxLength":254,"format":"email","description":"Exact normalized From address. A match is not proof of sender identity."},"subjectContains":{"type":"string","minLength":1,"maxLength":200,"description":"Case-insensitive subject substring, not a regular expression."},"minRiskLevel":{"type":"string","enum":["low","medium","high","critical"],"description":"The message's risk level is this or higher. A message that was not assessed never matches."},"senderStanding":{"type":"string","enum":["trusted","known","new","blocked"],"description":"The sender's standing when the message arrived. A message that was not assessed never matches."}},"additionalProperties":false,"description":"All supplied conditions must match. At least one condition is required."},"RuleAction":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"label"},"label":{"$ref":"#/components/schemas/ThreadLabel"}},"required":["type","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"auto_reply"},"text":{"type":"string","minLength":1,"maxLength":10000,"description":"Plain text, with optional {{sender}}, {{subject}} and {{inbox}} substitutions. No code, HTML or remote templates."}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"forward"},"to":{"type":"string","maxLength":254,"format":"email"}},"required":["type","to"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"trash"}},"required":["type"],"additionalProperties":false}],"description":"One action. Generated mail is plain text, loop-guarded and subject to normal sending limits."},"CreateRule":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"enabled":{"type":"boolean"},"when":{"$ref":"#/components/schemas/RuleWhen"},"then":{"minItems":1,"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/RuleAction"},"description":"Executed in array order. At most one auto_reply or forward action per rule."}},"required":["name","when","then"],"additionalProperties":false,"description":"An inbound rule, enabled by default. Only account credentials may manage rules.","examples":[{"name":"Invoice triage","when":{"category":"personal","subjectContains":"invoice"},"then":[{"type":"label","label":"billing"}]}]},"UpdateRule":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"enabled":{"type":"boolean"},"when":{"$ref":"#/components/schemas/RuleWhen"},"then":{"minItems":1,"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/RuleAction"},"description":"Executed in array order. At most one auto_reply or forward action per rule."}},"additionalProperties":false,"description":"Replace the supplied fields; omitted fields stay as they are. Changes cancel pending executions of the old revision.","examples":[{"enabled":false}]},"Rule":{"type":"object","properties":{"id":{"type":"string","pattern":"^rul_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox rule identifier.","examples":["rul_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"installationId":{"description":"Present for an installation-owned rule. Revocation stops execution.","type":"string","pattern":"^ins_[0-9a-hjkmnp-tv-z]{26}$","examples":["ins_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"name":{"type":"string","minLength":1,"maxLength":100},"enabled":{"type":"boolean"},"when":{"$ref":"#/components/schemas/RuleWhen"},"then":{"minItems":1,"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/RuleAction"},"description":"Executed in array order. At most one auto_reply or forward action per rule."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","inboxId","name","enabled","when","then","createdAt","updatedAt"],"description":"An inbound rule. Rules run oldest first, with id as the tie-breaker; actions run in array order.","examples":[{"id":"rul_01jc5f1a2b3c4d5e6f7g8h9j0k","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","name":"Invoice triage","enabled":true,"when":{"category":"personal","subjectContains":"invoice"},"then":[{"type":"label","label":"billing"}],"createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"RuleList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}}},"required":["data"],"description":"The inbox's rules, oldest first. At most 25."},"RuleRun":{"type":"object","properties":{"id":{"type":"string","pattern":"^rrn_[0-9a-hjkmnp-tv-z]{26}$","description":"A rule execution identifier.","examples":["rrn_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"ruleId":{"type":"string","pattern":"^rul_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox rule identifier.","examples":["rul_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"eventId":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"status":{"type":"string","enum":["pending","running","completed","failed","skipped","uncertain"]},"completedActions":{"type":"integer","minimum":0},"skippedActions":{"type":"integer","minimum":0},"lastError":{"description":"A content-free reason code, never provider text or message contents.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","ruleId","eventId","status","completedActions","skippedActions","lastError","createdAt","updatedAt"],"description":"A durable execution of a rule snapshot. An uncertain execution is not automatically retried: a mail provider may already have accepted the message."},"RuleRunPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RuleRun"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","minimum":0}},"required":["data","limit","offset","total"],"description":"Execution history, newest first."},"ServicePlan":{"type":"object","properties":{"name":{"description":"The plan's name.","examples":["Team"],"type":["string","null"]},"amount":{"description":"The price in the currency's main unit: 12.5 for 12.50.","examples":[12],"type":["number","null"]},"currency":{"description":"An ISO 4217 code.","examples":["USD"],"type":["string","null"]},"interval":{"anyOf":[{"type":"string","enum":["week","month","year"]},{"type":"null"}],"description":"How often the price is charged."},"renewsOn":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The next renewal or charge, as a calendar day (YYYY-MM-DD)."}},"required":["name","amount","currency","interval","renewsOn"],"description":"What the service costs, as it was recorded. Every field may be null.","examples":[{"name":"Team","amount":12,"currency":"USD","interval":"month","renewsOn":"2026-12-01"}]},"ServicePlanInput":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"amount":{"description":"The price in the currency's main unit: 12.5 for 12.50.","anyOf":[{"type":"number","minimum":0,"maximum":1000000000},{"type":"null"}]},"currency":{"examples":["USD"],"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"interval":{"anyOf":[{"type":"string","enum":["week","month","year"]},{"type":"null"}]},"renewsOn":{"description":"The next renewal or charge, as a calendar day (YYYY-MM-DD).","anyOf":[{"type":"string","format":"date"},{"type":"null"}]}},"additionalProperties":false,"description":"What the service costs. It replaces the recorded plan as a whole: a field left out is recorded as null.","examples":[{"name":"Team","amount":12,"currency":"USD","interval":"month","renewsOn":"2026-12-01"}]},"ServiceActorRef":{"type":"object","properties":{"kind":{"type":"string","enum":["installation","key","person"]},"id":{"description":"The installation (`ins_`) or key (`key_`) identifier; null for a person.","type":["string","null"]}},"required":["kind","id"],"description":"Who signed up: an agent's installation or key, or the person in the console.","examples":[{"kind":"installation","id":"ins_01jc5f1a2b3c4d5e6f7g8h9j0k"}]},"ServiceAttention":{"type":"object","properties":{"reason":{"type":"string","enum":["unexplained_code","password_reset","security"],"description":"`unexplained_code` when a verification code or sign-in link arrived with no recent agent declaration or read to account for it; `password_reset` or `security` when the service sent a reset or a security notice."},"at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When the message that raised the warning arrived."}},"required":["reason","at"],"description":"An active warning on a service: why it needs the owner's look and when that mail arrived. Cleared only by the owner.","examples":[{"reason":"unexplained_code","at":"2026-11-05T10:05:00.000Z"}]},"SignInClientSummary":{"type":"object","properties":{"id":{"type":"string","description":"An identifier this API issued (`sic_`), or the URL of the identity document the relying party published."},"name":{"type":"string","description":"What the relying party calls itself. A label, not proof of who it is."},"host":{"type":"string","description":"The host the relying party is identified by.","examples":["app.example.net"]},"verified":{"type":"boolean","description":"Whether the relying party proved that the host is its own. One that has not can sign in only addresses of the account that registered it."}},"required":["id","name","host","verified"],"description":"A relying party as a person is shown it: the host it is identified by, whether it proved the host is its own, and the name it gives itself.","examples":[{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","verified":true}]},"ServiceSignIn":{"type":"object","properties":{"id":{"type":"string","pattern":"^sig_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of one address's connection to one relying party.","examples":["sig_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"client":{"$ref":"#/components/schemas/SignInClientSummary"},"state":{"type":"string","enum":["pending","allowed","blocked"],"description":"`pending` while an agent asked to sign in and the owner has not answered, `allowed` once the owner (or the account's own setting) said yes, `blocked` once the owner stopped it."},"shareOwner":{"type":"boolean","description":"Whether the relying party is told who owns the agent, when it asks."},"requestedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When an agent last asked to sign in while it was not allowed to; null otherwise."},"decidedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When it was last allowed or blocked."},"firstSignInAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"lastSignInAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"signInCount":{"type":"integer","description":"Sign-ins completed."}},"required":["id","client","state","shareOwner","requestedAt","decidedAt","firstSignInAt","lastSignInAt","signInCount"],"description":"How an address signs in to a service with Doorman: its connection to one relying party under the service's domain, what the owner decided about it, and how it has been used.","examples":[{"id":"sig_01jc5f1a2b3c4d5e6f7g8h9j0k","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","verified":true},"state":"allowed","shareOwner":false,"requestedAt":null,"decidedAt":"2026-11-05T10:05:00.000Z","firstSignInAt":"2026-11-05T10:05:00.000Z","lastSignInAt":"2026-11-05T10:05:00.000Z","signInCount":4}]},"Service":{"type":"object","properties":{"id":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"inboxAddress":{"type":"string","description":"The address the service knows the agent by.","examples":["concierge@doorman.example"]},"domain":{"type":"string","description":"The service's registrable domain. This is what identifies it: when it was found in mail, the sender was authenticated for it.","examples":["example.net"]},"name":{"type":"string","description":"A label: the sender's display name when the service was found in mail, or the name an agent or a person gave it. It is a claim, not proof; the domain is what was checked.","examples":["Example Tools"]},"status":{"type":"string","enum":["pending","active","cancelled","archived"],"description":"`pending` until the sign-up is confirmed (a welcome or a receipt arrives, the agent reads its code, or a person says so), `active`, `cancelled`, or `archived` when a person set it aside as not a sign-up."},"source":{"type":"string","enum":["detected","declared","manual"],"description":"`detected` from mail, `declared` by an agent, or `manual` when a person added it."},"acquiredBy":{"anyOf":[{"$ref":"#/components/schemas/ServiceActorRef"},{"type":"null"}],"description":"Who signed up: the agent that declared the service or first read one of its codes, or the person who added it. Null when it was only found in mail."},"note":{"description":"A note a person or an agent left.","type":["string","null"]},"plan":{"anyOf":[{"$ref":"#/components/schemas/ServicePlan"},{"type":"null"}],"description":"What the service costs, when someone recorded it."},"attention":{"anyOf":[{"$ref":"#/components/schemas/ServiceAttention"},{"type":"null"}],"description":"An unacknowledged warning on the service (an unexplained code or link, a password reset, or a security notice); null otherwise, and always null on archived services."},"invitedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest invitation from the service arrived: mail that asks the address to join, with a link that accepts. The invitation is open while the service is `pending`. Null when the service never sent one."},"signIns":{"type":"array","items":{"$ref":"#/components/schemas/ServiceSignIn"},"description":"How the address signs in to the service with Doorman: one entry for each relying party under the service's domain. Empty when it gets in some other way, or where the deployment has not switched sign-in on."},"lastSignal":{"anyOf":[{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"]},{"type":"null"}],"description":"What the newest mail from the service was about."},"lastSignalAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"lastReceiptAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest receipt or invoice arrived: a sign that the service is paid."},"lastSecurityAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest password reset or security notice arrived."},"messageCount":{"type":"integer","description":"Messages tied to the service."},"firstSeenAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the first mail from the service arrived; null until one does."},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest mail from the service arrived."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","inboxId","inboxAddress","domain","name","status","source","acquiredBy","note","plan","attention","invitedAt","signIns","lastSignal","lastSignalAt","lastReceiptAt","lastSecurityAt","messageCount","firstSeenAt","lastSeenAt","createdAt","updatedAt"],"description":"An outside service an inbox's address is signed up for: found in mail the service sent, declared by an agent before it signed up, or added by a person.","examples":[{"id":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","inboxAddress":"concierge@doorman.example","domain":"example.net","name":"Example Tools","status":"active","source":"declared","acquiredBy":{"kind":"installation","id":"ins_01jc5f1a2b3c4d5e6f7g8h9j0k"},"note":null,"plan":{"name":"Team","amount":12,"currency":"USD","interval":"month","renewsOn":"2026-12-01"},"attention":null,"invitedAt":null,"lastSignal":"receipt","lastSignalAt":"2026-11-05T10:05:00.000Z","lastReceiptAt":"2026-11-05T10:05:00.000Z","lastSecurityAt":null,"messageCount":3,"firstSeenAt":"2026-11-05T10:05:00.000Z","lastSeenAt":"2026-11-05T10:05:00.000Z","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","signIns":[]}]},"ServicePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Service"}},"limit":{"type":"integer","description":"The page size that was applied."},"offset":{"type":"integer","description":"The offset that was applied."},"total":{"type":"integer","description":"How many services match, across every page."}},"required":["data","limit","offset","total"],"description":"A page of services, newest activity first."},"ServiceEvidence":{"type":"object","properties":{"messageId":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"threadId":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"subject":{"type":"string","examples":["Your verification code"]},"signal":{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"]},"occurredAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["messageId","threadId","subject","signal","occurredAt"],"description":"A message that tied the service to the address: what it was about and where to read it, never its text.","examples":[{"messageId":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","threadId":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","subject":"Your verification code","signal":"verification","occurredAt":"2026-11-05T10:05:00.000Z"}]},"ServiceDetail":{"type":"object","properties":{"id":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"inboxAddress":{"type":"string","description":"The address the service knows the agent by.","examples":["concierge@doorman.example"]},"domain":{"type":"string","description":"The service's registrable domain. This is what identifies it: when it was found in mail, the sender was authenticated for it.","examples":["example.net"]},"name":{"type":"string","description":"A label: the sender's display name when the service was found in mail, or the name an agent or a person gave it. It is a claim, not proof; the domain is what was checked.","examples":["Example Tools"]},"status":{"type":"string","enum":["pending","active","cancelled","archived"],"description":"`pending` until the sign-up is confirmed (a welcome or a receipt arrives, the agent reads its code, or a person says so), `active`, `cancelled`, or `archived` when a person set it aside as not a sign-up."},"source":{"type":"string","enum":["detected","declared","manual"],"description":"`detected` from mail, `declared` by an agent, or `manual` when a person added it."},"acquiredBy":{"anyOf":[{"$ref":"#/components/schemas/ServiceActorRef"},{"type":"null"}],"description":"Who signed up: the agent that declared the service or first read one of its codes, or the person who added it. Null when it was only found in mail."},"note":{"description":"A note a person or an agent left.","type":["string","null"]},"plan":{"anyOf":[{"$ref":"#/components/schemas/ServicePlan"},{"type":"null"}],"description":"What the service costs, when someone recorded it."},"attention":{"anyOf":[{"$ref":"#/components/schemas/ServiceAttention"},{"type":"null"}],"description":"An unacknowledged warning on the service (an unexplained code or link, a password reset, or a security notice); null otherwise, and always null on archived services."},"invitedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest invitation from the service arrived: mail that asks the address to join, with a link that accepts. The invitation is open while the service is `pending`. Null when the service never sent one."},"signIns":{"type":"array","items":{"$ref":"#/components/schemas/ServiceSignIn"},"description":"How the address signs in to the service with Doorman: one entry for each relying party under the service's domain. Empty when it gets in some other way, or where the deployment has not switched sign-in on."},"lastSignal":{"anyOf":[{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"]},{"type":"null"}],"description":"What the newest mail from the service was about."},"lastSignalAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"lastReceiptAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest receipt or invoice arrived: a sign that the service is paid."},"lastSecurityAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest password reset or security notice arrived."},"messageCount":{"type":"integer","description":"Messages tied to the service."},"firstSeenAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the first mail from the service arrived; null until one does."},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the newest mail from the service arrived."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/ServiceEvidence"},"description":"Newest first, at most 20. Messages in trashed threads are left out."}},"required":["id","inboxId","inboxAddress","domain","name","status","source","acquiredBy","note","plan","attention","invitedAt","signIns","lastSignal","lastSignalAt","lastReceiptAt","lastSecurityAt","messageCount","firstSeenAt","lastSeenAt","createdAt","updatedAt","evidence"],"description":"A service with the newest messages that tied it to the address.","examples":[{"id":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","inboxAddress":"concierge@doorman.example","domain":"example.net","name":"Example Tools","status":"active","source":"declared","acquiredBy":{"kind":"installation","id":"ins_01jc5f1a2b3c4d5e6f7g8h9j0k"},"note":null,"plan":{"name":"Team","amount":12,"currency":"USD","interval":"month","renewsOn":"2026-12-01"},"attention":null,"invitedAt":null,"lastSignal":"receipt","lastSignalAt":"2026-11-05T10:05:00.000Z","lastReceiptAt":"2026-11-05T10:05:00.000Z","lastSecurityAt":null,"messageCount":3,"firstSeenAt":"2026-11-05T10:05:00.000Z","lastSeenAt":"2026-11-05T10:05:00.000Z","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","signIns":[],"evidence":[{"messageId":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","threadId":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","subject":"Your receipt","signal":"receipt","occurredAt":"2026-11-05T10:05:00.000Z"}]}]},"CreateService":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253,"description":"The service's domain, or a host under it: `app.example.net` is recorded as `example.net`.","examples":["example.net"]},"name":{"description":"A label, at most 100 characters. Defaults to the domain.","type":"string","minLength":1,"maxLength":100},"note":{"description":"At most 500 characters: why the agent signed up, or the plan it chose and its price.","anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["domain"],"additionalProperties":false,"description":"A service the inbox's address is about to be signed up for, or already is. An agent declares one before it signs up, so the codes that arrive for it are attributed to the agent; a person adds one by hand. A domain the inbox already has answers with that service. What it costs is recorded afterwards, with an update.","examples":[{"domain":"example.net","name":"Example Tools","note":"Sign-up for the weekly report"}]},"UpdateService":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"status":{"description":"`archived` sets the service aside as not a sign-up: mail from it no longer makes it pending again. It clears any active warning and stops every one of the service's `signIns`.","type":"string","enum":["pending","active","cancelled","archived"]},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"plan":{"anyOf":[{"$ref":"#/components/schemas/ServicePlanInput"},{"type":"null"}]},"attention":{"description":"Null clears an active `attention` warning once the owner has checked the account. Needs a console session unless the account allows its account keys to (403 `session_required`).","type":"null"},"signIn":{"description":"A decision about one of the service's `signIns`. Stopping one, and no longer sharing the owner, are open to any key that reaches the service. Allowing one, and sharing the owner, need a console session unless the account allows its account keys to (403 `session_required`).","type":"object","properties":{"id":{"type":"string","pattern":"^sig_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of one address's connection to one relying party.","examples":["sig_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"state":{"description":"`allowed` lets the address sign in to the relying party; `blocked` stops it and ends the links, codes and tokens it was given.","type":"string","enum":["allowed","blocked"]},"shareOwner":{"description":"Whether the relying party is told who owns the agent, when it asks.","type":"boolean"}},"required":["id"],"additionalProperties":false}},"additionalProperties":false,"description":"Changes to a service. Fields left out stay as they are; null clears the note, the plan, or an active warning.","examples":[{"status":"cancelled"},{"attention":null},{"signIn":{"id":"sig_01jc5f1a2b3c4d5e6f7g8h9j0k","state":"blocked"}}]},"PassportSettings":{"type":"object","properties":{"alertEmails":{"type":"boolean","description":"Send an email to `alertEmail` when an authenticated service sends a password reset, a security notice, or a verification code or sign-in link that no recent agent action explains."},"alertEmail":{"type":"string","maxLength":254,"format":"email","examples":["sam@example.com"],"description":"Where alert emails are sent: the account owner's address."},"emailAvailable":{"type":"boolean","description":"Whether this deployment has email sending configured for owner alerts."},"signInAvailable":{"type":"boolean","description":"Whether this deployment has Sign in with Doorman switched on. Where it has not, the two settings below change nothing."},"agentSignIn":{"type":"boolean","description":"Whether an agent may sign in to a service the owner has not allowed yet. Off by default: the owner allows each service once for each address, and the agent signs in alone from then on."},"shareOwner":{"type":"boolean","description":"Whether a service an agent signed in to alone is told who owns the agent, when it asks. Off by default. A service the owner allowed is told what the owner chose then."},"briefingEmails":{"type":"boolean","description":"Whether a daily briefing is emailed to `alertEmail`: how many emails arrived and how many things wait for a decision, in counts only, with links to the console. No briefing is sent on a day with nothing to report."},"briefingHour":{"type":"integer","minimum":0,"maximum":23,"description":"The hour of the day, in `timeZone`, at which the briefing is sent."},"timeZone":{"type":"string","minLength":1,"maxLength":64,"description":"The IANA time zone `briefingHour` is read in.","examples":["America/Guayaquil"]},"updatedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When these settings were last changed; null while they are the default."}},"required":["alertEmails","alertEmail","emailAvailable","signInAvailable","agentSignIn","shareOwner","briefingEmails","briefingHour","timeZone","updatedAt"],"description":"How the account's passport alerts and briefs its owner, and what its agents may do alone when they sign in with Doorman.","examples":[{"alertEmails":false,"alertEmail":"dana@example.com","emailAvailable":true,"signInAvailable":true,"agentSignIn":false,"shareOwner":false,"briefingEmails":false,"briefingHour":8,"timeZone":"UTC","updatedAt":null}]},"UpdatePassportSettings":{"type":"object","properties":{"alertEmails":{"description":"Whether to email the account owner when a service receives an unexplained code or link, a password reset, or a security notice.","type":"boolean"},"agentSignIn":{"description":"Whether an agent may sign in to a service the owner has not allowed yet.","type":"boolean"},"shareOwner":{"description":"Whether a service an agent signed in to alone is told who owns the agent, when it asks.","type":"boolean"},"briefingEmails":{"description":"Whether to email the account owner a daily briefing in counts only. The first one covers what arrives from the moment it is switched on.","type":"boolean"},"briefingHour":{"description":"The hour of the day, in `timeZone`, at which the briefing is sent.","type":"integer","minimum":0,"maximum":23},"timeZone":{"description":"The IANA time zone `briefingHour` is read in.","examples":["America/Guayaquil"],"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false,"description":"Changes to the passport's settings. Fields left out stay as they are. Switching `alertEmails` or `briefingEmails` off, and switching `agentSignIn` or `shareOwner` on, need a console session unless the account allows its account keys to.","examples":[{"alertEmails":true},{"agentSignIn":true},{"briefingEmails":true,"briefingHour":8,"timeZone":"America/Guayaquil"}]},"VerificationLink":{"type":"object","properties":{"url":{"type":"string","examples":["https://app.example.net/verify?token=..."]},"host":{"type":"string","examples":["app.example.net"]},"matchesSender":{"type":"boolean","description":"True when the link's registrable domain is the authenticated sender's. Open any other link only when your user agrees."}},"required":["url","host","matchesSender"],"description":"A sign-in or confirmation link read from a message.","examples":[{"url":"https://app.example.net/verify?token=abc","host":"app.example.net","matchesSender":true}]},"Verification":{"type":"object","properties":{"messageId":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"threadId":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"serviceId":{"anyOf":[{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},{"type":"null"}],"description":"The service in the inbox's passport, when the sender was authenticated."},"domain":{"description":"The sender's registrable domain when the sender was authenticated (DMARC passed); null otherwise.","examples":["example.net"],"type":["string","null"]},"from":{"type":"string","description":"The sender's address.","examples":["no-reply@example.net"]},"subject":{"type":"string","examples":["Your verification code"]},"signal":{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"],"description":"What the message is for: `verification` for a sign-up or sign-in, `password_reset` for a reset someone asked for. A reset or a code nobody on your side asked for is a warning sign."},"code":{"description":"The one-time code, or null when the message carried a link only.","examples":["849204"],"type":["string","null"]},"link":{"anyOf":[{"$ref":"#/components/schemas/VerificationLink"},{"type":"null"}]},"verified":{"type":"boolean","description":"Whether the sender was authenticated (DMARC passed). Treat an unverified code or link with suspicion."},"unexplained":{"type":"boolean","description":"True once an authenticated `verification` code or link has waited past the grace window without a recent agent declaration or read to account for it."},"invitation":{"type":"boolean","description":"True when the link accepts an invitation to join the service, which someone there sent to the address. Follow it only when your user asked you to join that service: an invitation that arrives on its own is not a reason to join. An invitation is never `unexplained`."},"receivedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"expiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When this read stops serving it. The service's own expiry may be sooner."},"readAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When a credential first read it here; null until then."}},"required":["messageId","threadId","inboxId","serviceId","domain","from","subject","signal","code","link","verified","unexplained","invitation","receivedAt","expiresAt","readAt"],"description":"A verification code or a sign-in link that arrived within the last hour, or an invitation's link from the last 14 days, read from the message by the inbox.","examples":[{"messageId":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","threadId":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","serviceId":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","domain":"example.net","from":"no-reply@example.net","subject":"Your verification code","signal":"verification","code":"849204","link":null,"verified":true,"unexplained":false,"invitation":false,"receivedAt":"2026-11-05T10:05:00.000Z","expiresAt":"2026-11-05T11:05:00.000Z","readAt":null}]},"VerificationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Verification"},"description":"At most 20."}},"required":["data"],"description":"The verification codes and sign-in links of the last hour and the invitations of the last 14 days, newest first."},"InboxWebhook":{"type":"object","properties":{"url":{"description":"Null when the inbox has no webhook.","type":["string","null"]},"secret":{"description":"The signing secret, masked after creation (`whsec_...` and the last four characters).","type":["string","null"]}},"required":["url","secret"],"description":"The inbox's single webhook: one URL that receives every event for it.","examples":[{"url":"https://agent.example.com/hooks/doorman","secret":"whsec_...ODk="}]},"InboxWebhookSecret":{"type":"object","properties":{"url":{"type":"string"},"secret":{"type":"string","description":"A Standard Webhooks secret (whsec_ and base64), shown once. Verify signatures with its decoded bytes.","examples":["whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="]}},"required":["url","secret"],"description":"The inbox webhook with its new signing secret, shown once.","examples":[{"url":"https://agent.example.com/hooks/doorman","secret":"whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="}]},"SetInboxWebhook":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"description":"An https URL without credentials (http is accepted in local development).","examples":["https://agent.example.com/hooks/doorman"]}},"required":["url"],"additionalProperties":false,"description":"Where the inbox's events go. Setting it again replaces the URL and mints a new secret.","examples":[{"url":"https://agent.example.com/hooks/doorman"}]},"LastDelivery":{"type":"object","properties":{"status":{"type":"string","enum":["pending","delivered","failed"]},"statusCode":{"anyOf":[{"type":"integer"},{"type":"null"}]},"at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["status","statusCode","at"],"description":"The newest delivery to an endpoint.","examples":[{"status":"delivered","statusCode":200,"at":"2026-11-05T10:05:00.000Z"}]},"Endpoint":{"type":"object","properties":{"id":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook endpoint identifier.","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]},"installationId":{"description":"Present for an installation-owned endpoint. Revocation stops delivery.","type":"string","pattern":"^ins_[0-9a-hjkmnp-tv-z]{26}$","examples":["ins_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string","description":"A label, possibly empty.","examples":["Orchestrator"]},"url":{"type":"string","examples":["https://agent.example.com/hooks/doorman"]},"eventTypes":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]},"description":"The event types it receives; empty means all."},"inboxIds":{"type":"array","items":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"description":"The inboxes it receives for; empty means all."},"enabled":{"type":"boolean","description":"A disabled endpoint receives nothing until it is enabled again."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastDelivery":{"anyOf":[{"$ref":"#/components/schemas/LastDelivery"},{"type":"null"}]}},"required":["id","name","url","eventTypes","inboxIds","enabled","createdAt","updatedAt","lastDelivery"],"description":"An account webhook endpoint: receives the account's events across inboxes, with its own signing secret.","examples":[{"id":"whk_01jc5d1a2b3c4d5e6f7g8h9j0k","name":"Orchestrator","url":"https://agent.example.com/hooks/doorman","eventTypes":[],"inboxIds":[],"enabled":true,"createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","lastDelivery":{"status":"delivered","statusCode":200,"at":"2026-11-05T10:05:00.000Z"}}]},"EndpointList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}}},"required":["data"],"description":"The account's endpoints, oldest first."},"CreatedEndpoint":{"type":"object","properties":{"id":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook endpoint identifier.","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]},"installationId":{"description":"Present for an installation-owned endpoint. Revocation stops delivery.","type":"string","pattern":"^ins_[0-9a-hjkmnp-tv-z]{26}$","examples":["ins_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string","description":"A label, possibly empty.","examples":["Orchestrator"]},"url":{"type":"string","examples":["https://agent.example.com/hooks/doorman"]},"eventTypes":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]},"description":"The event types it receives; empty means all."},"inboxIds":{"type":"array","items":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"description":"The inboxes it receives for; empty means all."},"enabled":{"type":"boolean","description":"A disabled endpoint receives nothing until it is enabled again."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastDelivery":{"anyOf":[{"$ref":"#/components/schemas/LastDelivery"},{"type":"null"}]},"secret":{"type":"string","description":"A Standard Webhooks secret (whsec_ and base64), shown once. Verify signatures with its decoded bytes.","examples":["whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="]}},"required":["id","name","url","eventTypes","inboxIds","enabled","createdAt","updatedAt","lastDelivery","secret"],"description":"A new endpoint with its signing secret, shown once.","examples":[{"id":"whk_01jc5d1a2b3c4d5e6f7g8h9j0k","name":"Orchestrator","url":"https://agent.example.com/hooks/doorman","eventTypes":["message.received"],"inboxIds":[],"enabled":true,"createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","lastDelivery":null,"secret":"whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="}]},"EndpointSecret":{"type":"object","properties":{"id":{"type":"string","pattern":"^whk_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook endpoint identifier.","examples":["whk_01jc5d1a2b3c4d5e6f7g8h9j0k"]},"secret":{"type":"string","description":"A Standard Webhooks secret (whsec_ and base64), shown once. Verify signatures with its decoded bytes.","examples":["whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="]}},"required":["id","secret"],"description":"An endpoint's new signing secret, shown once.","examples":[{"id":"whk_01jc5d1a2b3c4d5e6f7g8h9j0k","secret":"whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="}]},"EndpointTestResult":{"type":"object","properties":{"ok":{"type":"boolean","description":"Whether the URL answered 2xx in time."},"statusCode":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The HTTP status, or null when the request did not complete."},"error":{"description":"`HTTP <status>`, `timeout` or `network_error`; null on success.","type":["string","null"]},"durationMs":{"type":"integer"}},"required":["ok","statusCode","error","durationMs"],"description":"What happened to one signed test delivery.","examples":[{"ok":true,"statusCode":200,"error":null,"durationMs":212}]},"CreateEndpoint":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"A label, at most 100 characters.","examples":["Orchestrator"]},"url":{"type":"string","maxLength":2048,"description":"An https URL without credentials (http is accepted in local development).","examples":["https://agent.example.com/hooks/doorman"]},"eventTypes":{"maxItems":11,"type":"array","items":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]},"description":"Event types to receive; empty or absent means all."},"inboxIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64},"description":"Ids of active inboxes of the account to receive for; empty or absent means all. Duplicates are dropped.","examples":[["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]]},"enabled":{"type":"boolean","description":"Whether deliveries start right away. Defaults to true."}},"required":["url"],"additionalProperties":false,"description":"A new account endpoint.","examples":[{"name":"Orchestrator","url":"https://agent.example.com/hooks/doorman","eventTypes":["message.received"],"inboxIds":[],"enabled":true}]},"UpdateEndpoint":{"type":"object","properties":{"name":{"type":"string","maxLength":100,"description":"A label, at most 100 characters.","examples":["Orchestrator"]},"url":{"type":"string","maxLength":2048,"description":"An https URL without credentials (http is accepted in local development).","examples":["https://agent.example.com/hooks/doorman"]},"eventTypes":{"maxItems":11,"type":"array","items":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]},"description":"Event types to receive; empty or absent means all."},"inboxIds":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64},"description":"Ids of active inboxes of the account to receive for; empty or absent means all. Duplicates are dropped.","examples":[["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]]},"enabled":{"type":"boolean","description":"Whether deliveries start right away. Defaults to true."}},"additionalProperties":false,"description":"Changes to an endpoint; fields left out stay as they are.","examples":[{"enabled":false}]},"Delivery":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook delivery identifier.","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"eventId":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["inbox","endpoint"],"description":"`inbox` for the inbox webhook, `endpoint` for an account endpoint."},"id":{"type":"string","description":"The inbox id or the endpoint id."}},"required":["kind","id"]},"url":{"type":"string","description":"The URL at the time of delivery."},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer"},"lastStatusCode":{"anyOf":[{"type":"integer"},{"type":"null"}]},"lastError":{"description":"`HTTP <status>`, `timeout`, `network_error` or `target_unavailable`.","type":["string","null"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","eventId","target","url","status","attempts","lastStatusCode","lastError","createdAt","updatedAt"],"description":"One event sent to one target, with every attempt's outcome.","examples":[{"id":"whd_01jc5f1a2b3c4d5e6f7g8h9j0k","eventId":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","target":{"kind":"endpoint","id":"whk_01jc5d1a2b3c4d5e6f7g8h9j0k"},"url":"https://agent.example.com/hooks/doorman","status":"delivered","attempts":1,"lastStatusCode":200,"lastError":null,"createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"DeliveryPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"nextCursor":{"anyOf":[{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook delivery identifier.","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"null"}],"description":"Pass as `cursor` for the next page; null on the last page."}},"required":["data","nextCursor"],"description":"A target's deliveries, newest first."},"MessageReceivedEvent":{"type":"object","properties":{"event":{"type":"string","const":"message.received"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"Stable across retries; deduplicate on it.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"thread_id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"rfc_message_id":{"type":["string","null"]},"from":{"type":"string","description":"The sender's address.","examples":["sam@example.com"]},"to":{"type":"string","description":"The inbox's address.","examples":["concierge@doorman.example"]},"header_to":{"description":"The first To header address, which may differ from the inbox when it was copied.","type":["string","null"]},"delivery_role":{"anyOf":[{"type":"string","enum":["to","cc","bcc"]},{"type":"null"}]},"cc":{"type":"array","items":{"type":"string"}},"address_names":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Display names by address, for the addresses that carried one."},"subject":{"type":"string"},"body_text":{"type":"string","description":"The plain-text body; empty when there was none."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"raw_url":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"category":{"type":"string","enum":["personal","automated","marketing","bounce","spam","malicious"]},"auto_replyable":{"type":"boolean"},"verdict":{"anyOf":[{"type":"string","enum":["clean","unverified","suspicious"]},{"type":"null"}]},"spam_score":{"type":["number","null"]},"service":{"description":"The outside service the message came from, when its sender was authenticated (DMARC passed) and it concerns an account there; null for any other mail. Events stored before the passport existed omit it.","anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},{"type":"null"}]},"domain":{"type":"string"},"signal":{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"]}},"required":["id","domain","signal"]},{"type":"null"}]},"verification":{"description":"The verification code or sign-in link the inbox read from the message, the same text `body_text` carries; null when it carries none. Events stored before the passport existed omit it.","anyOf":[{"type":"object","properties":{"code":{"description":"A one-time code read from the message, or null.","examples":["849204"],"type":["string","null"]},"link":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"host":{"type":"string"},"matches_sender":{"type":"boolean","description":"True when the link's registrable domain is the authenticated sender's."}},"required":["url","host","matches_sender"]},{"type":"null"}]},"verified":{"type":"boolean","description":"Whether the sender was authenticated (DMARC passed). Treat an unverified code or link with suspicion."},"invitation":{"description":"True when the link accepts an invitation to join the service. Events stored before invitations were read omit it.","type":"boolean"},"expires_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When the verifications read stops serving it; the service's own expiry may be sooner."}},"required":["code","link","verified","expires_at"]},{"type":"null"}]},"risk":{"description":"Doorman's assessment of the message (ADR-019): its own judgment, not text from the mail. Absent on events recorded before assessment existed and where the deployment does not assess.","$ref":"#/components/schemas/RiskAssessment"},"redaction":{"description":"What the account's healthcare guardrails found (ADR-027). When present with findings, `subject`, `body_text`, the attachments' `parsedText` and the verification code and link carry placeholders in place of them. Absent where no guardrail applies.","$ref":"#/components/schemas/Redaction"}},"required":["id","rfc_message_id","from","to","header_to","delivery_role","cc","address_names","subject","body_text","attachments","raw_url","received_at","category","auto_replyable","verdict","spam_score"]},"test":{"type":"boolean","const":true,"description":"Present on the sample a test delivery sends; nothing was received or stored."}},"required":["event","event_id","occurred_at","inbox_id","thread_id","message"],"description":"The `message.received` event, as it is signed and posted to webhooks and framed on the stream. Field names use snake_case.","examples":[{"event":"message.received","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","thread_id":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","message":{"id":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","rfc_message_id":"<a1b2c3@example.com>","from":"sam@example.com","to":"concierge@doorman.example","header_to":"concierge@doorman.example","delivery_role":"to","cc":[],"address_names":{"sam@example.com":"Sam Rivera"},"subject":"Invoice 2847","body_text":"Hi, invoice 2847 is attached.","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"}],"raw_url":"https://api.doorman.example/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/raw","received_at":"2026-11-05T10:05:00.000Z","category":"personal","auto_replyable":true,"verdict":"clean","spam_score":0.02,"risk":{"score":6,"level":"low","labels":[],"reasons":[],"sender":{"standing":"known","authenticated":true},"action":"delivered","analysis":"full","review":null}}}]},"MessageSentEvent":{"type":"object","properties":{"event":{"type":"string","const":"message.sent"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"thread_id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"provider_message_id":{"type":["string","null"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"body_text":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"sent_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"redaction":{"description":"What the account's healthcare guardrails found in what was sent (ADR-027). When present with findings, `subject`, `body_text` and the attachments' `parsedText` carry placeholders in place of them. Absent where no guardrail applies.","$ref":"#/components/schemas/Redaction"}},"required":["id","provider_message_id","from","to","cc","bcc","subject","body_text","attachments","sent_at"]}},"required":["event","event_id","occurred_at","inbox_id","thread_id","message"],"description":"A message accepted by the sending provider and stored. This is not proof of final delivery.","examples":[{"event":"message.sent","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","thread_id":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","message":{"id":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","provider_message_id":"<sent@doorman.example>","from":"concierge@doorman.example","to":["sam@example.com"],"cc":[],"bcc":[],"subject":"Re: Invoice 2847","body_text":"Thank you.","attachments":[],"sent_at":"2026-11-05T10:05:00.000Z"}}]},"ThreadUpdatedEvent":{"type":"object","properties":{"event":{"type":"string","const":"thread.updated"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"thread_id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"thread":{"type":"object","properties":{"id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"is_read":{"type":"boolean"},"trashed_at":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/Metadata"},"labels":{"$ref":"#/components/schemas/ThreadLabels"},"updated_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","is_read","trashed_at","metadata","labels","updated_at"]}},"required":["event","event_id","occurred_at","inbox_id","thread_id","thread"],"description":"The thread's extension state after a read-state, metadata, label or trash change. A no-op edit emits no event.","examples":[{"event":"thread.updated","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","thread_id":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","thread":{"id":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","is_read":true,"trashed_at":null,"metadata":{},"labels":["billing"],"updated_at":"2026-11-05T10:05:00.000Z"}}]},"InboxCreatedEvent":{"type":"object","properties":{"event":{"type":"string","const":"inbox.created"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"inbox":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string"},"display_name":{"type":["string","null"]},"external_id":{"type":["string","null"]},"metadata":{"$ref":"#/components/schemas/Metadata"}},"required":["id","address","display_name","external_id","metadata"]}},"required":["event","event_id","occurred_at","inbox_id","inbox"],"description":"An inbox was created. No API key or webhook signing secret is included.","examples":[{"event":"inbox.created","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","inbox":{"id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","address":"concierge@doorman.example","display_name":"Acme concierge","external_id":null,"metadata":{}}}]},"InboxDeletedEvent":{"type":"object","properties":{"event":{"type":"string","const":"inbox.deleted"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"inbox":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string"},"deleted_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","address","deleted_at"]}},"required":["event","event_id","occurred_at","inbox_id","inbox"],"description":"An inbox was deleted through the API. Delivered to matching account endpoints, not the removed inbox webhook. The address is the one it held before deletion.","examples":[{"event":"inbox.deleted","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","inbox":{"id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","address":"concierge@doorman.example","deleted_at":"2026-11-05T10:05:00.000Z"}}]},"DeliveryFailedEvent":{"type":"object","properties":{"event":{"type":"string","const":"delivery.failed"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}]},"delivery":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook delivery identifier.","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["inbox","endpoint"]},"id":{"type":"string"}},"required":["kind","id"]},"attempts":{"type":"integer","minimum":0},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}]},"last_error":{"type":"string"}},"required":["id","event_id","target","attempts","last_status_code","last_error"]}},"required":["event","event_id","occurred_at","inbox_id","delivery"],"description":"A webhook delivery reached a terminal failure. Account endpoint failures have inbox_id null and require account scope. Failure notifications never produce further failure notifications.","examples":[{"event":"delivery.failed","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":null,"delivery":{"id":"whd_01jc5f1a2b3c4d5e6f7g8h9j0k","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","target":{"kind":"endpoint","id":"whk_01jc5d1a2b3c4d5e6f7g8h9j0k"},"attempts":5,"last_status_code":503,"last_error":"HTTP 503"}}]},"MessageHeldEvent":{"type":"object","properties":{"event":{"type":"string","const":"message.held"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"from":{"type":"string","description":"The sender's address."},"held_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"risk":{"$ref":"#/components/schemas/RiskAssessment"}},"required":["id","from","held_at","risk"]}},"required":["event","event_id","occurred_at","inbox_id","message"],"description":"A message arrived and is held for the owner under the security policy (ADR-018). The payload says who, when and why, and nothing of the message itself: no subject, no body, no attachment. When the owner releases it, message.received follows with the content; a discarded message produces nothing further.","examples":[{"event":"message.held","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","message":{"id":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","from":"billing@example.net","held_at":"2026-11-05T10:05:00.000Z","risk":{"score":92,"level":"critical","labels":["prompt_injection","impersonation"],"reasons":["hidden_text","instruction_override","dmarc_fail"],"sender":{"standing":"new","authenticated":false},"action":"held","analysis":"full","review":null}}}]},"SendHeldEvent":{"type":"object","properties":{"event":{"type":"string","const":"send.held"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"send":{"type":"object","properties":{"id":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","description":"A held send's identifier.","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},{"type":"null"}],"description":"The thread a reply was written into; null for a new message."},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"requested_by":{"type":"string","enum":["app","key"]},"kind":{"type":"string","enum":["held","draft"],"description":"Why it waits: `held` when the security policy kept a send, `draft` when it was written as a draft for the owner to send."},"held_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"expires_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","thread_id","to","cc","bcc","requested_by","kind","held_at","expires_at"]}},"required":["event","event_id","occurred_at","inbox_id","send"],"description":"A message waits for the owner before it leaves the inbox: one that was asked to be sent and that the security policy kept (`sendApproval`), or a draft written for the owner to send (`kind` says which). The payload says who it is to and who asked, and nothing of what it says: no subject, no body, no attachment. When the owner sends it, message.sent follows; when the owner discards it or nobody decides in time, send.discarded does.","examples":[{"event":"send.held","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","send":{"id":"hsd_01jc5f1a2b3c4d5e6f7g8h9j0k","thread_id":null,"to":["sam@example.com"],"cc":[],"bcc":[],"requested_by":"app","kind":"held","held_at":"2026-11-05T10:05:00.000Z","expires_at":"2026-11-12T10:05:00.000Z"}}]},"SendDiscardedEvent":{"type":"object","properties":{"event":{"type":"string","const":"send.discarded"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"send":{"type":"object","properties":{"id":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","description":"A held send's identifier.","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},{"type":"null"}],"description":"The thread a reply was written into; null for a new message."},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"requested_by":{"type":"string","enum":["app","key"]},"kind":{"type":"string","enum":["held","draft"],"description":"Why it waits: `held` when the security policy kept a send, `draft` when it was written as a draft for the owner to send."},"reason":{"type":"string","enum":["discarded","expired"],"description":"`discarded` by the owner, or `expired` because nobody decided in time."},"discarded_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","thread_id","to","cc","bcc","requested_by","kind","reason","discarded_at"]}},"required":["event","event_id","occurred_at","inbox_id","send"],"description":"A held send ended without being sent: the owner discarded it, or it expired. Nothing of what it said is included.","examples":[{"event":"send.discarded","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","send":{"id":"hsd_01jc5f1a2b3c4d5e6f7g8h9j0k","thread_id":null,"to":["sam@example.com"],"cc":[],"bcc":[],"requested_by":"app","kind":"held","reason":"discarded","discarded_at":"2026-11-05T10:05:00.000Z"}}]},"SignInRequestedEvent":{"type":"object","properties":{"event":{"type":"string","const":"sign_in.requested"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"sign_in":{"type":"object","properties":{"id":{"type":"string","pattern":"^sig_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of one address's connection to one relying party.","examples":["sig_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"service_id":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"The service in the address's passport that the sign-in belongs to.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},"client":{"type":"object","properties":{"id":{"type":"string","description":"The relying party's client id: one this API issued, or the URL of the identity it published."},"name":{"type":"string","description":"What the relying party calls itself. A label, never proof of who it is."},"host":{"type":"string","description":"The host that identifies the relying party."}},"required":["id","name","host"]},"requested_by":{"type":"string","enum":["app","key","owner"],"description":"Who asked: a connected app, an API key, or the owner in the console."},"requested_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","service_id","client","requested_by","requested_at"]}},"required":["event","event_id","occurred_at","inbox_id","sign_in"],"description":"An address asked to sign in to a service for the first time and waits for the owner to allow it (Sign in with Doorman). Asking again while it waits emits nothing. Nothing in the payload lets anyone sign in.","examples":[{"event":"sign_in.requested","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","sign_in":{"id":"sig_01jc5f1a2b3c4d5e6f7g8h9j0k","service_id":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net"},"requested_by":"app","requested_at":"2026-11-05T10:05:00.000Z"}}]},"SignInCompletedEvent":{"type":"object","properties":{"event":{"type":"string","const":"sign_in.completed"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"sign_in":{"type":"object","properties":{"id":{"type":"string","pattern":"^sig_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of one address's connection to one relying party.","examples":["sig_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"service_id":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"The service in the address's passport that the sign-in belongs to.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},"client":{"type":"object","properties":{"id":{"type":"string","description":"The relying party's client id: one this API issued, or the URL of the identity it published."},"name":{"type":"string","description":"What the relying party calls itself. A label, never proof of who it is."},"host":{"type":"string","description":"The host that identifies the relying party."}},"required":["id","name","host"]},"completed_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","service_id","client","completed_at"]}},"required":["event","event_id","occurred_at","inbox_id","sign_in"],"description":"An address signed in to a service: the relying party exchanged its code for tokens (Sign in with Doorman). The payload names the service and carries no token, code or claim.","examples":[{"event":"sign_in.completed","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","sign_in":{"id":"sig_01jc5f1a2b3c4d5e6f7g8h9j0k","service_id":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net"},"completed_at":"2026-11-05T10:05:00.000Z"}}]},"WebhookEvent":{"oneOf":[{"$ref":"#/components/schemas/MessageReceivedEvent"},{"$ref":"#/components/schemas/MessageSentEvent"},{"$ref":"#/components/schemas/ThreadUpdatedEvent"},{"$ref":"#/components/schemas/InboxCreatedEvent"},{"$ref":"#/components/schemas/InboxDeletedEvent"},{"$ref":"#/components/schemas/DeliveryFailedEvent"},{"$ref":"#/components/schemas/MessageHeldEvent"},{"$ref":"#/components/schemas/SendHeldEvent"},{"$ref":"#/components/schemas/SendDiscardedEvent"},{"$ref":"#/components/schemas/SignInRequestedEvent"},{"$ref":"#/components/schemas/SignInCompletedEvent"}],"description":"A signed event payload, discriminated by event. New event types are additive."},"CreatedInbox":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string","description":"The full address: the mailbox name at the inbox domain.","examples":["concierge@doorman.example"]},"mailboxName":{"type":"string","description":"The part before the @.","examples":["concierge"]},"domain":{"type":"string","description":"The inbox domain of this deployment.","examples":["doorman.example"]},"domainId":{"description":"The custom domain identifier; null on the shared domain. Older deployments omit it.","anyOf":[{"type":"string","pattern":"^dom_[0-9a-hjkmnp-tv-z]{26}$","description":"A custom domain identifier.","examples":["dom_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"null"}]},"displayName":{"description":"The sender name on outbound mail; null when none is set.","type":["string","null"]},"signature":{"description":"Plain text appended to every message the inbox sends, under a `-- ` line; null when none is set. Older deployments omit it.","examples":["Acme concierge\nacme.example"],"type":["string","null"]},"signatureHtml":{"description":"The signature as markup, appended to the HTML part of every message the inbox sends, as it was stored: scripts, style sheets, forms, event handlers and images that are not https are removed when it is set. Null when the signature is plain text only. Older deployments omit it.","examples":["<table cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"font-family:Arial,sans-serif;font-size:14px\"><b>Acme concierge</b><br><a href=\"https://acme.example\">acme.example</a></td></tr></table>"],"type":["string","null"]},"externalId":{"description":"Your own identifier for the inbox; null when none was given.","examples":["customer-8841"],"type":["string","null"]},"metadata":{"default":{},"$ref":"#/components/schemas/Metadata"},"webhookUrl":{"description":"The inbox webhook's URL, or null when the inbox has none.","type":["string","null"]},"status":{"type":"string","enum":["active","suspended","deleted"],"description":"Only active inboxes receive and send; a deleted inbox is never returned."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"webhook":{"anyOf":[{"$ref":"#/components/schemas/InboxWebhookSecret"},{"type":"null"}],"description":"The inbox webhook with its one-time secret, when `webhookUrl` was given."},"key":{"anyOf":[{"$ref":"#/components/schemas/CreatedApiKey"},{"type":"null"}],"description":"The inbox-scoped key with its one-time token, when `key` was given."}},"required":["id","address","mailboxName","domain","displayName","externalId","webhookUrl","status","createdAt","updatedAt","webhook","key"],"description":"A freshly issued inbox. When the request asked for them, `webhook` carries the webhook with its signing secret and `key` the inbox-scoped key with its token; both are shown once and null otherwise.","examples":[{"id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","address":"concierge@doorman.example","mailboxName":"concierge","domain":"doorman.example","displayName":"Acme concierge","externalId":"customer-8841","metadata":{},"webhookUrl":"https://agent.example.com/hooks/doorman","status":"active","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","webhook":{"url":"https://agent.example.com/hooks/doorman","secret":"whsec_dGVzdC13ZWJob29rLXNpZ25pbmctc2VjcmV0LTAxMjM0NTY3ODk="},"key":{"id":"key_01jc5c0z9y8x7w6v5t4t3s2r1q","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","name":"Acme concierge","tokenPrefix":"dm_9f3abcd","last4":"m2x8","createdAt":"2026-11-05T10:05:00.000Z","lastUsedAt":null,"token":"dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"}}]},"EventSummary":{"type":"object","properties":{"from":{"type":["string","null"]},"subject":{"type":["string","null"]},"messageId":{"type":["string","null"]},"threadId":{"type":["string","null"]}},"required":["from","subject","messageId","threadId"],"description":"What a list shows without the payload; none of it is body text.","examples":[{"from":"sam@example.com","subject":"Invoice 2847","messageId":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","threadId":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m"}]},"Event":{"type":"object","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"seq":{"type":"integer","description":"The position in the account's log: the cursor for paging and polling.","examples":[1042]},"type":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"summary":{"$ref":"#/components/schemas/EventSummary"}},"required":["id","seq","type","inboxId","occurredAt","summary"],"description":"Something that happened in the account, in a log every subscriber reads from.","examples":[{"id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","seq":1042,"type":"message.received","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","occurredAt":"2026-11-05T10:05:00.000Z","summary":{"from":"sam@example.com","subject":"Invoice 2847","messageId":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","threadId":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m"}}]},"EventPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"description":"The `seq` to pass as `cursor` for the next page, as a string; null on the last page.","examples":["1041"],"type":["string","null"]}},"required":["data","nextCursor"],"description":"Events newest first, the answer to a `cursor` (or no cursor) request."},"EventPoll":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"latestSeq":{"type":"integer","description":"The `seq` to poll from next: the last event of a full page, otherwise the account's newest."}},"required":["data","latestSeq"],"description":"Events oldest first, the answer to an `after` request."},"EventList":{"anyOf":[{"$ref":"#/components/schemas/EventPage"},{"$ref":"#/components/schemas/EventPoll"}],"description":"A page (with `cursor` or nothing) or a poll (with `after`)."},"EventDetail":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/Event"},"payload":{"anyOf":[{"$ref":"#/components/schemas/WebhookEvent"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}],"description":"The typed event payload, or an unknown future event object."},"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"},"description":"Inbox-scoped keys see the inbox webhook's delivery only."}},"required":["event","payload","deliveries"],"description":"An event, the payload exactly as it was signed and sent, and the deliveries it produced."},"CreateApp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"scopes":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}},"tokenEndpointAuthMethod":{"type":"string","enum":["none","client_secret_post"]}},"required":["name","redirectUris","scopes"],"additionalProperties":false,"description":"Register a client. Confidential clients receive a one-time secret; every client uses S256 PKCE.","examples":[{"name":"Mail triage","redirectUris":["https://agent.example.com/callback"],"scopes":["mail:read"]}]},"UpdateApp":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"scopes":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}}},"additionalProperties":false,"description":"Replace supplied fields. Every edit invalidates pending consent and existing installations.","examples":[{"name":"Mail review"}]},"App":{"type":"object","properties":{"id":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}},"tokenEndpointAuthMethod":{"type":"string","enum":["none","client_secret_post"]},"status":{"type":"string","enum":["active","deleted"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","name","redirectUris","scopes","tokenEndpointAuthMethod","status","createdAt","updatedAt"],"description":"A registered client without its secret. A display name is not evidence of a verified developer.","examples":[{"id":"app_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Mail triage","redirectUris":["https://agent.example.com/callback"],"scopes":["mail:read"],"tokenEndpointAuthMethod":"none","status":"active","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"CreatedApp":{"type":"object","properties":{"id":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}},"tokenEndpointAuthMethod":{"type":"string","enum":["none","client_secret_post"]},"status":{"type":"string","enum":["active","deleted"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"clientSecret":{"type":["string","null"]}},"required":["id","name","redirectUris","scopes","tokenEndpointAuthMethod","status","createdAt","updatedAt","clientSecret"],"description":"The client and, for confidential clients only, its secret shown once."},"AppList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/App"}}},"required":["data"],"description":"The developer's registered apps."},"AppSecret":{"type":"object","properties":{"id":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"clientSecret":{"type":"string"}},"required":["id","clientSecret"],"description":"A new client secret, shown once. Existing installations are revoked."},"AppInstall":{"type":"object","properties":{"id":{"type":"string","pattern":"^ins_[0-9a-hjkmnp-tv-z]{26}$","description":"An app installation identifier.","examples":["ins_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"appId":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"dynamic":{"type":"boolean","description":"The client registered itself. Nothing about it was checked, its name included."},"metadataUrl":{"anyOf":[{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]},{"type":"null"}],"description":"The identity document the client published, when it named itself by one. The host that serves the document was checked; the name is what that host says about itself. Null for a client registered in the console or by itself."},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}},"status":{"type":"string","enum":["active","revoked"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the client last used this grant, to the minute. Null until it does."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the grant's connections end unless the client stays in use. Null when no connection is alive: the client never finished connecting, was revoked, or went unused past the limit."},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]}},"required":["id","appId","name","dynamic","metadataUrl","scopes","status","createdAt","lastUsedAt","expiresAt","revokedAt"],"description":"An account's explicit grant to a client. Revocation stops future API and background access.","examples":[{"id":"ins_01jc5f1a2b3c4d5e6f7g8h9j0k","appId":"app_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Mail triage","dynamic":false,"metadataUrl":null,"scopes":["mail:read"],"status":"active","createdAt":"2026-11-05T10:05:00.000Z","lastUsedAt":"2026-11-05T10:05:00.000Z","expiresAt":"2026-12-05T10:05:00.000Z","revokedAt":null}]},"AppInstallList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AppInstall"}}},"required":["data"],"description":"The account's active and revoked installations."},"OAuthConsent":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"client":{"type":"object","properties":{"id":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"dynamic":{"type":"boolean","description":"The client registered itself. Nothing about it was checked, its name included."},"metadataUrl":{"anyOf":[{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]},{"type":"null"}],"description":"The identity document the client published, when it named itself by one. The host that serves the document was checked; the name is what that host says about itself. Null for a client registered in the console or by itself."}},"required":["id","name","dynamic","metadataUrl"]},"redirectUri":{"type":"string","minLength":1,"maxLength":2048},"resource":{"type":"string","format":"uri"},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}},"expiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"csrf":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["requestId","client","redirectUri","resource","scopes","expiresAt","csrf"],"description":"A one-time request bound to the current console session. Approval is never automatic."},"DecideOAuth":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","deny"]},"csrf":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["decision","csrf"],"additionalProperties":false,"description":"An explicit decision for this session-bound request."},"OAuthDecision":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"}},"required":["redirectUrl"],"description":"The validated redirect carrying state, issuer and a code or access_denied."},"OAuthAuthorization":{"type":"object","properties":{"response_type":{"type":"string","const":"code"},"client_id":{"anyOf":[{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]}],"description":"A client id this API issued, or the URL of the client's Client ID Metadata Document.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"redirect_uri":{"type":"string","minLength":1,"maxLength":2048},"resource":{"type":"string","maxLength":2048,"format":"uri"},"scope":{"type":"string","minLength":1,"maxLength":512},"state":{"type":"string","minLength":1,"maxLength":2048},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"code_challenge_method":{"type":"string","const":"S256"}},"required":["response_type","client_id","redirect_uri","resource","code_challenge","code_challenge_method"],"description":"An authorization-code request with S256 PKCE and an explicit resource. Other parameters are ignored."},"OAuthTokenRequest":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"client_id":{"anyOf":[{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]}],"description":"A client id this API issued, or the URL of the client's Client ID Metadata Document.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"client_secret":{"type":"string","minLength":1,"maxLength":256},"resource":{"type":"string","maxLength":2048,"format":"uri"},"code":{"type":"string","minLength":1,"maxLength":256},"redirect_uri":{"type":"string","minLength":1,"maxLength":2048},"code_verifier":{"type":"string","pattern":"^[A-Za-z0-9._~-]{43,128}$"},"refresh_token":{"type":"string","minLength":1,"maxLength":256},"scope":{"type":"string","minLength":1,"maxLength":512}},"required":["grant_type","client_id","resource"],"description":"A form-encoded code exchange or refresh. Resource and client are bound to the original grant. Other fields are ignored.","examples":[{"grant_type":"authorization_code","client_id":"app_01jc5f1a2b3c4d5e6f7g8h9j0k","resource":"https://api.doorman.example","code":"replace-with-the-validated-callback-code","redirect_uri":"https://agent.example.com/callback","code_verifier":"replace-with-the-verifier-saved-before-the-redirect"}]},"OAuthTokens":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","exclusiveMinimum":0},"refresh_token":{"type":"string"},"scope":{"type":"string"}},"required":["access_token","token_type","expires_in","refresh_token","scope"],"description":"Short-lived bearer access and a rotating refresh token. Store them as secrets."},"OAuthError":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_client","invalid_grant","invalid_scope","unsupported_grant_type","temporarily_unavailable","invalid_redirect_uri","invalid_client_metadata"]},"error_description":{"type":"string"}},"required":["error"],"description":"An OAuth protocol error, distinct from the Inbox API error envelope."},"RegisterOAuthClient":{"type":"object","properties":{"client_name":{"type":"string","maxLength":1024},"redirect_uris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"token_endpoint_auth_method":{"type":"string","maxLength":64},"grant_types":{"maxItems":16,"type":"array","items":{"type":"string","maxLength":128}},"response_types":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":64}},"scope":{"type":"string","minLength":1,"maxLength":512}},"required":["redirect_uris"],"description":"Dynamic registration of a public client, not a verified developer identity. Other client metadata is ignored and redirects the API cannot use are dropped. The answer states what was registered: always a public client with both grants.","examples":[{"client_name":"Mail triage","redirect_uris":["https://agent.example.com/callback"],"scope":"mail:read"}]},"RegisteredOAuthClient":{"type":"object","properties":{"client_id":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"client_name":{"type":"string"},"redirect_uris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"token_endpoint_auth_method":{"type":"string","const":"none"},"grant_types":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]}},"response_types":{"type":"array","items":{"type":"string","const":"code"}},"scope":{"type":"string"},"client_id_issued_at":{"type":"integer"},"client_id_expires_at":{"type":"integer"}},"required":["client_id","client_name","redirect_uris","token_endpoint_auth_method","grant_types","response_types","scope","client_id_issued_at","client_id_expires_at"],"description":"A bounded public client registration. No client secret or registration management token is issued."},"OAuthServerMetadata":{"type":"object","properties":{"issuer":{"type":"string","format":"uri"},"authorization_endpoint":{"type":"string","format":"uri"},"token_endpoint":{"type":"string","format":"uri"},"registration_endpoint":{"type":"string","format":"uri"},"response_types_supported":{"type":"array","items":{"type":"string","const":"code"}},"grant_types_supported":{"type":"array","items":{"type":"string","enum":["authorization_code","refresh_token"]}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string","const":"S256"}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string","enum":["none","client_secret_post"]}},"scopes_supported":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage","keys:manage","offline_access"]}},"authorization_response_iss_parameter_supported":{"type":"boolean","const":true},"client_id_metadata_document_supported":{"type":"boolean","const":true}},"required":["issuer","authorization_endpoint","token_endpoint","registration_endpoint","response_types_supported","grant_types_supported","code_challenge_methods_supported","token_endpoint_auth_methods_supported","scopes_supported","authorization_response_iss_parameter_supported","client_id_metadata_document_supported"],"description":"OAuth authorization-server discovery."},"OAuthResourceMetadata":{"type":"object","properties":{"resource":{"type":"string","format":"uri"},"authorization_servers":{"type":"array","items":{"type":"string","format":"uri"}},"scopes_supported":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}},"bearer_methods_supported":{"type":"array","items":{"type":"string","const":"header"}}},"required":["resource","authorization_servers","scopes_supported","bearer_methods_supported"],"description":"Protected-resource discovery for the Inbox API or its MCP endpoint."},"Health":{"type":"object","properties":{"ok":{"type":"boolean","const":true},"service":{"type":"string","const":"doorman-inbox"}},"required":["ok","service"],"description":"The service is up.","examples":[{"ok":true,"service":"doorman-inbox"}]},"Account":{"type":"object","properties":{"id":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","description":"An account identifier.","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]},"email":{"type":"string","maxLength":254,"format":"email","examples":["sam@example.com"],"description":"The person's verified address, or an organization's contact address."},"name":{"type":"string","description":"The person's name, or the organization's.","examples":["Dana Ortiz"]},"plan":{"type":"string","enum":["free","pro","enterprise"]},"kind":{"description":"`personal` for one person's account, `organization` for the account a team shares. Older deployments omit it.","type":"string","enum":["personal","organization"]}},"required":["id","email","name","plan"],"description":"The account as its owner sees it: one person's, or the one an organization's members share.","examples":[{"id":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","email":"dana@example.com","name":"Dana Ortiz","plan":"free"},{"id":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","email":"dana@example.com","name":"Acme","plan":"pro","kind":"organization"}]},"Organization":{"type":"object","properties":{"id":{"type":"string","pattern":"^org_[A-Za-z0-9]{1,64}$","description":"The identity provider's organization id.","examples":["org_2abcDEF3ghiJKL"]},"name":{"type":"string","description":"The organization's name; empty until the identity provider has reported it.","examples":["Acme"]},"slug":{"description":"The organization's slug at the identity provider, or null when it has none.","examples":["acme"],"type":["string","null"]}},"required":["id","name","slug"],"description":"The organization an account belongs to, as the identity provider knows it. Its members, their invitations and their roles are managed there.","examples":[{"id":"org_2abcDEF3ghiJKL","name":"Acme","slug":"acme"}]},"AdoptAccount":{"type":"object","properties":{"accountId":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","description":"An account identifier.","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]}},"required":["accountId"],"additionalProperties":false,"description":"The personal account to move into the organization the session is working in. It must be the signed-in person's own.","examples":[{"accountId":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y"}]},"PlanSummary":{"type":"object","properties":{"name":{"type":"string","enum":["free","pro","enterprise"]},"label":{"type":"string","examples":["Free"]},"priceUsd":{"description":"Per month per account; null means by arrangement.","type":["number","null"]},"inboxLimit":{"anyOf":[{"type":"integer"},{"type":"null"}]},"monthlySendLimit":{"anyOf":[{"type":"integer"},{"type":"null"}]},"domainLimit":{"description":"Custom domains allowed; zero on free. Older deployments omit it.","anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["name","label","priceUsd","inboxLimit","monthlySendLimit"],"description":"The account's plan and its limits; null limits mean unlimited.","examples":[{"name":"free","label":"Free","priceUsd":0,"inboxLimit":3,"monthlySendLimit":3000}]},"Usage":{"type":"object","properties":{"inboxes":{"type":"integer","description":"Active inboxes."},"domains":{"description":"Active custom domains. Older deployments omit it.","type":"integer"},"sendsThisMonth":{"type":"integer","description":"Successful sends this UTC calendar month, replies included."},"monthResetsAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"The first instant of the next UTC month."}},"required":["inboxes","sendsThisMonth","monthResetsAt"],"description":"This month's usage against the plan.","examples":[{"inboxes":1,"sendsThisMonth":37,"monthResetsAt":"2026-12-01T00:00:00.000Z"}]},"Subscription":{"type":"object","properties":{"status":{"type":"string","enum":["active","past_due","canceled"]},"cancelAtPeriodEnd":{"type":"boolean","description":"True when the subscription was canceled and the plan lasts until `currentPeriodEnd`."},"currentPeriodEnd":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the paid period ends: the next charge, or the last day of the plan when `cancelAtPeriodEnd` is true."}},"required":["status","cancelAtPeriodEnd","currentPeriodEnd"],"description":"The account's subscription to the paid plan, as the payment provider last reported it.","examples":[{"status":"active","cancelAtPeriodEnd":false,"currentPeriodEnd":"2026-12-05T10:05:00.000Z"}]},"Seats":{"type":"object","properties":{"purchased":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The seats the organization's subscription pays for; null while it has no Teams subscription."},"used":{"type":"integer","description":"The seats held: active members and open invitations."},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many people the organization may hold now: `purchased` for a team that pays, one for an organization that pays nothing, null when nothing limits it."},"seatPriceUsd":{"type":"number","description":"What one seat costs a month."},"minSeats":{"type":"integer","description":"The fewest seats a Teams subscription holds."},"maxSeats":{"type":"integer","description":"The most seats a Teams subscription holds."}},"required":["purchased","used","limit","seatPriceUsd","minSeats","maxSeats"],"description":"An organization's seats. A seat is held by every active member and by every invitation that is still open.","examples":[{"purchased":3,"used":2,"limit":3,"seatPriceUsd":7,"minSeats":3,"maxSeats":20}]},"BillingSummary":{"type":"object","properties":{"subscription":{"anyOf":[{"$ref":"#/components/schemas/Subscription"},{"type":"null"}]},"seats":{"description":"Present for an organization's account where the deployment sells the Teams plan, which is paid per seat.","$ref":"#/components/schemas/Seats"}},"required":["subscription"],"description":"How the account pays. `subscription` is null for an account that has none, whatever its plan: an operator can set a plan by hand.","examples":[{"subscription":null}]},"SetSeats":{"type":"object","properties":{"seats":{"type":"integer","minimum":3,"maximum":20}},"required":["seats"],"additionalProperties":false,"description":"The number of seats the organization's Teams subscription should hold: the whole count, not a difference.","examples":[{"seats":4}]},"BillingRedirect":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"description":"A page at the payment provider to send the person's browser to. It is for this account only and expires.","examples":[{"url":"https://payments.example/checkout/c_123"}]},"BillingSynced":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","enterprise"]},"billing":{"$ref":"#/components/schemas/BillingSummary"}},"required":["plan","billing"],"description":"The account's plan and billing after they were read again from the payment provider.","examples":[{"plan":"pro","billing":{"subscription":{"status":"active","cancelAtPeriodEnd":false,"currentPeriodEnd":"2026-12-05T10:05:00.000Z"}}}]},"BillingWebhookResult":{"type":"object","properties":{"received":{"type":"boolean","const":true},"outcome":{"type":"string","enum":["updated","unchanged","ignored"],"description":"`updated` when the account's plan or subscription changed, `unchanged` when the event said nothing new, `ignored` for an event about another product or of another kind."}},"required":["received","outcome"],"description":"What the payment provider's event did.","examples":[{"received":true,"outcome":"updated"}]},"Me":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"},"plan":{"$ref":"#/components/schemas/PlanSummary"},"usage":{"$ref":"#/components/schemas/Usage"},"key":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-hjkmnp-tv-z]{26}$","description":"An API key identifier.","examples":["key_01jc5c0z9y8x7w6v5t4t3s2r1q"]},"scope":{"type":"string","enum":["account","inbox"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}]}},"required":["id","scope","inboxId"]},{"type":"null"}],"description":"The API key that made the call; null for a console session."},"session":{"anyOf":[{"type":"object","properties":{"userId":{"type":"string","description":"The identity provider's user id."},"role":{"description":"The person's role in the organization as the identity provider names it (`org:admin` or `org:member`); null in a personal account. What the session may do follows `memberRole`, not this. Older deployments omit it.","examples":["org:admin"],"type":["string","null"]},"memberRole":{"description":"The role the API keeps for the person in the organization, which decides what the session may do: `owner`, `admin`, `member` or `viewer`. Null in a personal account. Older deployments omit it.","examples":["owner"],"anyOf":[{"type":"string","enum":["owner","admin","member","viewer"]},{"type":"null"}]},"permissions":{"description":"What this session may do: every permission in a personal account, otherwise what the member's role holds. A person the identity provider names an admin holds at least what an admin holds. Older deployments omit it.","type":"array","items":{"type":"string","enum":["mail:read","mail:write","mail:send","inboxes:manage","security:manage","keys:manage","webhooks:manage","domains:manage","apps:manage","agents:connect","members:manage","billing:manage","account:manage","compliance:manage","phi:read"]}},"personalAccountId":{"description":"In an organization, the account `POST /v1/organization/adopt` would move, for as long as it can be moved: the person's own personal account, when the session holds `account:manage`, the organization's account has never been used and no account was moved into the organization before. Null otherwise. Older deployments omit it.","anyOf":[{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","description":"An account identifier.","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]},{"type":"null"}]}},"required":["userId"]},{"type":"null"}],"description":"The console session that made the call; null for an API key."},"organization":{"description":"The organization the account belongs to, whoever is calling; null for a personal account. Older deployments omit it.","anyOf":[{"$ref":"#/components/schemas/Organization"},{"type":"null"}]},"oauth":{"description":"Present only when a scoped app access token made the call.","type":"object","properties":{"appId":{"type":"string","pattern":"^app_[0-9a-hjkmnp-tv-z]{26}$","description":"An OAuth client identifier.","examples":["app_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"installationId":{"type":"string","pattern":"^ins_[0-9a-hjkmnp-tv-z]{26}$","description":"An app installation identifier.","examples":["ins_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","inboxes:read","inboxes:write","mail:read","mail:write","mail:send","mail:draft","events:read","webhooks:manage","rules:manage"]}}},"required":["appId","installationId","scopes"]},"inbox":{"anyOf":[{"$ref":"#/components/schemas/Inbox"},{"type":"null"}],"description":"The inbox an inbox-scoped key reaches; null otherwise."},"inboxDomain":{"type":"string","description":"Every inbox address is a mailbox name at this domain.","examples":["doorman.example"]},"features":{"description":"Configured capabilities, independent of the plan. Missing flags mean unavailable.","type":"object","properties":{"customDomains":{"type":"boolean"},"domainConnect":{"type":"boolean"},"signIn":{"description":"Whether Sign in with Doorman is switched on for this deployment.","type":"boolean"},"billing":{"description":"Whether an account can pay for a plan here. Where it cannot, plans are set by the operator.","type":"boolean"},"healthcare":{"description":"Whether healthcare guardrails and the business associate agreement are switched on for this deployment (ADR-027).","type":"boolean"},"drafts":{"description":"Whether an app or a key can write drafts for the owner to send here (ADR-028).","type":"boolean"}},"required":["customDomains","domainConnect"]},"billing":{"description":"Present where billing is switched on and the caller is an account key or a console session.","$ref":"#/components/schemas/BillingSummary"},"healthcare":{"description":"Present where healthcare guardrails are switched on and the caller is an account key or a console session.","type":"object","properties":{"baa":{"type":"string","enum":["not_signed","active","reacceptance_required","terminated"],"description":"Where the account stands with the business associate agreement."},"eligible":{"type":"boolean","description":"Whether the account may sign and change guardrails now."},"guardrails":{"type":"boolean","description":"Whether guardrails apply to the account's mail now."}},"required":["baa","eligible","guardrails"]}},"required":["account","plan","usage","key","session","inbox","inboxDomain"],"description":"The account, its plan and usage, the caller, the organization the account belongs to, and the inbox domain of this deployment.","examples":[{"account":{"id":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","email":"dana@example.com","name":"Dana Ortiz","plan":"free"},"plan":{"name":"free","label":"Free","priceUsd":0,"inboxLimit":3,"monthlySendLimit":3000},"usage":{"inboxes":1,"sendsThisMonth":37,"monthResetsAt":"2026-12-01T00:00:00.000Z"},"key":{"id":"key_01jc5c0z9y8x7w6v5t4t3s2r1q","scope":"account","inboxId":null},"session":null,"inbox":null,"inboxDomain":"doorman.example"}]},"Overview":{"type":"object","properties":{"inboxes":{"type":"object","properties":{"active":{"type":"integer"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The plan's allowance; null means unlimited."}},"required":["active","limit"]},"keys":{"type":"object","properties":{"account":{"type":"integer","description":"Active account keys."},"inbox":{"type":"integer","description":"Active inbox-scoped keys."}},"required":["account","inbox"]},"mail":{"type":"object","properties":{"receivedLast7Days":{"type":"integer"},"sentLast7Days":{"type":"integer"},"unreadThreads":{"type":"integer","description":"Across live inboxes, untrashed threads."},"lastReceivedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"lastSentAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]}},"required":["receivedLast7Days","sentLast7Days","unreadThreads","lastReceivedAt","lastSentAt"]},"webhooks":{"type":"object","properties":{"inboxWebhooks":{"type":"integer"},"endpoints":{"type":"integer"},"deliveredLast24Hours":{"type":"integer"},"failedLast24Hours":{"type":"integer"}},"required":["inboxWebhooks","endpoints","deliveredLast24Hours","failedLast24Hours"]},"checklist":{"type":"object","properties":{"createdInbox":{"type":"boolean"},"createdKey":{"type":"boolean"},"receivedMessage":{"type":"boolean"},"connectedWebhook":{"type":"boolean","description":"True while an inbox webhook or an endpoint exists."},"sentMessage":{"type":"boolean"}},"required":["createdInbox","createdKey","receivedMessage","connectedWebhook","sentMessage"],"description":"What has happened at least once."},"services":{"description":"The account's passport: the outside services its addresses are signed up for. Older deployments omit it.","type":"object","properties":{"total":{"type":"integer","description":"Services the live inboxes are signed up for, archived ones left out."},"pending":{"type":"integer","description":"Sign-ups not confirmed yet."},"paid":{"type":"integer","description":"Services that have sent a receipt or an invoice."},"attention":{"description":"Services with an active warning (an unexplained code, a password reset, or a security notice). Older deployments omit it.","type":"integer"},"signInsPending":{"description":"Sign-ins an agent asked for that wait for the owner to allow them. Omitted by older deployments and where Sign in with Doorman is not switched on.","type":"integer"}},"required":["total","pending","paid"]},"security":{"description":"Risk assessment counts (ADR-019). Older deployments omit it.","type":"object","properties":{"held":{"type":"integer","description":"Messages held for review across live inboxes."},"flaggedLast7Days":{"type":"integer","description":"Inbound messages of the last 7 days assessed high or critical."},"heldSends":{"description":"Sends that wait for the owner's word across live inboxes. Older deployments omit it.","type":"integer"},"scanning":{"description":"Messages that arrived and wait out of sight for the check of their files and links to finish, across live inboxes. They are in no list until it does. Older deployments omit it.","type":"integer"}},"required":["held","flaggedLast7Days"]}},"required":["inboxes","keys","mail","webhooks","checklist"],"description":"The console's first page: counts, recent activity and the getting-started checklist.","examples":[{"inboxes":{"active":1,"limit":1},"keys":{"account":2,"inbox":1},"mail":{"receivedLast7Days":1204,"sentLast7Days":312,"unreadThreads":3,"lastReceivedAt":"2026-11-05T10:05:00.000Z","lastSentAt":"2026-11-05T10:05:00.000Z"},"webhooks":{"inboxWebhooks":1,"endpoints":2,"deliveredLast24Hours":118,"failedLast24Hours":2},"checklist":{"createdInbox":true,"createdKey":true,"receivedMessage":true,"connectedWebhook":true,"sentMessage":false},"services":{"total":7,"pending":1,"paid":2}}]},"MetricsCounters":{"type":"object","properties":{"received":{"type":"integer"},"sent":{"type":"integer"},"webhookDelivered":{"type":"integer"},"webhookFailed":{"type":"integer"}},"required":["received","sent","webhookDelivered","webhookFailed"],"description":"Mail and webhook counts.","examples":[{"received":140,"sent":38,"webhookDelivered":139,"webhookFailed":1}]},"MetricsBucket":{"type":"object","properties":{"received":{"type":"integer"},"sent":{"type":"integer"},"webhookDelivered":{"type":"integer"},"webhookFailed":{"type":"integer"},"at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"The bucket's start."}},"required":["received","sent","webhookDelivered","webhookFailed","at"],"description":"One UTC bucket of the series.","examples":[{"at":"2026-10-30T00:00:00.000Z","received":140,"sent":38,"webhookDelivered":139,"webhookFailed":1}]},"Metrics":{"type":"object","properties":{"from":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"to":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"interval":{"type":"string","enum":["hour","day"]},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The inbox the counts are limited to; null for the whole account."},"series":{"type":"array","items":{"$ref":"#/components/schemas/MetricsBucket"},"description":"One entry per bucket covering [from, to), zeros included."},"totals":{"$ref":"#/components/schemas/MetricsCounters"},"categories":{"type":"object","properties":{"personal":{"type":"integer"},"automated":{"type":"integer"},"marketing":{"type":"integer"},"bounce":{"type":"integer"},"spam":{"type":"integer"},"malicious":{"type":"integer"}},"required":["personal","automated","marketing","bounce","spam","malicious"],"description":"Inbound messages by category over the range."},"verdicts":{"type":"object","properties":{"clean":{"type":"integer"},"unverified":{"type":"integer"},"suspicious":{"type":"integer"}},"required":["clean","unverified","suspicious"],"description":"Inbound messages by verdict over the range."},"risk":{"description":"Assessed inbound messages by risk level over the range, held ones included. Older deployments omit it.","type":"object","properties":{"low":{"type":"integer"},"medium":{"type":"integer"},"high":{"type":"integer"},"critical":{"type":"integer"}},"required":["low","medium","high","critical"]},"held":{"description":"Messages that were held over the range, whatever became of them. Older deployments omit it.","type":"integer"}},"required":["from","to","interval","inboxId","series","totals","categories","verdicts"],"description":"Counts per UTC hour or day over a range, with message categories and verdicts over inbound mail.","examples":[{"from":"2026-10-30T00:00:00.000Z","to":"2026-11-06T04:00:00.000Z","interval":"day","inboxId":null,"series":[{"at":"2026-10-30T00:00:00.000Z","received":140,"sent":38,"webhookDelivered":139,"webhookFailed":1}],"totals":{"received":1204,"sent":312,"webhookDelivered":1192,"webhookFailed":12},"categories":{"personal":612,"automated":341,"marketing":188,"bounce":19,"spam":38,"malicious":6},"verdicts":{"clean":1071,"unverified":112,"suspicious":21}}]},"CreateDevAccount":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"examples":["you@example.com"]},"name":{"type":"string","maxLength":200},"plan":{"type":"string","enum":["free","pro","enterprise"],"description":"Defaults to free."}},"required":["email"],"additionalProperties":false,"description":"A development account; the route exists in local mode only.","examples":[{"email":"you@example.com"}]},"DevAccount":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"},"token":{"type":"string","description":"The bootstrap key's token, shown once.","examples":["dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"]},"key":{"$ref":"#/components/schemas/ApiKey"}},"required":["account","token","key"],"description":"A development account with its first key.","examples":[{"account":{"id":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","email":"you@example.com","name":"","plan":"free"},"token":"dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8","key":{"id":"key_01jc5c0z9y8x7w6v5t4t3s2r1q","inboxId":null,"name":"bootstrap","tokenPrefix":"dm_9f3abcd","last4":"m2x8","createdAt":"2026-11-05T10:05:00.000Z","lastUsedAt":null}}]},"IdentityWebhookResult":{"type":"object","properties":{"received":{"type":"boolean","const":true},"outcome":{"type":"string","enum":["updated","deleted","suspended","unknown","conflict","ignored"],"description":"`updated` or `conflict` for user.updated, `deleted` for user.deleted, `updated` for organization.created and organization.updated, `suspended` for organization.deleted, `unknown` when no account is linked to the user or the organization, `ignored` for anything else."}},"required":["received","outcome"],"description":"What the identity provider's event did.","examples":[{"received":true,"outcome":"updated"}]},"AdminAccount":{"type":"object","properties":{"id":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","description":"An account identifier.","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]},"email":{"type":"string","maxLength":254,"format":"email","examples":["sam@example.com"]},"name":{"type":"string"},"plan":{"type":"string","enum":["free","pro","enterprise"]},"status":{"type":"string","enum":["pending","active","suspended","deleted"]},"userId":{"description":"The identity provider's user id, once a console session linked the account. Null for an organization's account.","type":["string","null"]},"kind":{"description":"Whose account it is. Older deployments omit it.","type":"string","enum":["personal","organization"]},"organizationId":{"description":"The identity provider's organization id, for an organization's account; null for a personal one. Older deployments omit it.","type":["string","null"]},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","email","name","plan","status","userId","verifiedAt","createdAt","updatedAt"],"description":"An account as the operator sees it.","examples":[{"id":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","email":"dana@example.com","name":"Dana Ortiz","plan":"free","status":"active","userId":"user_2abc","verifiedAt":"2026-11-05T10:05:00.000Z","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"AdminAccountDetail":{"type":"object","properties":{"id":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","description":"An account identifier.","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]},"email":{"type":"string","maxLength":254,"format":"email","examples":["sam@example.com"]},"name":{"type":"string"},"plan":{"type":"string","enum":["free","pro","enterprise"]},"status":{"type":"string","enum":["pending","active","suspended","deleted"]},"userId":{"description":"The identity provider's user id, once a console session linked the account. Null for an organization's account.","type":["string","null"]},"kind":{"description":"Whose account it is. Older deployments omit it.","type":"string","enum":["personal","organization"]},"organizationId":{"description":"The identity provider's organization id, for an organization's account; null for a personal one. Older deployments omit it.","type":["string","null"]},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inboxCount":{"type":"integer"},"domainCount":{"type":"integer"},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["suspend","reactivate","plan_change"]},"reason":{"type":"string"},"at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["action","reason","at"]},"description":"Newest first."}},"required":["id","email","name","plan","status","userId","verifiedAt","createdAt","updatedAt","inboxCount","actions"],"description":"An account with its inbox count and the last 20 operator actions.","examples":[{"id":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","email":"dana@example.com","name":"Dana Ortiz","plan":"pro","status":"active","userId":"user_2abc","verifiedAt":"2026-11-05T10:05:00.000Z","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z","inboxCount":3,"actions":[{"action":"plan_change","reason":"free -> pro: paid by invoice","at":"2026-11-05T10:05:00.000Z"}]}]},"AdminNameReview":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"accountId":{"type":"string","pattern":"^acc_[0-9a-hjkmnp-tv-z]{26}$","description":"An account identifier.","examples":["acc_01jc4q3x6k9m2n8p4r7t5v1w3y"]},"address":{"type":"string"},"displayName":{"type":["string","null"]},"reasons":{"type":"array","items":{"type":"string","enum":["mailboxName","displayName","signature"]},"description":"What the policy would refuse: the mailbox name, the display name, or a signature that presents the sender as the company."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["inboxId","accountId","address","displayName","reasons","createdAt"]},"description":"The inboxes of this page the policy would refuse, oldest first."},"scanned":{"type":"integer","description":"How many active shared-domain inboxes this page read."},"nextCursor":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"Pass as `cursor` to read on; null once every inbox has been read."}},"required":["data","scanned","nextCursor"],"description":"One page of the review of shared-domain inboxes against the name policy as it stands now: the ones it would refuse today. Nothing is changed by reading it.","examples":[{"data":[{"inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","accountId":"acc_01jc4q3x6k9m2n8p4r7t5v1w3y","address":"support1@doorman.example","displayName":null,"reasons":["mailboxName"],"createdAt":"2026-11-05T10:05:00.000Z"}],"scanned":500,"nextCursor":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z"}]},"AdminReason":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false,"description":"An optional reason, recorded with the action.","examples":[{"reason":"Abuse report 42"}]},"AdminPlanChange":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro","enterprise"]},"reason":{"type":"string","maxLength":500}},"required":["plan"],"additionalProperties":false,"description":"The plan to set, recorded with the reason.","examples":[{"plan":"pro","reason":"paid by invoice"}]},"StartSignIn":{"type":"object","properties":{"domain":{"description":"The service's domain or host.","type":"string","minLength":1,"maxLength":253},"clientId":{"description":"Or the relying party's id, when the service states one.","type":"string","minLength":1,"maxLength":512}},"additionalProperties":false,"description":"The service an agent wants to sign in to with the inbox's address: its domain, or the relying party's own id. One of the two.","examples":[{"domain":"app.example.net"}]},"SignInStart":{"type":"object","properties":{"status":{"type":"string","enum":["ready","approval_required","blocked","unsupported"],"description":"`ready`: open `url` in the browser that should hold the session at the service, before `expiresAt`. `approval_required`: the owner has to allow this service once, at `approvalUrl`; start again after they have. `blocked`: the owner stopped this address signing in there, and it is not to sign in there another way. `unsupported`: the service does not accept Sign in with Doorman, so sign up with its own form and the verification codes instead."},"inboxId":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"serviceId":{"anyOf":[{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},{"type":"null"}],"description":"The service in the inbox's passport, recorded when the sign-in started; null when `unsupported`."},"client":{"anyOf":[{"$ref":"#/components/schemas/SignInClientSummary"},{"type":"null"}],"description":"The relying party the sign-in is for; null when `unsupported`."},"url":{"description":"`ready` only: the single-use sign-in link. It signs this address in to this service, once. Open it in the browser that should hold the session, and never send it to anyone or write it anywhere.","type":["string","null"]},"approvalUrl":{"description":"`approval_required` only: where the owner allows the service. Tell your user; it needs their own session.","type":["string","null"]},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"`ready` only: when the link stops working."}},"required":["status","inboxId","serviceId","client","url","approvalUrl","expiresAt"],"description":"What starting a sign-in answered. Only `ready` carries a link, and the link is a secret.","examples":[{"status":"ready","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","serviceId":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","verified":true},"url":"https://doorman.example/passport/start?link=dsl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","approvalUrl":null,"expiresAt":"2026-11-05T10:10:00.000Z"},{"status":"approval_required","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","serviceId":"svc_01jc5g2b3c4d5e6f7g8h9j0k1m","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","verified":true},"url":null,"approvalUrl":"https://doorman.example/console/passport","expiresAt":null},{"status":"unsupported","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","serviceId":null,"client":null,"url":null,"approvalUrl":null,"expiresAt":null}]},"SignInApproval":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"A waiting authorization request.","examples":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]},"client":{"$ref":"#/components/schemas/SignInClientSummary"},"inboxId":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}],"description":"The address that would be signed in, when the request already says which: the browser opened a sign-in link for it, or the relying party named it. Null when the owner has to choose one."},"inboxAddress":{"examples":["concierge@doorman.example"],"type":["string","null"]},"state":{"anyOf":[{"type":"string","enum":["pending","allowed","blocked"]},{"type":"null"}],"description":"What was decided before about this address at this relying party; null when nothing was, or when no address is named yet."},"shareOwner":{"type":"boolean","description":"Whether this relying party is already told who owns the agent."},"scopes":{"type":"array","items":{"type":"string","enum":["openid","email","profile","owner_profile","owner_email"]},"description":"What the relying party asked to be told."},"ownerRequested":{"type":"boolean","description":"Whether it asked who owns the agent. The owner answers that separately, with `shareOwner`."},"redirectHost":{"type":"string","description":"Where the browser goes back to once the owner decides.","examples":["app.example.net"]},"expiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"csrf":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"Sent back with the decision. Each read replaces it.","examples":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]}},"required":["requestId","client","inboxId","inboxAddress","state","shareOwner","scopes","ownerRequested","redirectHost","expiresAt","csrf"],"description":"A sign-in that waits for the owner's decision, bound to the console session that read it. Nothing is allowed automatically.","examples":[{"requestId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","verified":true},"inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","inboxAddress":"concierge@doorman.example","state":null,"shareOwner":false,"scopes":["openid","email"],"ownerRequested":false,"redirectHost":"app.example.net","expiresAt":"2026-11-05T10:20:00.000Z","csrf":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}]},"DecideSignIn":{"type":"object","properties":{"decision":{"type":"string","enum":["allow","deny"]},"inboxId":{"description":"The address to sign in, when the request named none. Where it named one, leave it out or repeat it.","type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"shareOwner":{"description":"Whether the relying party is told who owns the agent, when it asks. Left out, a new connection does not, and an existing one keeps its choice.","type":"boolean"},"csrf":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"A waiting authorization request.","examples":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]}},"required":["decision","csrf"],"additionalProperties":false,"description":"The owner's decision on one waiting sign-in. Allowing it allows the address at that relying party from then on, until the owner stops it.","examples":[{"decision":"allow","shareOwner":false,"csrf":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"}]},"SignInDecision":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"}},"required":["redirectUrl"],"description":"Where the browser goes next: back to the relying party, with a code or with `access_denied`.","examples":[{"redirectUrl":"https://app.example.net/auth/callback?state=af0ifjsldkj&iss=https%3A%2F%2Fid.doorman.example&code=dsc_zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"}]},"SignInLinkRequest":{"type":"object","properties":{"link":{"type":"string","pattern":"^dsl_[A-Za-z0-9_-]{43}$","description":"The secret a sign-in link carries: single use, 5 minutes.","examples":["dsl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]}},"required":["link"],"additionalProperties":false,"description":"A sign-in link, as the web app's server presents it for the browser that opened it.","examples":[{"link":"dsl_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}]},"SignInLinkPreview":{"type":"object","properties":{"inboxAddress":{"type":"string","examples":["concierge@doorman.example"]},"client":{"$ref":"#/components/schemas/SignInClientSummary"},"expiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["inboxAddress","client","expiresAt"],"description":"What a sign-in link is for, so the page can say it before anyone continues. It carries no secret.","examples":[{"inboxAddress":"concierge@doorman.example","client":{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","verified":true},"expiresAt":"2026-11-05T10:10:00.000Z"}]},"SignInLinkOpened":{"type":"object","properties":{"binding":{"type":"string","pattern":"^dsb_[A-Za-z0-9_-]{43}$","description":"What ties one browser to the sign-in it opened.","examples":["dsb_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"]},"bindingExpiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"startUrl":{"type":"string","format":"uri","description":"Where the browser continues: the relying party's start URL with `iss` and `login_hint`, or its own front page when it registered none."}},"required":["binding","bindingExpiresAt","startUrl"],"description":"The link is spent. The web app keeps `binding` in a short-lived cookie on its own origin and sends the browser to `startUrl`.","examples":[{"binding":"dsb_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy","bindingExpiresAt":"2026-11-05T10:10:00.000Z","startUrl":"https://app.example.net/auth/doorman?iss=https%3A%2F%2Fid.doorman.example&login_hint=concierge%40doorman.example"}]},"ResumeSignIn":{"type":"object","properties":{"requestId":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$","description":"A waiting authorization request.","examples":["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]},"binding":{"description":"From the browser's cookie. Left out when the browser holds none.","type":"string","pattern":"^dsb_[A-Za-z0-9_-]{43}$","examples":["dsb_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"]}},"required":["requestId"],"additionalProperties":false,"description":"A waiting authorization request, and the binding its browser holds when it opened a sign-in link.","examples":[{"requestId":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","binding":"dsb_yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"}]},"SignInResumed":{"type":"object","properties":{"status":{"type":"string","enum":["redirect","approval_required"]},"redirectUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}],"description":"`redirect` only: back to the relying party, with a code or with an error."},"approvalUrl":{"description":"`approval_required` only: where the owner decides, in the console.","type":["string","null"]}},"required":["status","redirectUrl","approvalUrl"],"description":"What became of a waiting authorization request: the browser goes back to the relying party, or the owner has to decide first.","examples":[{"status":"redirect","redirectUrl":"https://app.example.net/auth/callback?state=af0ifjsldkj&iss=https%3A%2F%2Fid.doorman.example&code=dsc_zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz","approvalUrl":null},{"status":"approval_required","redirectUrl":null,"approvalUrl":"https://doorman.example/console/passport/sign-in?request=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]},"CreateSignInClient":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"What the service calls itself. People are shown the host beside it."},"host":{"type":"string","minLength":1,"maxLength":253,"description":"The host agents sign in at. A public name the service can prove is its own, or `localhost`, `127.0.0.1` or `[::1]` while developing: a relying party on your own machine signs in your own addresses only.","examples":["app.example.net"]},"redirectUris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"startUrl":{"description":"Where the service starts a Sign in with Doorman (OpenID Connect's `initiate_login_uri`). A sign-in link sends the browser there with `iss` and `login_hint`. Without one, the browser is sent to the service's front page.","type":"string","minLength":1,"maxLength":2048},"tokenEndpointAuthMethod":{"description":"Defaults to `client_secret_basic`. A relying party with a secret may present it either way. `none` registers a public one, which holds no secret and uses S256 PKCE.","type":"string","enum":["client_secret_basic","client_secret_post","none"]}},"required":["name","host","redirectUris"],"additionalProperties":false,"description":"Register a relying party: a service that lets agents sign in with Doorman. It is identified by its host, and every URL it registers is on that host.","examples":[{"name":"Example Tools","host":"app.example.net","redirectUris":["https://app.example.net/auth/callback"],"startUrl":"https://app.example.net/auth/doorman"}]},"UpdateSignInClient":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"redirectUris":{"description":"Every one on the relying party's host.","minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":2048}},"startUrl":{"description":"On the relying party's host. Null removes it.","anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]}},"additionalProperties":false,"description":"Replace the fields given. The host never changes: register another relying party for another host.","examples":[{"name":"Example Tools Workspace"}]},"SignInClient":{"type":"object","properties":{"id":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"host":{"type":"string"},"redirectUris":{"type":"array","items":{"type":"string"}},"startUrl":{"type":["string","null"]},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post","none"]},"verified":{"type":"boolean","description":"Whether the host proved it is the relying party's own. Until it does, only addresses of the account that registered it can sign in."},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"proof":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Serve the file here, over HTTPS, without a redirect."},"body":{"type":"object","properties":{"client_id":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"proof":{"type":"string"}},"required":["client_id","proof"],"description":"The file's JSON. Other fields beside these two are ignored."}},"required":["url","body"]},{"type":"null"}],"description":"How the host proves it is the relying party's own; null for a host on the developer's own machine, which has nothing to prove."},"status":{"type":"string","enum":["active","deleted"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","name","host","redirectUris","startUrl","tokenEndpointAuthMethod","verified","verifiedAt","proof","status","createdAt","updatedAt"],"description":"A relying party a developer registered, without its secret.","examples":[{"id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","name":"Example Tools","host":"app.example.net","redirectUris":["https://app.example.net/auth/callback"],"startUrl":"https://app.example.net/auth/doorman","tokenEndpointAuthMethod":"client_secret_basic","verified":false,"verifiedAt":null,"proof":{"url":"https://app.example.net/.well-known/doorman-sign-in.json","body":{"client_id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","proof":"ccccccccccccccccccccccccccccccccccccccccccc"}},"status":"active","createdAt":"2026-11-05T10:05:00.000Z","updatedAt":"2026-11-05T10:05:00.000Z"}]},"CreatedSignInClient":{"type":"object","properties":{"id":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"name":{"type":"string"},"host":{"type":"string"},"redirectUris":{"type":"array","items":{"type":"string"}},"startUrl":{"type":["string","null"]},"tokenEndpointAuthMethod":{"type":"string","enum":["client_secret_basic","client_secret_post","none"]},"verified":{"type":"boolean","description":"Whether the host proved it is the relying party's own. Until it does, only addresses of the account that registered it can sign in."},"verifiedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"proof":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Serve the file here, over HTTPS, without a redirect."},"body":{"type":"object","properties":{"client_id":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"proof":{"type":"string"}},"required":["client_id","proof"],"description":"The file's JSON. Other fields beside these two are ignored."}},"required":["url","body"]},{"type":"null"}],"description":"How the host proves it is the relying party's own; null for a host on the developer's own machine, which has nothing to prove."},"status":{"type":"string","enum":["active","deleted"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"updatedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"clientSecret":{"type":["string","null"]}},"required":["id","name","host","redirectUris","startUrl","tokenEndpointAuthMethod","verified","verifiedAt","proof","status","createdAt","updatedAt","clientSecret"],"description":"A new relying party and, unless it is a public one, its secret, shown once."},"SignInClientList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SignInClient"}}},"required":["data"],"description":"The relying parties the account registered, oldest first."},"SignInClientSecret":{"type":"object","properties":{"id":{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"clientSecret":{"type":"string"}},"required":["id","clientSecret"],"description":"A relying party's new secret, shown once. The one before it stops working at once."},"SignInAuthorization":{"type":"object","properties":{"response_type":{"type":"string","const":"code"},"client_id":{"anyOf":[{"type":"string","pattern":"^sic_[0-9a-hjkmnp-tv-z]{26}$","description":"A registered relying party's identifier.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},{"type":"string","maxLength":512,"description":"The URL of a Client ID Metadata Document: the client's name and redirects, published by the client on its own host.","examples":["https://agent.example.com/oauth/client.json"]}],"description":"A relying party's id: one this API issued, or the URL of the identity document it published on its own host.","examples":["sic_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"redirect_uri":{"type":"string","minLength":1,"maxLength":2048},"scope":{"type":"string","minLength":1,"maxLength":512},"state":{"type":"string","minLength":1,"maxLength":2048},"nonce":{"type":"string","minLength":1,"maxLength":512},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43}$"},"code_challenge_method":{"type":"string","const":"S256"},"login_hint":{"type":"string","minLength":1,"maxLength":254},"prompt":{"type":"string","minLength":1,"maxLength":64}},"required":["response_type","client_id","redirect_uri"],"description":"An OpenID Connect authorization-code request. Parameters this provider does not read are ignored.","examples":[{"response_type":"code","client_id":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","redirect_uri":"https://app.example.net/auth/callback","scope":"openid email","state":"af0ifjsldkj","nonce":"n-0S6_WzA2Mj"}]},"SignInTokenRequest":{"type":"object","properties":{"grant_type":{"type":"string","const":"authorization_code"},"code":{"type":"string","minLength":1,"maxLength":256},"redirect_uri":{"type":"string","minLength":1,"maxLength":2048},"client_id":{"type":"string","minLength":1,"maxLength":512},"client_secret":{"type":"string","minLength":1,"maxLength":256},"code_verifier":{"type":"string","pattern":"^[A-Za-z0-9._~-]{43,128}$"}},"required":["grant_type","code","redirect_uri"],"description":"A form-encoded code exchange. A relying party with a secret sends it with HTTP Basic or in the body; a public one sends the PKCE verifier. Other fields are ignored.","examples":[{"grant_type":"authorization_code","code":"replace-with-the-code-from-the-callback","redirect_uri":"https://app.example.net/auth/callback"}]},"SignInTokens":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","const":"Bearer"},"expires_in":{"type":"integer","exclusiveMinimum":0},"id_token":{"type":"string","description":"An ES256 JWT. Check its signature against the published keys, and its `iss`, `aud`, `exp` and `nonce`."},"scope":{"type":"string","description":"What was granted, which may be less than was asked: who owns the agent is told only where the owner allowed it."}},"required":["access_token","token_type","expires_in","id_token","scope"],"description":"The id token, and an access token for the userinfo endpoint. There is no refresh token: a longer session is the relying party's own."},"SignInUserInfo":{"type":"object","properties":{"sub":{"type":"string","description":"The address's subject: the same at every relying party, and a new one if the address is ever given up and issued again.","examples":["f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag"]},"actor_type":{"type":"string","const":"agent","description":"Always `agent`: the one signing in is software acting for its owner."},"email":{"description":"`email`: the address.","examples":["concierge@doorman.example"],"type":"string"},"email_verified":{"type":"boolean","const":true},"name":{"description":"`profile`: the address's display name, when it has one.","type":"string"},"owner_sub":{"description":"`profile`: who owns the agent, as an identifier that is different at every relying party.","type":"string"},"owner_name":{"description":"`owner_profile`, where the owner allowed it: the owner's name.","type":"string"},"owner_email":{"description":"`owner_email`, where the owner allowed it: the owner's own address.","type":"string"},"owner_email_verified":{"type":"boolean","const":true}},"required":["sub","actor_type"],"description":"The claims about the signed-in address, read again from live state on every call.","examples":[{"sub":"f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag","actor_type":"agent","email":"concierge@doorman.example","email_verified":true}]},"SignInIdTokenClaims":{"type":"object","properties":{"iss":{"type":"string","format":"uri"},"aud":{"type":"string","description":"The relying party's id."},"iat":{"type":"integer"},"exp":{"type":"integer"},"auth_time":{"type":"integer","description":"When the sign-in link was opened, or when the owner allowed the sign-in by hand."},"jti":{"type":"string"},"nonce":{"description":"As the authorization request sent it.","type":"string"},"sub":{"type":"string","description":"The address's subject: the same at every relying party, and a new one if the address is ever given up and issued again.","examples":["f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag"]},"actor_type":{"type":"string","const":"agent","description":"Always `agent`: the one signing in is software acting for its owner."},"email":{"description":"`email`: the address.","examples":["concierge@doorman.example"],"type":"string"},"email_verified":{"type":"boolean","const":true},"name":{"description":"`profile`: the address's display name, when it has one.","type":"string"},"owner_sub":{"description":"`profile`: who owns the agent, as an identifier that is different at every relying party.","type":"string"},"owner_name":{"description":"`owner_profile`, where the owner allowed it: the owner's name.","type":"string"},"owner_email":{"description":"`owner_email`, where the owner allowed it: the owner's own address.","type":"string"},"owner_email_verified":{"type":"boolean","const":true}},"required":["iss","aud","iat","exp","auth_time","jti","sub","actor_type"],"description":"What an id token carries: the protocol's own fields and the claims the granted scopes allow.","examples":[{"iss":"https://id.doorman.example","aud":"sic_01jc5f1a2b3c4d5e6f7g8h9j0k","iat":1793959500,"exp":1793960100,"auth_time":1793959490,"jti":"ddddddddddddddddddddddddddddddddddddddddddd","nonce":"n-0S6_WzA2Mj","sub":"f0Jx2kQp9wLr7TzV3mYb8nHc5dGs1aKe4uWq6oPi0Ag","actor_type":"agent","email":"concierge@doorman.example","email_verified":true}]},"SignInDiscovery":{"type":"object","properties":{"issuer":{"type":"string","format":"uri"},"authorization_endpoint":{"type":"string","format":"uri"},"token_endpoint":{"type":"string","format":"uri"},"userinfo_endpoint":{"type":"string","format":"uri"},"jwks_uri":{"type":"string","format":"uri"},"response_types_supported":{"type":"array","items":{"type":"string","const":"code"}},"response_modes_supported":{"type":"array","items":{"type":"string","const":"query"}},"grant_types_supported":{"type":"array","items":{"type":"string","const":"authorization_code"}},"subject_types_supported":{"type":"array","items":{"type":"string","const":"public"}},"id_token_signing_alg_values_supported":{"type":"array","items":{"type":"string","const":"ES256"}},"scopes_supported":{"type":"array","items":{"type":"string","enum":["openid","email","profile","owner_profile","owner_email"]}},"claims_supported":{"type":"array","items":{"type":"string","enum":["sub","actor_type","email","email_verified","name","owner_sub","owner_name","owner_email","owner_email_verified","iss","aud","iat","exp","auth_time","jti","nonce"]}},"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string","enum":["client_secret_basic","client_secret_post","none"]}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string","const":"S256"}},"authorization_response_iss_parameter_supported":{"type":"boolean","const":true},"client_id_metadata_document_supported":{"type":"boolean","const":true},"request_parameter_supported":{"type":"boolean","const":false},"request_uri_parameter_supported":{"type":"boolean","const":false},"claims_parameter_supported":{"type":"boolean","const":false}},"required":["issuer","authorization_endpoint","token_endpoint","userinfo_endpoint","jwks_uri","response_types_supported","response_modes_supported","grant_types_supported","subject_types_supported","id_token_signing_alg_values_supported","scopes_supported","claims_supported","token_endpoint_auth_methods_supported","code_challenge_methods_supported","authorization_response_iss_parameter_supported","client_id_metadata_document_supported","request_parameter_supported","request_uri_parameter_supported","claims_parameter_supported"],"description":"OpenID Connect discovery for Sign in with Doorman.","examples":[{"issuer":"https://id.doorman.example","authorization_endpoint":"https://id.doorman.example/sign-in/authorize","token_endpoint":"https://id.doorman.example/sign-in/token","userinfo_endpoint":"https://id.doorman.example/sign-in/userinfo","jwks_uri":"https://id.doorman.example/sign-in/jwks.json","response_types_supported":["code"],"response_modes_supported":["query"],"grant_types_supported":["authorization_code"],"subject_types_supported":["public"],"id_token_signing_alg_values_supported":["ES256"],"scopes_supported":["openid","email","profile","owner_profile","owner_email"],"claims_supported":["sub","actor_type","email","email_verified","name","owner_sub","owner_name","owner_email","owner_email_verified","iss","aud","iat","exp","auth_time","jti","nonce"],"token_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post","none"],"code_challenge_methods_supported":["S256"],"authorization_response_iss_parameter_supported":true,"client_id_metadata_document_supported":true,"request_parameter_supported":false,"request_uri_parameter_supported":false,"claims_parameter_supported":false}]},"SignInJwk":{"type":"object","properties":{"kty":{"type":"string","const":"EC"},"crv":{"type":"string","const":"P-256"},"x":{"type":"string"},"y":{"type":"string"},"kid":{"type":"string"},"use":{"type":"string","const":"sig"},"alg":{"type":"string","const":"ES256"}},"required":["kty","crv","x","y","kid","use","alg"],"description":"One public signing key: P-256, for ES256. Its `kid` is the key's RFC 7638 thumbprint."},"SignInJwks":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/SignInJwk"}}},"required":["keys"],"description":"The provider's public signing keys. A key is published before it signs and stays published until every token it signed has expired."},"SignInProtocolError":{"type":"object","properties":{"error":{"type":"string","enum":["invalid_request","invalid_client","invalid_grant","invalid_scope","unauthorized_client","unsupported_grant_type","unsupported_response_type","access_denied","login_required","interaction_required","request_not_supported","request_uri_not_supported","registration_not_supported","invalid_token","invalid_client_metadata","temporarily_unavailable","server_error"]},"error_description":{"type":"string"}},"required":["error"],"description":"A protocol error, distinct from the Inbox API's error envelope: the code, and a fixed sentence when one helps. The sentence is written by the provider and never carries text from the request.","examples":[{"error":"invalid_grant"}]},"PushSubscription":{"type":"object","properties":{"id":{"type":"string","pattern":"^psh_[0-9a-hjkmnp-tv-z]{26}$","description":"A push subscription's identifier.","examples":["psh_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"lastDeliveredAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When a push service last accepted a notification for it; null until the first."}},"required":["id","createdAt","lastDeliveredAt"],"description":"One browser on one device that the owner switched notifications on for. The address notifications are sent to is never answered.","examples":[{"id":"psh_01jc5f1a2b3c4d5e6f7g8h9j0k","createdAt":"2026-11-05T10:05:00.000Z","lastDeliveredAt":null}]},"PushSettings":{"type":"object","properties":{"available":{"type":"boolean","description":"Whether this deployment has notifications configured. Where it has not, there is no key and nothing can be subscribed."},"publicKey":{"description":"The application server key a browser subscribes with: an uncompressed P-256 point in base64url. Null where notifications are not configured.","examples":["BAa0PjquH4AsQaDVl7stumrfQkF25D5eq5cDI3vLILFFIArx2o3ucteiAy6y5sH5jGLSsn6xjD5aRv4LFNVU9TM"],"type":["string","null"]},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/PushSubscription"},"description":"At most 10."}},"required":["available","publicKey","subscriptions"],"description":"Whether this deployment can send notifications, the key a browser subscribes with, and the account's subscriptions, oldest first.","examples":[{"available":true,"publicKey":"BAa0PjquH4AsQaDVl7stumrfQkF25D5eq5cDI3vLILFFIArx2o3ucteiAy6y5sH5jGLSsn6xjD5aRv4LFNVU9TM","subscriptions":[{"id":"psh_01jc5f1a2b3c4d5e6f7g8h9j0k","createdAt":"2026-11-05T10:05:00.000Z","lastDeliveredAt":null}]}]},"CreatePushSubscription":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"format":"uri","description":"The subscription's endpoint, as the browser gave it: an https address at a push service (fcm.googleapis.com, push.services.mozilla.com, push.apple.com, notify.windows.com, or a name under one of them). An address anywhere else is refused.","examples":["https://fcm.googleapis.com/fcm/send/dQw4w9WgXcQ:APA91bHexample"]}},"required":["endpoint"],"additionalProperties":false,"description":"The address a browser was given when the owner allowed notifications there.","examples":[{"endpoint":"https://fcm.googleapis.com/fcm/send/dQw4w9WgXcQ:APA91bHexample"}]},"Member":{"type":"object","properties":{"userId":{"type":"string","pattern":"^user_[A-Za-z0-9]{1,64}$","description":"The identity provider's id of a person.","examples":["user_2abcDEF3ghiJKL"]},"email":{"type":"string","maxLength":254,"format":"email","examples":["sam@example.com"],"description":"The person's verified address, as their last session carried it."},"name":{"type":"string","description":"The person's name as their last session carried it; empty when it carried none.","examples":["Dana Ortiz"]},"role":{"type":"string","enum":["owner","admin","member","viewer"],"description":"What the person may do: `owner` and `admin` may do everything, `member` reads, changes and sends mail, `viewer` reads it."},"status":{"type":"string","enum":["active","deactivated","removed"],"description":"`active`, `deactivated` for a member who is refused until an admin lets them in again, or `removed` for one who has left."},"joinedAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When the person first worked in the organization."},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"About when the person last worked in the organization; null when never."},"invitedBy":{"anyOf":[{"type":"string","pattern":"^user_[A-Za-z0-9]{1,64}$","description":"The identity provider's id of a person.","examples":["user_2abcDEF3ghiJKL"]},{"type":"null"}],"description":"Who invited the person, when an invitation brought them in; null otherwise."},"isSelf":{"type":"boolean","description":"True for the signed-in person's own entry."}},"required":["userId","email","name","role","status","joinedAt","lastSeenAt","invitedBy","isSelf"],"description":"One person in an organization, with the role the API keeps for them.","examples":[{"userId":"user_2abcDEF3ghiJKL","email":"dana@example.com","name":"Dana Ortiz","role":"owner","status":"active","joinedAt":"2026-11-05T10:05:00.000Z","lastSeenAt":"2026-11-05T10:05:00.000Z","invitedBy":null,"isSelf":true}]},"MemberList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["data"],"description":"The organization's people, in the order they joined. Empty for a personal account."},"UpdateMember":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","member","viewer"],"description":"The new role: `owner` and `admin` may do everything, `member` reads, changes and sends mail, `viewer` reads it. Only an owner may make someone an owner or change an owner's role."}},"required":["role"],"additionalProperties":false,"description":"A member's new role.","examples":[{"role":"admin"}]},"Invitation":{"type":"object","properties":{"id":{"type":"string","pattern":"^inv_[0-9a-hjkmnp-tv-z]{26}$","description":"An invitation's identifier.","examples":["inv_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"email":{"type":"string","maxLength":254,"format":"email","examples":["sam@example.com"],"description":"The invited address."},"role":{"type":"string","enum":["owner","admin","member","viewer"],"description":"The role the person takes when they come in."},"status":{"type":"string","enum":["pending","accepted","revoked","expired"]},"invitedBy":{"type":"object","properties":{"userId":{"type":"string","pattern":"^user_[A-Za-z0-9]{1,64}$","description":"The identity provider's id of a person.","examples":["user_2abcDEF3ghiJKL"]},"name":{"type":"string","description":"The inviter's name at the time.","examples":["Dana Ortiz"]}},"required":["userId","name"],"description":"Who sent it."},"providerInvitationId":{"anyOf":[{"type":"string","pattern":"^orginv_[A-Za-z0-9]{1,64}$","description":"The identity provider's id of the invitation it sent.","examples":["orginv_2abcDEF3ghiJKL"]},{"type":"null"}],"description":"The identity provider's id of the invitation, once the console has had it sent; null until then."},"createdAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"expiresAt":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When it stops being open: 30 days after it was made or last sent again."},"acceptedAt":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}],"description":"When the person came in; null until then."}},"required":["id","email","role","status","invitedBy","providerInvitationId","createdAt","expiresAt","acceptedAt"],"description":"What an invitation to the organization is meant to grant. The identity provider sends the email; the person takes the role when they first sign in to the organization.","examples":[{"id":"inv_01jc5f1a2b3c4d5e6f7g8h9j0k","email":"sam@example.com","role":"member","status":"pending","invitedBy":{"userId":"user_2abcDEF3ghiJKL","name":"Dana Ortiz"},"providerInvitationId":null,"createdAt":"2026-11-05T10:05:00.000Z","expiresAt":"2026-12-05T10:05:00.000Z","acceptedAt":null}]},"InvitationList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}}},"required":["data"],"description":"The organization's invitations, newest first. Empty for a personal account."},"CreateInvitation":{"type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":254,"description":"The address to invite. It is stored in lowercase.","format":"email","examples":["sam@example.com"]},"role":{"default":"member","description":"The role the person takes when they come in: `owner` and `admin` may do everything, `member` reads, changes and sends mail, `viewer` reads it. Only an owner may invite an owner. Defaults to `member`.","type":"string","enum":["owner","admin","member","viewer"]}},"required":["email"],"additionalProperties":false,"description":"Who to invite, and as what.","examples":[{"email":"sam@example.com","role":"member"}]},"UpdateInvitation":{"type":"object","properties":{"providerInvitationId":{"type":"string","pattern":"^orginv_[A-Za-z0-9]{1,64}$","description":"The identity provider's id of the invitation it sent.","examples":["orginv_2abcDEF3ghiJKL"]}},"required":["providerInvitationId"],"additionalProperties":false,"description":"The identity provider's invitation that was sent for this one. Recording a different one than before means the invitation was sent again, and it stays open that much longer.","examples":[{"providerInvitationId":"orginv_2abcDEF3ghiJKL"}]},"StreamSubscribe":{"type":"object","properties":{"type":{"type":"string","const":"subscribe"},"inbox_ids":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"Up to 32 inbox ids, all of them the key's."},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","thread.updated","inbox.created","inbox.deleted","delivery.failed","message.held","send.held","send.discarded","sign_in.requested","sign_in.completed"]},"description":"Only these event types; absent or empty means all."},"last_event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"Replay every event after this one (up to 100, filtered by the subscription) before live events.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]}},"required":["type"],"description":"Start receiving events, for everything the key can see or a narrower set. Subscriptions accumulate.","examples":[{"type":"subscribe","inbox_ids":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]}]},"StreamUnsubscribe":{"type":"object","properties":{"type":{"type":"string","const":"unsubscribe"},"inbox_ids":{"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"description":"The inboxes to stop receiving for; absent or empty stops everything."}},"required":["type"],"description":"Stop receiving events: everything, or specific inboxes.","examples":[{"type":"unsubscribe"}]},"StreamPing":{"type":"object","properties":{"type":{"type":"string","const":"ping"}},"required":["type"],"description":"A keepalive the edge answers with pong without waking the stream; send one every 30 to 60 seconds through idle proxies.","examples":[{"type":"ping"}]},"StreamClientFrame":{"anyOf":[{"$ref":"#/components/schemas/StreamSubscribe"},{"$ref":"#/components/schemas/StreamUnsubscribe"},{"$ref":"#/components/schemas/StreamPing"}],"description":"A JSON text frame the client sends on /v1/ws."},"StreamSubscribed":{"type":"object","properties":{"type":{"type":"string","const":"subscribed"},"inbox_ids":{"type":"array","items":{"type":"string"}},"event_types":{"type":"array","items":{"type":"string"}}},"required":["type","inbox_ids","event_types"],"description":"The subscription in force after a subscribe frame; empty arrays mean all.","examples":[{"type":"subscribed","inbox_ids":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"],"event_types":[]}]},"StreamUnsubscribed":{"type":"object","properties":{"type":{"type":"string","const":"unsubscribed"},"inbox_ids":{"type":"array","items":{"type":"string"}}},"required":["type","inbox_ids"],"description":"The answer to an unsubscribe frame, echoing the inboxes it named.","examples":[{"type":"unsubscribed","inbox_ids":[]}]},"StreamPong":{"type":"object","properties":{"type":{"type":"string","const":"pong"}},"required":["type"],"description":"The answer to a ping.","examples":[{"type":"pong"}]},"StreamError":{"type":"object","properties":{"type":{"type":"string","const":"error"},"message":{"type":"string"}},"required":["type","message"],"description":"A frame that could not be honoured; the connection stays open.","examples":[{"type":"error","message":"last_event_id was not found on this account."}]},"StreamEvent":{"oneOf":[{"type":"object","properties":{"event":{"type":"string","const":"message.received"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"Stable across retries; deduplicate on it.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"thread_id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"rfc_message_id":{"type":["string","null"]},"from":{"type":"string","description":"The sender's address.","examples":["sam@example.com"]},"to":{"type":"string","description":"The inbox's address.","examples":["concierge@doorman.example"]},"header_to":{"description":"The first To header address, which may differ from the inbox when it was copied.","type":["string","null"]},"delivery_role":{"anyOf":[{"type":"string","enum":["to","cc","bcc"]},{"type":"null"}]},"cc":{"type":"array","items":{"type":"string"}},"address_names":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}],"description":"Display names by address, for the addresses that carried one."},"subject":{"type":"string"},"body_text":{"type":"string","description":"The plain-text body; empty when there was none."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"raw_url":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"category":{"type":"string","enum":["personal","automated","marketing","bounce","spam","malicious"]},"auto_replyable":{"type":"boolean"},"verdict":{"anyOf":[{"type":"string","enum":["clean","unverified","suspicious"]},{"type":"null"}]},"spam_score":{"type":["number","null"]},"service":{"description":"The outside service the message came from, when its sender was authenticated (DMARC passed) and it concerns an account there; null for any other mail. Events stored before the passport existed omit it.","anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"A passport service identifier.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},{"type":"null"}]},"domain":{"type":"string"},"signal":{"type":"string","enum":["verification","welcome","receipt","password_reset","security","trial","cancellation","other"]}},"required":["id","domain","signal"]},{"type":"null"}]},"verification":{"description":"The verification code or sign-in link the inbox read from the message, the same text `body_text` carries; null when it carries none. Events stored before the passport existed omit it.","anyOf":[{"type":"object","properties":{"code":{"description":"A one-time code read from the message, or null.","examples":["849204"],"type":["string","null"]},"link":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"host":{"type":"string"},"matches_sender":{"type":"boolean","description":"True when the link's registrable domain is the authenticated sender's."}},"required":["url","host","matches_sender"]},{"type":"null"}]},"verified":{"type":"boolean","description":"Whether the sender was authenticated (DMARC passed). Treat an unverified code or link with suspicion."},"invitation":{"description":"True when the link accepts an invitation to join the service. Events stored before invitations were read omit it.","type":"boolean"},"expires_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"],"description":"When the verifications read stops serving it; the service's own expiry may be sooner."}},"required":["code","link","verified","expires_at"]},{"type":"null"}]},"risk":{"description":"Doorman's assessment of the message (ADR-019): its own judgment, not text from the mail. Absent on events recorded before assessment existed and where the deployment does not assess.","$ref":"#/components/schemas/RiskAssessment"},"redaction":{"description":"What the account's healthcare guardrails found (ADR-027). When present with findings, `subject`, `body_text`, the attachments' `parsedText` and the verification code and link carry placeholders in place of them. Absent where no guardrail applies.","$ref":"#/components/schemas/Redaction"}},"required":["id","rfc_message_id","from","to","header_to","delivery_role","cc","address_names","subject","body_text","attachments","raw_url","received_at","category","auto_replyable","verdict","spam_score"]},"test":{"type":"boolean","const":true,"description":"Present on the sample a test delivery sends; nothing was received or stored."},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","thread_id","message","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"message.sent"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"thread_id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"provider_message_id":{"type":["string","null"]},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"subject":{"type":"string"},"body_text":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"sent_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"redaction":{"description":"What the account's healthcare guardrails found in what was sent (ADR-027). When present with findings, `subject`, `body_text` and the attachments' `parsedText` carry placeholders in place of them. Absent where no guardrail applies.","$ref":"#/components/schemas/Redaction"}},"required":["id","provider_message_id","from","to","cc","bcc","subject","body_text","attachments","sent_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","thread_id","message","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"thread.updated"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"thread_id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"thread":{"type":"object","properties":{"id":{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},"is_read":{"type":"boolean"},"trashed_at":{"anyOf":[{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},{"type":"null"}]},"metadata":{"$ref":"#/components/schemas/Metadata"},"labels":{"$ref":"#/components/schemas/ThreadLabels"},"updated_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","is_read","trashed_at","metadata","labels","updated_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","thread_id","thread","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"inbox.created"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"inbox":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string"},"display_name":{"type":["string","null"]},"external_id":{"type":["string","null"]},"metadata":{"$ref":"#/components/schemas/Metadata"}},"required":["id","address","display_name","external_id","metadata"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","inbox","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"inbox.deleted"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"inbox":{"type":"object","properties":{"id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"address":{"type":"string"},"deleted_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","address","deleted_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","inbox","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"delivery.failed"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"anyOf":[{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},{"type":"null"}]},"delivery":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[0-9a-hjkmnp-tv-z]{26}$","description":"A webhook delivery identifier.","examples":["whd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["inbox","endpoint"]},"id":{"type":"string"}},"required":["kind","id"]},"attempts":{"type":"integer","minimum":0},"last_status_code":{"anyOf":[{"type":"integer"},{"type":"null"}]},"last_error":{"type":"string"}},"required":["id","event_id","target","attempts","last_status_code","last_error"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","delivery","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"message.held"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-hjkmnp-tv-z]{26}$","description":"A message identifier.","examples":["msg_01jc5a6g7h8j9k0m1n2p3q4r5s"]},"from":{"type":"string","description":"The sender's address."},"held_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"risk":{"$ref":"#/components/schemas/RiskAssessment"}},"required":["id","from","held_at","risk"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","message","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"send.held"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"send":{"type":"object","properties":{"id":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","description":"A held send's identifier.","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},{"type":"null"}],"description":"The thread a reply was written into; null for a new message."},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"requested_by":{"type":"string","enum":["app","key"]},"kind":{"type":"string","enum":["held","draft"],"description":"Why it waits: `held` when the security policy kept a send, `draft` when it was written as a draft for the owner to send."},"held_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"expires_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","thread_id","to","cc","bcc","requested_by","kind","held_at","expires_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","send","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"send.discarded"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"send":{"type":"object","properties":{"id":{"type":"string","pattern":"^hsd_[0-9a-hjkmnp-tv-z]{26}$","description":"A held send's identifier.","examples":["hsd_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"thread_id":{"anyOf":[{"type":"string","pattern":"^thr_[0-9a-hjkmnp-tv-z]{26}$","description":"A thread identifier.","examples":["thr_01jc5a1b2c3d4e5f6g7h8j9k0m"]},{"type":"null"}],"description":"The thread a reply was written into; null for a new message."},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"requested_by":{"type":"string","enum":["app","key"]},"kind":{"type":"string","enum":["held","draft"],"description":"Why it waits: `held` when the security policy kept a send, `draft` when it was written as a draft for the owner to send."},"reason":{"type":"string","enum":["discarded","expired"],"description":"`discarded` by the owner, or `expired` because nobody decided in time."},"discarded_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","thread_id","to","cc","bcc","requested_by","kind","reason","discarded_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","send","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"sign_in.requested"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"sign_in":{"type":"object","properties":{"id":{"type":"string","pattern":"^sig_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of one address's connection to one relying party.","examples":["sig_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"service_id":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"The service in the address's passport that the sign-in belongs to.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},"client":{"type":"object","properties":{"id":{"type":"string","description":"The relying party's client id: one this API issued, or the URL of the identity it published."},"name":{"type":"string","description":"What the relying party calls itself. A label, never proof of who it is."},"host":{"type":"string","description":"The host that identifies the relying party."}},"required":["id","name","host"]},"requested_by":{"type":"string","enum":["app","key","owner"],"description":"Who asked: a connected app, an API key, or the owner in the console."},"requested_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","service_id","client","requested_by","requested_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","sign_in","delivered_at","attempt"]},{"type":"object","properties":{"event":{"type":"string","const":"sign_in.completed"},"event_id":{"type":"string","pattern":"^evt_[0-9a-hjkmnp-tv-z]{26}$","description":"An event identifier.","examples":["evt_01jc5e5f6g7h8j9k0m1n2p3q4r"]},"occurred_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"inbox_id":{"type":"string","pattern":"^inb_[0-9a-hjkmnp-tv-z]{26}$","description":"An inbox identifier.","examples":["inb_01jc4q7w9k2m5n8p3r6t1v4x7z"]},"sign_in":{"type":"object","properties":{"id":{"type":"string","pattern":"^sig_[0-9a-hjkmnp-tv-z]{26}$","description":"The identifier of one address's connection to one relying party.","examples":["sig_01jc5f1a2b3c4d5e6f7g8h9j0k"]},"service_id":{"type":"string","pattern":"^svc_[0-9a-hjkmnp-tv-z]{26}$","description":"The service in the address's passport that the sign-in belongs to.","examples":["svc_01jc5g2b3c4d5e6f7g8h9j0k1m"]},"client":{"type":"object","properties":{"id":{"type":"string","description":"The relying party's client id: one this API issued, or the URL of the identity it published."},"name":{"type":"string","description":"What the relying party calls itself. A label, never proof of who it is."},"host":{"type":"string","description":"The host that identifies the relying party."}},"required":["id","name","host"]},"completed_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]}},"required":["id","service_id","client","completed_at"]},"delivered_at":{"type":"string","format":"date-time","examples":["2026-11-05T10:05:00.000Z"]},"attempt":{"type":"number","const":1}},"required":["event","event_id","occurred_at","inbox_id","sign_in","delivered_at","attempt"]}],"description":"An event as the stream frames it: the webhook payload plus when it was pushed. `attempt` is always 1; a missed frame is recovered with `last_event_id`, not retried.","examples":[{"event":"message.received","event_id":"evt_01jc5e5f6g7h8j9k0m1n2p3q4r","occurred_at":"2026-11-05T10:05:00.000Z","inbox_id":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z","thread_id":"thr_01jc5a1b2c3d4e5f6g7h8j9k0m","message":{"id":"msg_01jc5a6g7h8j9k0m1n2p3q4r5s","rfc_message_id":"<a1b2c3@example.com>","from":"sam@example.com","to":"concierge@doorman.example","header_to":"concierge@doorman.example","delivery_role":"to","cc":[],"address_names":{"sam@example.com":"Sam Rivera"},"subject":"Invoice 2847","body_text":"Hi, invoice 2847 is attached.","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"}],"raw_url":"https://api.doorman.example/v1/messages/msg_01jc5a6g7h8j9k0m1n2p3q4r5s/raw","received_at":"2026-11-05T10:05:00.000Z","category":"personal","auto_replyable":true,"verdict":"clean","spam_score":null},"delivered_at":"2026-11-05T10:05:00.000Z","attempt":1}]},"StreamServerFrame":{"anyOf":[{"$ref":"#/components/schemas/StreamSubscribed"},{"$ref":"#/components/schemas/StreamUnsubscribed"},{"$ref":"#/components/schemas/StreamPong"},{"$ref":"#/components/schemas/StreamError"},{"$ref":"#/components/schemas/StreamEvent"}],"description":"A JSON text frame the server sends on /v1/ws."},"AssistantMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","tool"]},"content":{"type":"string","maxLength":8000},"toolCallId":{"type":"string","maxLength":64,"description":"On a tool message: the proposal it answers."},"name":{"type":"string","maxLength":64,"description":"On a tool message: the tool's name."}},"required":["role","content"],"additionalProperties":false,"description":"One entry of the transcript the console keeps, including the proposals it ran and what came of them.","examples":[{"role":"user","content":"How many threads are unread?"}]},"AssistantStage":{"type":"object","properties":{"routes":{"maxItems":24,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"label":{"type":"string","maxLength":80},"href":{"type":"string","maxLength":200,"pattern":"^\\/console(?:\\/|$)"},"needsInbox":{"type":"boolean"}},"required":["id","label","href","needsInbox"],"additionalProperties":false}},"landmarks":{"maxItems":96,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"routes":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"}},"label":{"type":"string","maxLength":80}},"required":["id","routes","label"],"additionalProperties":false}}},"required":["routes","landmarks"],"additionalProperties":false,"description":"The pages and controls the console can show this turn. Cues may only name these identifiers."},"AssistantStageCue":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"go"},"route":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"inboxId":{"type":["string","null"]}},"required":["id","kind","route","inboxId"]},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"point"},"landmark":{"type":"string","pattern":"^[a-z0-9-]{1,40}$"},"note":{"type":"string","minLength":1,"maxLength":120}},"required":["id","kind","landmark","note"]},{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"rounds"},"steps":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"string","maxLength":80}},"current":{"type":"integer","minimum":0,"maximum":12}},"required":["id","kind","steps","current"]}],"description":"A navigation, pointer or progress cue for the console's declared stage."},"AssistantChatRequest":{"type":"object","properties":{"messages":{"minItems":1,"maxItems":40,"type":"array","items":{"$ref":"#/components/schemas/AssistantMessage"},"description":"At most 40 messages; the last one must come from the person or be a tool result."},"context":{"type":"object","properties":{"page":{"type":"string","maxLength":500,"description":"The console path the person is on.","examples":["/console/inboxes"]},"inboxId":{"type":"string","maxLength":64,"description":"The inbox the page is about, when there is one."},"stage":{"$ref":"#/components/schemas/AssistantStage"}},"required":["page"],"additionalProperties":false}},"required":["messages","context"],"additionalProperties":false,"description":"One turn of Ask Doorman: the transcript so far and where in the console the person is.","examples":[{"messages":[{"role":"user","content":"How many threads are unread?"}],"context":{"page":"/console/inboxes","inboxId":"inb_01jc4q7w9k2m5n8p3r6t1v4x7z"}}]},"AssistantProposal":{"type":"object","properties":{"id":{"type":"string","examples":["prp_0123456789abcdefghjkmnpqrs"]},"name":{"type":"string","enum":["create_inbox","create_api_key","set_inbox_webhook","create_endpoint","send_message","mark_thread_read","delete_inbox","revoke_key","rotate_secret","delete_endpoint","set_protection","trust_sender","block_sender","release_message","discard_message","add_domain"]},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Validated arguments in the shape the console's server actions take."},"summary":{"type":"string","description":"One sentence saying what confirming does."}},"required":["id","name","args","summary"],"description":"A change the assistant wants to make. Nothing runs until the person confirms it in the console.","examples":[{"id":"prp_0123456789abcdefghjkmnpqrs","name":"create_inbox","args":{"mailboxName":"concierge"},"summary":"Create the inbox concierge@doorman.example."}]},"AssistantEvent":{"oneOf":[{"type":"object","properties":{"event":{"type":"string","const":"text"},"data":{"type":"object","properties":{"delta":{"type":"string"}},"required":["delta"]}},"required":["event","data"]},{"type":"object","properties":{"event":{"type":"string","const":"tool"},"data":{"type":"object","properties":{"name":{"type":"string","enum":["list_inboxes","get_inbox","list_threads","list_domains","get_domain","list_services","get_overview","get_usage_and_plan","list_keys","get_webhooks","get_metrics_summary","docs_lookup","read_message","get_security","list_senders","list_held"]},"summary":{"type":"string"}},"required":["name","summary"]}},"required":["event","data"]},{"type":"object","properties":{"event":{"type":"string","const":"proposal"},"data":{"$ref":"#/components/schemas/AssistantProposal"}},"required":["event","data"]},{"type":"object","properties":{"event":{"type":"string","const":"stage"},"data":{"$ref":"#/components/schemas/AssistantStageCue"}},"required":["event","data"]},{"type":"object","properties":{"event":{"type":"string","const":"done"},"data":{"type":"object","properties":{}}},"required":["event","data"]},{"type":"object","properties":{"event":{"type":"string","const":"error"},"data":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["event","data"]}],"description":"The named events of the assistant's response stream: `event: <name>` then the JSON on one `data:` line. A turn ends with `done` or `error`; a `proposal` ends it too.","examples":[{"event":"text","data":{"delta":"Three threads are unread."}},{"event":"tool","data":{"name":"list_threads","summary":"Listed 3 unread threads in concierge@doorman.example"}},{"event":"done","data":{}}]}},"securitySchemes":{"oauth":{"type":"oauth2","description":"An expiring app token bound to a consented installation and resource. Keys and console sessions remain separate.","flows":{"authorizationCode":{"authorizationUrl":"https://api.doorman.fyi/oauth/authorize","tokenUrl":"https://api.doorman.fyi/oauth/token","scopes":{"account:read":"Read account identity, plan, usage and aggregate activity.","inboxes:read":"Read inbox addresses, metadata and activity summaries.","inboxes:write":"Create, update and delete inboxes.","mail:read":"Read messages, threads, attachments and mail-bearing events, and the services and verification codes found in mail.","mail:write":"Change thread read state, metadata and labels, trash threads, record the services an address signs up for, and start a sign-in the owner allows.","mail:send":"Send mail and replies from the account's inboxes.","mail:draft":"Write drafts for the owner to send. It sends nothing.","events:read":"Read and stream the event log, including message content.","webhooks:manage":"Manage this installation's webhook endpoints and deliveries.","rules:manage":"Manage this installation's durable inbound rules."}}}},"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"dm_ API key","description":"An API key from the console (account scope) or from `POST /v1/inboxes/{inboxId}/api-keys` (inbox scope)."},"session":{"type":"http","scheme":"bearer","bearerFormat":"console session token","description":"The console's session token, verified against the identity provider's public key. Not accepted on the stream."},"operator":{"type":"http","scheme":"bearer","bearerFormat":"operator token","description":"The deployment's `DOORMAN_ADMIN_TOKEN`."},"signInToken":{"type":"http","scheme":"bearer","bearerFormat":"dst_ access token","description":"The access token a relying party received when it exchanged a sign-in's code. It reads the userinfo endpoint and nothing else, and no API credential is accepted in its place."}}},"x-doorman-limits":{"oauth":{"appsPerAccount":25,"installsPerAccount":100,"redirectUris":10,"pendingPerClient":100,"pendingGlobal":10000,"dynamicClients":2000,"dynamicClientTtlMs":2592000000,"consentTtlMs":900000,"codeTtlMs":60000,"accessTtlMs":900000,"refreshTtlMs":2592000000,"refreshAbsoluteTtlMs":31536000000,"requestBytes":16384,"metadataClients":2000,"metadataUrlLength":512,"metadataBytes":8192,"metadataTimeoutMs":5000,"metadataFreshMs":86400000,"metadataClientTtlMs":34560000000,"metadataRedirectUris":20},"metadata":{"maxKeys":20,"maxKeyLength":64,"maxBytes":2048},"labels":{"maxLabels":20,"maxLength":64},"rules":{"perInbox":25,"maxActions":5,"maxNameLength":100,"maxSubjectMatchLength":200,"maxTemplateLength":10000,"maxOutboundActionsPerMessage":1},"inboxes":{"mailboxNameMin":3,"mailboxNameMax":30,"reservedMailboxNames":["abuse","account","accounts","admin","administrator","alerts","api","auth","billing","bounce","bounces","bugs","careers","ceo","cfo","clerk","cloudflare","community","compliance","contact","cto","customers","demo","dev","developers","devops","dkim","dmarc","dns","do-not-reply","docs","donotreply","doorman","email","engineering","enterprise","entri","feedback","finance","founder","founders","hello","help","helpdesk","hi","hostmaster","hr","identity","inbox","inboxes","info","infra","investors","invoice","invoices","jobs","legal","login","mail","mailer","mailer-daemon","marketing","mcp","media","news","newsletter","no-reply","noreply","notification","notifications","notify","oauth","official","onboarding","ops","owner","partners","partnerships","password","pay","payment","payments","payroll","postmaster","press","pricing","privacy","product","register","registration","resend","reset","root","sales","security","service","services","signin","signup","spf","sso","staff","status","support","sysadmin","system","team","terms","test","testing","theovex","trust","unsubscribe","update","updates","upgrade","user","users","vercel","verification","verified","verify","webhook","webhooks","webmaster","welcome","www"],"infrastructureMailboxNames":["abuse","admin","administrator","api","bounce","bounces","dkim","dmarc","do-not-reply","donotreply","doorman","hostmaster","mailer-daemon","mcp","no-reply","noreply","postmaster","root","security","spf","sysadmin","webmaster","www"],"impersonationMailboxTokens":["abuse","account","accounts","admin","administrator","alert","alerts","billing","bounce","bounces","care","ceo","cfo","compliance","contact","cto","daemon","finance","founder","founders","fraud","help","helpdesk","hr","info","invoice","invoices","legal","login","mailer","noreply","notification","notifications","notify","official","onboarding","password","payment","payments","payroll","postmaster","press","privacy","recovery","refund","refunds","sales","security","service","signin","staff","success","support","system","team","trust","update","updates","verification","verified","verify","welcome"],"roleFillerWords":["center","centre","department","dept","desk","email","group","mail","my","office","our","the","your"],"companyClaimWords":["admin","administrator","alerts","billing","ceo","cfo","compliance","cto","department","dept","employee","founder","founders","helpdesk","hr","legal","notifications","official","payroll","representative","safety","security","staff","support","team","trust","verification"],"protectedBrandStems":["doorman","theovex"],"releasedAddressHoldMs":15552000000,"releasedAddressWithServicesHoldMs":3153600000000,"displayNameMax":100,"signatureMax":1000,"signatureHtmlMax":10000,"activePerAccountCeiling":100},"services":{"perInbox":500,"nameMax":100,"noteMax":500,"planNameMax":100,"planAmountMax":1000000000,"verificationWindowMs":3600000,"invitationWindowMs":1209600000,"explanationWindowMs":900000,"unexplainedAfterMs":120000,"alertCooldownMs":3600000,"alertsPerDay":20,"maxWaitSeconds":20,"maxVerifications":20,"evidenceMax":20},"signIn":{"linkTtlMs":300000,"bindingTtlMs":300000,"liveLinksPerInbox":5,"startsPerMinute":10,"requestTtlMs":900000,"pendingPerClient":100,"pendingGlobal":10000,"codeTtlMs":60000,"tokenTtlMs":600000,"discoveryMaxAgeSeconds":300,"clientsPerAccount":25,"redirectUris":10,"clientNameMax":100,"metadataClients":2000,"connectionsPerInbox":500,"requestBytes":16384,"proofBytes":8192,"proofTimeoutMs":5000,"scopes":{"openid":"The agent's subject: a stable identifier for the address, and that it is an agent. Every sign-in carries it.","email":"The address the agent signs in as, which the service can write to.","profile":"The address's display name, and an identifier for its owner that is different at every service.","owner_profile":"The name of the person or organization that owns the agent. Released only where the owner allowed it for that service.","owner_email":"The owner's own email address. Released only where the owner allowed it for that service."}},"keys":{"activePerAccount":20,"activePerInbox":20},"domains":{"activePerAccountCeiling":50,"nameMax":253,"verifyIntervalMs":30000,"unverifiedTtlMs":604800000,"createsPerWindow":20,"createWindowMs":86400000},"endpoints":{"perAccount":20},"pages":{"limitDefault":50,"limitMax":100},"send":{"perMinute":10,"perDay":200,"sharedDomainAccountPerDay":500,"newAccountSharedDomainPerDay":20,"warmUpMs":604800000,"maxRecipients":50,"maxAttachments":32,"maxMessageBytes":26214400,"maxSubjectCharacters":998,"maxBodyCharacters":2000000,"idempotencyTtlMs":86400000},"webhooks":{"timeoutMs":15000,"retrySeconds":[30,60,120,240],"attempts":5},"stream":{"connectionsPerAccount":10,"messagesPerWindow":30,"windowMs":10000,"replayMax":100,"maxInboxFilters":32,"closeCodes":{"unauthorized":4001,"connectionLimit":4008,"rateLimit":4029}},"metrics":{"maxRangeDays":90,"maxHourRangeDays":7,"defaultRangeDays":7},"security":{"levelFloors":{"low":0,"medium":30,"high":60,"critical":85},"defaultLevel":"balanced","presets":{"relaxed":{"warnAt":60,"holdAt":null,"holdUnauthenticatedNewSenders":false,"replyGuard":false,"recipients":"any","unscannable":"deliver"},"balanced":{"warnAt":60,"holdAt":85,"holdUnauthenticatedNewSenders":false,"replyGuard":true,"recipients":"any","unscannable":"warn"},"strict":{"warnAt":30,"holdAt":60,"holdUnauthenticatedNewSenders":true,"replyGuard":true,"recipients":"known","unscannable":"hold"}},"senderRulesPerAccount":2000,"maxReasons":12,"knownAfterMessages":3,"knownAfterMs":604800000,"previewMaxCharacters":20000},"assistant":{"turnsPerWindow":30,"windowMs":300000,"maxMessages":40},"plans":{"free":{"label":"Free","priceUsd":0,"inboxes":3,"sendsPerMonth":3000,"domains":0},"pro":{"label":"Unlimited","priceUsd":9,"inboxes":null,"sendsPerMonth":null,"domains":10},"enterprise":{"label":"Enterprise","priceUsd":null,"inboxes":null,"sendsPerMonth":null,"domains":null}}},"x-doorman-errors":{"unauthorized":{"status":401,"description":"The credential was missing, malformed, revoked or belongs to an inactive account."},"session_invalid":{"status":401,"description":"The console session token could not be verified."},"session_expired":{"status":401,"description":"The console session token has expired."},"session_claims_missing":{"status":401,"description":"The session token does not carry a verified email address."},"plan_limit_reached":{"status":402,"description":"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."},"seat_required":{"status":402,"description":"The organization has no seat free for another person. `seats` is how many its subscription pays for, or null when it has no Teams subscription yet; `used` is how many are held by members and open invitations; `seatPriceUsd` is what one more costs a month. Someone who may manage billing can start the Teams plan or add a seat."},"payment_failed":{"status":402,"description":"The payment provider could not charge for the change, so nothing was changed. The card on file can be replaced in the billing portal."},"forbidden":{"status":403,"description":"The key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data."},"permission_denied":{"status":403,"description":"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."},"member_deactivated":{"status":403,"description":"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."},"organization_required":{"status":403,"description":"The operation acts on an organization, and the session is in a personal account. Switch to the organization first."},"owner_required":{"status":403,"description":"Only an owner of the organization may make someone an owner, invite an owner or change an owner's role."},"insufficient_scope":{"status":403,"description":"The app's token lacks a required scope, or the operation cannot be delegated."},"session_required":{"status":403,"description":"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."},"account_suspended":{"status":403,"description":"The account is suspended."},"account_deleted":{"status":403,"description":"The account was deleted."},"inbox_suspended":{"status":403,"description":"The inbox cannot send, or start a sign-in, at the moment."},"recipient_not_permitted":{"status":403,"description":"A recipient is not permitted for this deployment."},"risk_blocked":{"status":403,"description":"The send or the download was refused; `guard` says why: `reply` when the thread holds a flagged message whose sender is not trusted, `recipient` when a recipient is not one the inbox knows, `content` when an attachment did not pass the check of its bytes (`reasons` lists what was found), `guardrail` when a healthcare guardrail found what may not be sent (`entities` lists the kinds). For `reply` and `recipient` a person can send from the console, mark the message safe or trust the sender. For `content`, a program or a file dressed as another kind is refused for every caller; a locked or damaged file, a script, or a document with macros, is refused for keys and app tokens only. A link that delivered harmful software when it was opened in isolation is refused for every caller."},"baa_required":{"status":403,"description":"Changing 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."},"guardrail_blocked":{"status":403,"description":"A healthcare guardrail keeps this content from keys and apps: the original message, its HTML body or an attachment's bytes carry what the account's guardrails redact, and bytes cannot be redacted. `entities` lists the kinds that were found, never the text. The message's text is available with the findings replaced; a person with `phi:read` reads the original in the console."},"not_found":{"status":404,"description":"No such resource for this caller, or no such route."},"thread_not_found":{"status":404,"description":"The thread does not exist, belongs to another inbox or was trashed."},"validation_error":{"status":400,"description":"A field is missing or invalid; the message names it."},"invalid_json":{"status":400,"description":"The request body is not JSON."},"invalid_form":{"status":400,"description":"The multipart body could not be parsed."},"recipient_suppressed":{"status":400,"description":"A recipient previously bounced or complained and is suppressed."},"send_rejected":{"status":400,"description":"The sending provider rejected the message; `providerCode` carries its reason."},"webhook_rejected":{"status":400,"description":"The identity provider's webhook signature could not be verified."},"method_not_allowed":{"status":405,"description":"The MCP endpoint takes POST only: it is stateless, with no stream to open and no session to end."},"already_exists":{"status":409,"description":"The mailbox name or the `externalId` is already in use (`field` says which), or another account holds the custom domain, here or at the mail transport."},"limit_reached":{"status":409,"description":"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."},"no_webhook":{"status":409,"description":"The inbox has no webhook to rotate a secret for."},"delivery_pending":{"status":409,"description":"The delivery is already queued; wait for the attempt to finish."},"idempotency_in_progress":{"status":409,"description":"A request with this Idempotency-Key is still being processed."},"not_suspended":{"status":409,"description":"The account is not suspended."},"already_subscribed":{"status":409,"description":"The account is already on a paid plan, so there is nothing to check out."},"no_subscription":{"status":409,"description":"The account has never paid through the payment provider, so there is no billing to manage; or, where seats are changed, it has no Teams subscription that is active."},"seat_change_pending":{"status":409,"description":"Another change to the organization's seats is still being made at the payment provider. Try again in a moment."},"seats_in_use":{"status":409,"description":"The organization holds more seats than the number asked for: `used` says how many. Remove a member or take an invitation back first."},"account_mismatch":{"status":409,"description":"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."},"last_owner":{"status":409,"description":"The member is the organization's only active owner. Make someone else an owner first."},"already_member":{"status":409,"description":"The invited address already belongs to a member of the organization."},"already_invited":{"status":409,"description":"The address already has an open invitation to the organization. Take it back first, or send it again."},"organization_not_empty":{"status":409,"description":"The organization's account has been used, or an account was already moved into the organization, so another account cannot be moved in. Used means that an inbox, key, domain or app was created in it, even one since deleted, that it has a webhook endpoint, or that the operator changed it."},"message_too_large":{"status":413,"description":"The message exceeds the size limit, including attachments."},"idempotency_key_reused":{"status":422,"description":"This Idempotency-Key was already used for a different request."},"upgrade_required":{"status":426,"description":"The stream needs a WebSocket upgrade."},"rate_limit_exceeded":{"status":429,"description":"A per-inbox or per-account rate limit; `Retry-After` and `resetsAt` say when to try again."},"provider_rate_limited":{"status":429,"description":"The sending provider is rate limiting this deployment."},"internal_error":{"status":500,"description":"Something went wrong on the server."},"send_failed":{"status":502,"description":"The sending provider did not accept or could not deliver the message; `providerCode` carries its reason."},"sending_paused":{"status":503,"description":"Sending is paused for this deployment pending review."},"sending_unavailable":{"status":503,"description":"The inbox domain is not onboarded for sending, or sending is not configured."},"scan_unavailable":{"status":503,"description":"The malware engine did not answer in time, so an attachment could not be checked and nothing was sent. Try again after `Retry-After`; an `Idempotency-Key` makes the retry safe."},"assistant_unavailable":{"status":503,"description":"The assistant is not configured for this deployment."},"custom_domains_unavailable":{"status":503,"description":"The custom-domain mail transport and inbound webhook are not fully configured."},"connect_unavailable":{"status":503,"description":"Automatic DNS setup is not configured; publish the records manually."},"push_unavailable":{"status":503,"description":"Notifications are not configured for this deployment."},"domain_not_verified":{"status":409,"description":"The custom domain has not verified its required DNS records."},"host_proof_failed":{"status":409,"description":"The relying party's host did not serve the proof file it was given; the message says what was found instead. Publish the file and verify again."},"provider_unavailable":{"status":502,"description":"The mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials."},"queue_unavailable":{"status":503,"description":"The inbound event could not be queued; retry the signed webhook."}},"x-doorman-permissions":{"permissions":{"mail:read":"Read threads, messages, attachments and the events that carry mail, who an inbox has corresponded with and its held stubs, and the passport that mail fills: the services an address is signed up for and the codes they send.","mail:write":"Change a thread's read state, metadata and labels, trash threads, and record a service an address is signed up for. It works together with reading mail: a changed thread is shown to whoever changed it.","mail:send":"Send mail and replies from the account's inboxes. It works together with reading mail: a reply quotes the thread it answers.","inboxes:manage":"Create, change and delete inboxes and their inbound rules, and change or remove the services in an address's passport.","security:manage":"Change security policies and sender rules, review, release or discard held mail, and mark messages safe or unsafe.","keys:manage":"Mint and revoke API keys. A key is not held to these permissions, so this one reaches everything a key can do.","webhooks:manage":"Manage webhook endpoints, the inbox webhooks and their signing secrets, and retry deliveries.","domains:manage":"Add, verify and remove custom domains.","apps:manage":"Register and manage the account's developer apps and their client secrets.","agents:connect":"Allow or refuse an agent or app that asks for access to the account, and disconnect one.","members:manage":"Invite people to the organization, take an invitation back, and change a member's role.","billing:manage":"Start a checkout for the paid plan, open the billing portal and read billing again from the payment provider.","account:manage":"Change the account itself, such as moving a personal account into the organization.","compliance:manage":"Sign or end the business associate agreement, and change the healthcare guardrails and the custom guardrails.","phi:read":"Read mail in the console as it arrived, where healthcare guardrails redact it for everyone else. Each such read of a message that carries findings is recorded."},"roles":{"admin":"org:admin","member":"org:member"},"memberPermissions":["mail:read","mail:write","mail:send"],"inlineProvisioning":{"key":["keys:manage"],"webhookUrl":["webhooks:manage","mail:read"]},"accountHeader":"x-doorman-account"},"x-doorman-risk-reasons":{"dmarc_fail":{"family":"identity","label":"impersonation","description":"The message failed the check the sender's own domain publishes for its mail."},"spf_fail":{"family":"identity","label":null,"description":"The server that sent the message is not one the sender's domain allows."},"dkim_fail":{"family":"identity","label":null,"description":"The message's signature did not match its content."},"auth_missing":{"family":"identity","label":null,"description":"Nothing proves the message comes from the domain it names."},"reply_to_mismatch":{"family":"identity","label":"phishing","description":"A reply would go to a different domain than the one the message says it is from."},"envelope_mismatch":{"family":"identity","label":null,"description":"The address the message was sent from is not the one it shows."},"display_name_address":{"family":"identity","label":"impersonation","description":"The sender's name is written to look like a different email address."},"display_name_impersonation":{"family":"identity","label":"impersonation","description":"The sender uses the name of someone this address knows, from a different address."},"lookalike_domain":{"family":"identity","label":"impersonation","description":"The sender's domain imitates one this address trusts."},"trusted_sender_unauthenticated":{"family":"identity","label":"impersonation","description":"The message claims to be from a trusted sender, but nothing proves it."},"self_spoof":{"family":"identity","label":"impersonation","description":"The message claims to come from this address or its own domain, without proof."},"sender_authentication_dropped":{"family":"identity","label":"impersonation","description":"Earlier mail from this sender proved where it came from, and this message does not."},"first_time_sender":{"family":"identity","label":null,"description":"This address has never heard from this sender before."},"hidden_text":{"family":"structure","label":"prompt_injection","description":"The message carries text a person reading it would not see."},"text_html_mismatch":{"family":"structure","label":"prompt_injection","description":"The plain version and the formatted version of the message say different things."},"invisible_characters":{"family":"structure","label":"prompt_injection","description":"The message uses invisible or direction-changing characters."},"mixed_script":{"family":"structure","label":"phishing","description":"Words in the message mix alphabets to look like other words."},"fence_forgery":{"family":"structure","label":"prompt_injection","description":"The message imitates the markers that separate mail from an agent's own instructions."},"role_tags":{"family":"structure","label":"prompt_injection","description":"The message imitates instructions from a system or an assistant."},"encoded_payload":{"family":"structure","label":null,"description":"The message carries a block of encoded text."},"instruction_override":{"family":"injection","label":"prompt_injection","description":"The message tells its reader to ignore or replace the instructions it was given."},"role_reassignment":{"family":"injection","label":"prompt_injection","description":"The message tries to give its reader a new role."},"system_prompt_probe":{"family":"injection","label":"prompt_injection","description":"The message asks its reader to reveal its instructions or its setup."},"tool_request":{"family":"injection","label":"prompt_injection","description":"The message asks its reader to act by itself: to forward, send, delete or run something."},"exfiltration_request":{"family":"injection","label":"prompt_injection","description":"The message asks for other mail, passwords or private data to be sent out."},"secrecy_request":{"family":"injection","label":"prompt_injection","description":"The message asks its reader to hide what it does from the person it works for."},"addresses_ai":{"family":"injection","label":null,"description":"The message speaks to an AI assistant, not to a person."},"credential_request":{"family":"deception","label":"phishing","description":"The message asks for a password, a code or sign-in details."},"payment_request":{"family":"deception","label":"scam","description":"The message asks for a payment, a transfer or a change of payment details."},"urgency_pressure":{"family":"deception","label":null,"description":"The message presses for action right away."},"link_mismatch":{"family":"deception","label":"phishing","description":"A link shows one destination and leads to another."},"suspicious_link":{"family":"deception","label":"phishing","description":"A link hides where it leads, behind a shortener, a bare number or a look-alike name."},"risky_attachment":{"family":"deception","label":"malware","description":"An attachment is of a kind often used to carry harmful software."},"attachment_disguise":{"family":"deception","label":"malware","description":"An attachment's name hides what it really is."},"executable_content":{"family":"deception","label":"malware","description":"An attachment is a program, or carries one."},"type_mismatch":{"family":"deception","label":"malware","description":"An attachment is not the kind of file its name or its type says it is."},"macro_document":{"family":"deception","label":"malware","description":"An attached document carries macros, which run when it is opened."},"active_document":{"family":"deception","label":"malware","description":"An attached document carries script or a form that acts when it is opened."},"archive_bomb":{"family":"deception","label":"malware","description":"An attached archive is built to unpack into far more data than it holds."},"encrypted_archive":{"family":"deception","label":null,"description":"An attachment is locked with a password, so what is inside could not be checked."},"corrupt_attachment":{"family":"deception","label":null,"description":"An attachment is empty, cut short or damaged."},"hidden_link":{"family":"deception","label":"phishing","description":"The message carries a link a person reading it would not see."},"malware_detected":{"family":"deception","label":"malware","description":"An attachment matches known harmful software."},"link_malicious":{"family":"deception","label":"malware","description":"A link was opened in isolation and delivered known harmful software."},"link_download":{"family":"deception","label":"malware","description":"A link was opened in isolation and started a download by itself."},"link_credential_page":{"family":"deception","label":"phishing","description":"A link was opened in isolation and led to a page that asks for a password, on a site that is not the sender's."},"link_redirect_chain":{"family":"deception","label":"phishing","description":"A link was opened in isolation and passed through other sites to end somewhere it did not name."},"spam_flagged":{"family":"bulk","label":"spam","description":"A mail system on the way marked the message as junk."},"bulk_unsolicited":{"family":"bulk","label":"spam","description":"The message is bulk mail from a sender this address has no history with."},"model_injection":{"family":"analysis","label":"prompt_injection","description":"Reading the content, Doorman judged it an attempt to instruct an AI agent."},"model_phishing":{"family":"analysis","label":"phishing","description":"Reading the content, Doorman judged it an attempt to steal sign-in details or data."},"model_scam":{"family":"analysis","label":"scam","description":"Reading the content, Doorman judged it an attempt to obtain money or goods by deceit."},"model_impersonation":{"family":"analysis","label":"impersonation","description":"Reading the content, Doorman judged that the sender pretends to be someone else."},"model_spam":{"family":"analysis","label":"spam","description":"Reading the content, Doorman judged it junk mail."},"scan_incomplete":{"family":"analysis","label":null,"description":"The check of this message's attachments or links could not be finished, so it was delivered without it."},"assessment_failed":{"family":"analysis","label":null,"description":"Doorman could not finish checking this message, so it is treated with caution."},"protected_information":{"family":"analysis","label":null,"description":"The message carries information that this account's healthcare guardrails hold for a person to look at first."}}}