Domains

Account-owned mail domains, DNS records, verification and setup.

List custom domains

GET/v1/domains

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

The account's active custom domains and their DNS records. Reading remains available when the transport is disabled.

OAuth: not available to delegated app tokens.

Also available as client.domains.list in TypeScript, client.domains.list in Python, the domains_list tool and doorman domains list on the command line.

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

Answers 200: The custom domains.

Response 200: DomainList

The account's active custom domains.

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

Add a custom domain

POST/v1/domains

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

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.

OAuth: not available to delegated app tokens.

Also available as client.domains.create in TypeScript, client.domains.create in Python, the domains_create tool and doorman domains create on the command line.

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

Request body (application/json): CreateDomain

A domain to connect. A subdomain avoids replacing an existing apex mailbox service.

  • namestringrequired

    Trimmed, lowercased and validated as a domain by the Worker. Example: agents.example.com

Answers 201: The domain and its records.

Response 201: Domain

An account's custom mail domain. Only verified domains can issue inboxes; one that never verifies is removed at expiresAt.

  • idstringrequired

    A custom domain identifier. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k

  • namestringrequired

  • status"pending" | "verified" | "failed"required

  • transport"resend"required

  • recordsDomainRecord[]required

  • connectobjectrequired

  • availablebooleanrequired

  • setupType"automatic" | "manual" | nullrequired

  • propagationStatus"pending" | "success" | "failed" | nullrequired

  • providerstring | nullrequired

  • inboxesintegerrequired

  • verifiedAtstring (date-time) | nullrequired

  • expiresAtstring (date-time) | nullrequired

    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.

  • lastCheckedAtstring (date-time) | nullrequired

  • createdAtstring (date-time)required

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

  • updatedAtstring (date-time)required

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

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
400invalid_jsonThe request body is not JSON.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
402plan_limit_reachedThe plan's allowance is used up; scope says whether it is the inbox count, the monthly sends or the custom domains. Upgrade rather than wait.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
409already_existsThe 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.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
429rate_limit_exceededA per-inbox or per-account rate limit; Retry-After and resetsAt say when to try again.
500internal_errorSomething went wrong on the server.
502provider_unavailableThe mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.
503custom_domains_unavailableThe custom-domain mail transport and inbound webhook are not fully configured.

Example 201 response

{
  "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"
}
curl -s -X POST "https://api.doorman.fyi/v1/domains" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "agents.example.com"
  }'

Read a custom domain

GET/v1/domains/{domainId}

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

One live custom domain belonging to the account; another account's domain is a 404.

OAuth: not available to delegated app tokens.

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

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

Parameters
  • domainIdstring, in pathrequired

    The custom domain. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 200: The domain and its records.

Response 200: Domain

An account's custom mail domain. Only verified domains can issue inboxes; one that never verifies is removed at expiresAt.

  • idstringrequired

    A custom domain identifier. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k

  • namestringrequired

  • status"pending" | "verified" | "failed"required

  • transport"resend"required

  • recordsDomainRecord[]required

  • connectobjectrequired

  • availablebooleanrequired

  • setupType"automatic" | "manual" | nullrequired

  • propagationStatus"pending" | "success" | "failed" | nullrequired

  • providerstring | nullrequired

  • inboxesintegerrequired

  • verifiedAtstring (date-time) | nullrequired

  • expiresAtstring (date-time) | nullrequired

    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.

  • lastCheckedAtstring (date-time) | nullrequired

  • createdAtstring (date-time)required

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

  • updatedAtstring (date-time)required

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

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

Example 200 response

{
  "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"
}
curl -s "https://api.doorman.fyi/v1/domains/dom_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Check the domain's DNS

POST/v1/domains/{domainId}/verify

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

Asks the mail transport to verify the required records, then returns the current status. Verification is asynchronous; repeated requests are rate limited.

OAuth: not available to delegated app tokens.

Also available as client.domains.verify in TypeScript, client.domains.verify in Python, the domains_verify tool and doorman domains verify on the command line.

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

Parameters
  • domainIdstring, in pathrequired

    The custom domain. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 202: The domain's current verification state.

Response 202: Domain

An account's custom mail domain. Only verified domains can issue inboxes; one that never verifies is removed at expiresAt.

  • idstringrequired

    A custom domain identifier. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k

  • namestringrequired

  • status"pending" | "verified" | "failed"required

  • transport"resend"required

  • recordsDomainRecord[]required

  • connectobjectrequired

  • availablebooleanrequired

  • setupType"automatic" | "manual" | nullrequired

  • propagationStatus"pending" | "success" | "failed" | nullrequired

  • providerstring | nullrequired

  • inboxesintegerrequired

  • verifiedAtstring (date-time) | nullrequired

  • expiresAtstring (date-time) | nullrequired

    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.

  • lastCheckedAtstring (date-time) | nullrequired

  • createdAtstring (date-time)required

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

  • updatedAtstring (date-time)required

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

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403insufficient_scopeThe app's token lacks a required scope, or the operation cannot be delegated.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
429rate_limit_exceededA per-inbox or per-account rate limit; Retry-After and resetsAt say when to try again.
500internal_errorSomething went wrong on the server.
502provider_unavailableThe mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.
503custom_domains_unavailableThe custom-domain mail transport and inbound webhook are not fully configured.

Example 202 response

{
  "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"
}
curl -s -X POST "https://api.doorman.fyi/v1/domains/dom_01jc5f1a2b3c4d5e6f7g8h9j0k/verify" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Start automatic DNS setup

POST/v1/domains/{domainId}/connect-session

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

A console-only, short-lived DNS setup token and the records to publish. Provider secrets never leave the Worker.

OAuth: not available to delegated app tokens.

Also available as client.domains.connectSession in TypeScript and client.domains.connect_session in Python.

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

Parameters
  • domainIdstring, in pathrequired

    The custom domain. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 200: The short-lived setup session.

Response 200: DomainConnectSession

A short-lived DNS setup token and records, returned to the console only.

  • applicationIdstringrequired

  • tokenstringrequired

  • prefilledDomainstringrequired

  • userIdstringrequired

  • dnsRecordsobjectrequired

  • domainobject[]optional

  • typestringrequired

  • hoststringrequired

  • valuestringrequired

  • ttlintegerrequired

  • priorityintegeroptional

  • optionalbooleanoptional

  • subDomainobject[]optional

  • typestringrequired

  • hoststringrequired

  • valuestringrequired

  • ttlintegerrequired

  • priorityintegeroptional

  • optionalbooleanoptional

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403forbiddenThe key is scoped to one inbox and cannot manage inboxes, keys or webhooks, or cannot read account-wide data.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
403permission_deniedThe signed-in member's role in the organization lacks a permission the operation needs; permission names it. An admin of the organization can do it, or change the member's role.
403member_deactivatedThe signed-in person's access to the organization was deactivated, or they were removed from it. It holds from their next request, whatever their session token says. An admin of the organization can let a deactivated member in again.
404not_foundNo such resource for this caller, or no such route.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.
502provider_unavailableThe mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.
503custom_domains_unavailableThe custom-domain mail transport and inbound webhook are not fully configured.
503connect_unavailableAutomatic DNS setup is not configured; publish the records manually.
curl -s -X POST "https://api.doorman.fyi/v1/domains/dom_01jc5f1a2b3c4d5e6f7g8h9j0k/connect-session" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Remove a custom domain

DELETE/v1/domains/{domainId}

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

Removes the domain and its inboxes, revokes their keys and closes their streams. Removal at the mail transport is queued.

OAuth: not available to delegated app tokens.

Also available as client.domains.delete in TypeScript, client.domains.delete in Python, the domains_delete tool and doorman domains delete on the command line.

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

Parameters
  • domainIdstring, in pathrequired

    The custom domain. Example: dom_01jc5f1a2b3c4d5e6f7g8h9j0k.

Answers 204: Removed.

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

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