API keys

Credentials for agents: account-wide keys from the console, inbox-scoped keys from the API.

List account keys

GET/v1/api-keys

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

The account's active account-wide keys, oldest first. scope=all adds the inbox-scoped keys; every item then carries inboxAddress.

OAuth: not available to delegated app tokens.

Also available as client.apiKeys.list in TypeScript and client.api_keys.list in Python.

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

Parameters
  • scope"all", in queryoptional

    Include inbox-scoped keys.

Answers 200: The keys.

Response 200: ApiKeyList

Active keys, oldest first.

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
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.
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/api-keys" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Create an account key

POST/v1/api-keys

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

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.

OAuth: not available to delegated app tokens.

Also available as client.apiKeys.create in TypeScript and client.api_keys.create in Python.

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

Request body (application/json): CreateApiKey

A new key. The name is a label for people.

  • namestringoptional

    A label, at most 100 characters. Example: Orchestrator

Answers 201: The key with its one-time token.

Response 201: CreatedApiKey

A freshly minted key with its token, which is shown once and stored only as a hash.

  • idstringrequired

    An API key identifier. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q

  • inboxIdstring | nullrequired

    The inbox an inbox-scoped key reaches; null for an account key.

  • namestringrequired

    A label, possibly empty. Example: Orchestrator

  • tokenPrefixstringrequired

    The first ten characters of the token, starting with dm_. Example: dm_9f3abcd

  • last4stringrequired

    The last four characters of the token. Example: m2x8

  • createdAtstring (date-time)required

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

  • lastUsedAtstring (date-time) | nullrequired

    When the key last authenticated a request, to the minute; null until then.

  • createdByobject | nulloptional

    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.

  • userIdstringrequired

    The identity provider's user id. Example: user_2abcDEF3ghiJKL

  • namestringrequired

    The person's name when the key was minted, or their address when they had no name. Example: Dana Ortiz

  • tokenstringrequired

    The bearer token. Store it now; it cannot be read again. Example: dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8

Errors
StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
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.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
409account_mismatchThe request named another account in x-doorman-account than the one its credential acts for, as happens when the console's organization was switched in another tab. Reload and try again.
500internal_errorSomething went wrong on the server.

Example 201 response

{
  "id": "key_01jc5c0z9y8x7w6v5t4t3s2r1q",
  "inboxId": null,
  "name": "Orchestrator",
  "tokenPrefix": "dm_9f3abcd",
  "last4": "m2x8",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "lastUsedAt": null,
  "token": "dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"
}
curl -s -X POST "https://api.doorman.fyi/v1/api-keys" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "Orchestrator"
  }'

Read an account key

GET/v1/api-keys/{keyId}

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

One active account-wide key, without its token.

OAuth: not available to delegated app tokens.

Also available as client.apiKeys.get in TypeScript and client.api_keys.get in Python.

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

Parameters
  • keyIdstring, in pathrequired

    The key. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q.

Answers 200: The key.

Response 200: ApiKey

An API key as the API lists it. The token itself appears once, when the key is created.

  • idstringrequired

    An API key identifier. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q

  • inboxIdstring | nullrequired

    The inbox an inbox-scoped key reaches; null for an account key.

  • namestringrequired

    A label, possibly empty. Example: Orchestrator

  • tokenPrefixstringrequired

    The first ten characters of the token, starting with dm_. Example: dm_9f3abcd

  • last4stringrequired

    The last four characters of the token. Example: m2x8

  • createdAtstring (date-time)required

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

  • lastUsedAtstring (date-time) | nullrequired

    When the key last authenticated a request, to the minute; null until then.

  • createdByobject | nulloptional

    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.

  • userIdstringrequired

    The identity provider's user id. Example: user_2abcDEF3ghiJKL

  • namestringrequired

    The person's name when the key was minted, or their address when they had no name. Example: Dana Ortiz

Errors
StatusErrorMeaning
401unauthorizedThe credential was missing, malformed, revoked or belongs to an inactive account.
401session_invalidThe console session token could not be verified.
401session_expiredThe console session token has expired.
401session_claims_missingThe session token does not carry a verified email address.
403session_requiredAccount keys, developer apps, relying parties, installations, consent, approving a sign-in and the assistant require a console session. So does loosening the security policy, trusting a sender, releasing held mail, allowing a sign-in, letting agents sign in to new services alone or telling a service who owns an agent, unless the account allows its account keys to.
403account_suspendedThe account is suspended.
403account_deletedThe account was deleted.
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": "key_01jc5c0z9y8x7w6v5t4t3s2r1q",
  "inboxId": null,
  "name": "Orchestrator",
  "tokenPrefix": "dm_9f3abcd",
  "last4": "m2x8",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "lastUsedAt": null
}
curl -s "https://api.doorman.fyi/v1/api-keys/key_01jc5c0z9y8x7w6v5t4t3s2r1q" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Revoke an account key

DELETE/v1/api-keys/{keyId}

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

The key stops authenticating on its next request and the stream connections it opened are closed with 4001.

OAuth: not available to delegated app tokens.

Also available as client.apiKeys.revoke in TypeScript and client.api_keys.revoke in Python.

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

Parameters
  • keyIdstring, in pathrequired

    The key. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q.

Answers 204: Revoked.

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

Create an inbox key

POST/v1/inboxes/{inboxId}/api-keys

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

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.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.keys.create in TypeScript, client.inboxes.keys.create in Python, the inboxes_keys_create tool and doorman inboxes keys create on the command line.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Request body (application/json): CreateApiKey

A new key. The name is a label for people.

  • namestringoptional

    A label, at most 100 characters. Example: Orchestrator

Answers 201: The key with its one-time token.

Response 201: CreatedApiKey

A freshly minted key with its token, which is shown once and stored only as a hash.

  • idstringrequired

    An API key identifier. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q

  • inboxIdstring | nullrequired

    The inbox an inbox-scoped key reaches; null for an account key.

  • namestringrequired

    A label, possibly empty. Example: Orchestrator

  • tokenPrefixstringrequired

    The first ten characters of the token, starting with dm_. Example: dm_9f3abcd

  • last4stringrequired

    The last four characters of the token. Example: m2x8

  • createdAtstring (date-time)required

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

  • lastUsedAtstring (date-time) | nullrequired

    When the key last authenticated a request, to the minute; null until then.

  • createdByobject | nulloptional

    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.

  • userIdstringrequired

    The identity provider's user id. Example: user_2abcDEF3ghiJKL

  • namestringrequired

    The person's name when the key was minted, or their address when they had no name. Example: Dana Ortiz

  • tokenstringrequired

    The bearer token. Store it now; it cannot be read again. Example: dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8

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

Example 201 response

{
  "id": "key_01jc5c0z9y8x7w6v5t4t3s2r1q",
  "inboxId": null,
  "name": "Orchestrator",
  "tokenPrefix": "dm_9f3abcd",
  "last4": "m2x8",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "lastUsedAt": null,
  "token": "dm_9f3abcdefghjkmnpqrstvwxyz0123456789abcdefghjkmnpm2x8"
}
curl -s -X POST "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/api-keys" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "Orchestrator"
  }'

List an inbox's keys

GET/v1/inboxes/{inboxId}/api-keys

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

The inbox's active keys, oldest first.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.keys.list in TypeScript, client.inboxes.keys.list in Python, the inboxes_keys_list tool and doorman inboxes keys list on the command line.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

Answers 200: The keys.

Response 200: ApiKeyList

Active keys, oldest first.

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

Read an inbox key

GET/v1/inboxes/{inboxId}/api-keys/{keyId}

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

One active key of the inbox, without its token.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.keys.get in TypeScript, client.inboxes.keys.get in Python, the inboxes_keys_get tool and doorman inboxes keys get on the command line.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • keyIdstring, in pathrequired

    The key. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q.

Answers 200: The key.

Response 200: ApiKey

An API key as the API lists it. The token itself appears once, when the key is created.

  • idstringrequired

    An API key identifier. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q

  • inboxIdstring | nullrequired

    The inbox an inbox-scoped key reaches; null for an account key.

  • namestringrequired

    A label, possibly empty. Example: Orchestrator

  • tokenPrefixstringrequired

    The first ten characters of the token, starting with dm_. Example: dm_9f3abcd

  • last4stringrequired

    The last four characters of the token. Example: m2x8

  • createdAtstring (date-time)required

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

  • lastUsedAtstring (date-time) | nullrequired

    When the key last authenticated a request, to the minute; null until then.

  • createdByobject | nulloptional

    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.

  • userIdstringrequired

    The identity provider's user id. Example: user_2abcDEF3ghiJKL

  • namestringrequired

    The person's name when the key was minted, or their address when they had no name. Example: Dana Ortiz

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": "key_01jc5c0z9y8x7w6v5t4t3s2r1q",
  "inboxId": null,
  "name": "Orchestrator",
  "tokenPrefix": "dm_9f3abcd",
  "last4": "m2x8",
  "createdAt": "2026-11-05T10:05:00.000Z",
  "lastUsedAt": null
}
curl -s "https://api.doorman.fyi/v1/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/api-keys/key_01jc5c0z9y8x7w6v5t4t3s2r1q" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Revoke an inbox key

DELETE/v1/inboxes/{inboxId}/api-keys/{keyId}

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

The key stops authenticating on its next request and the stream connections it opened are closed with 4001.

OAuth: not available to delegated app tokens.

Also available as client.inboxes.keys.revoke in TypeScript, client.inboxes.keys.revoke in Python, the inboxes_keys_revoke tool and doorman inboxes keys revoke on the command line.

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

Parameters
  • inboxIdstring, in pathrequired

    The inbox. Example: inb_01jc4q7w9k2m5n8p3r6t1v4x7z.

  • keyIdstring, in pathrequired

    The key. Example: key_01jc5c0z9y8x7w6v5t4t3s2r1q.

Answers 204: Revoked.

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/inboxes/inb_01jc4q7w9k2m5n8p3r6t1v4x7z/api-keys/key_01jc5c0z9y8x7w6v5t4t3s2r1q" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

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