Documentation

API keys and permissions

An API key is what your agent uses to act in Pombus. Each key has a scope, which says where it can act, and a set of permissions, which says what it can do. You can give a key an expiration date, and you can revoke it at any time.

A key starts with pmb_. Keys created before this prefix keep working. Send the key in the Authorization header:

Authorization: Bearer pmb_your_key

Pombus shows the secret once, when the key is created. It stores only a SHA-256 hash of it. After that, lists show a short hint: the first 10 and the last 5 characters.

Two ways to give an agent access

WhereWhat the agent getsScopeLasts
Settings › API keys in the webmailA key that you paste into the agent.domainThe expiration you choose.
Connect an agent, opened by a hosted client through https://mcp.pombus.comAn OAuth authorization. No secret to copy.pod (one space)1 hour.

In both, the screen shows only the permissions that kind of access can hold, and the agent gets exactly the ones you leave on. Nothing you choose is dropped later.

Neither kind of access can create, list or revoke keys. Keys are managed by a person in the webmail.

Scope

GET /v0/auth/me returns the scope of the key in scope_type.

scope_typeWhere the key acts
inboxOne inbox.
domainEvery inbox of one domain, inside one space.
podOne space (the API calls it a pod): its inboxes, domains, labels, lists and reports.
organizationReserved for Pombus' own services. Keys that you create are never of this type.

Keys with scope inbox or domain have two fixed limits:

A request for an inbox outside the scope answers 404, the same as an inbox that does not exist.

Create a key in the webmail

  1. Go to Settings › API keys and choose New key.
  2. Give it the Agent name. It shows in the key list and in reports.
  3. Choose the Agent domain. The key will act on any inbox of that domain.
  4. Choose the permissions. Start from a preset or set them one by one.
  5. Choose the Expiration: 7, 30 or 90 days, a date, or no expiration. The form starts on 30 days.
  6. Select Create key and copy the secret.

A key created in the webmail has scope domain. You can create up to 10 keys per hour.

It can hold these 11 permissions: inbox_read, message_read, message_update, message_send, message_reply, draft_read, draft_create, draft_update, draft_delete, draft_send, label_trash_read.

With this key, message_update changes labels. Moving a message to the trash and restoring it are not available to a domain key: they need access through Connect an agent.

Presets

Both screens use the same presets. Each one is cut to what that kind of access can hold.

PresetSettings › API keysConnect an agent
Read-onlyRead inboxes, messages, drafts and the trash.The same, plus read labels, lists, domains, reports and the space.
Read and draft (default)Read-only, plus change labels and create, edit and delete drafts. It cannot send.Read-only, plus organize messages (labels, trash, restore), create, edit and delete drafts, and create and rename labels. It cannot send.
OperatorRead and draft, plus send messages and send drafts.The same.
CustomThe permissions you turn on one by one.The same.

message_reply (reply only) is in no preset. Turn it on under Custom.

If you turn every permission off, the key gets the default agent set: the 11 permissions of the webmail key above, which include sending.

What Connect an agent can grant

The access has scope pod and lasts 1 hour. It can hold up to 19 permissions: the 11 of the webmail key, plus label_read, label_create, label_write, label_delete, list_entry_read, domain_read, metrics_read and pod_read. It does not offer inbox_create, domain_create or domain_update.

Never granted to an agent

These 19 permissions are not offered on either screen:

PermissionWhy
label_spam_read, label_blocked_read, label_unauthenticated_readQuarantined mail stays out of reach of automation.
message_deletePermanent delete cannot be undone. An agent moves mail to the trash.
inbox_deleteIt erases the inbox, and the address is never reused.
api_key_read, api_key_create, api_key_update, api_key_deleteA key made by an agent could outlive the agent's own key.
webhook_read, webhook_create, webhook_update, webhook_deleteA webhook keeps sending the space's mail to a URL after the key is revoked.
pod_create, pod_deleteCreating or erasing a whole space is not mailbox work.
list_entry_create, list_entry_deleteAn allow entry, or a removed block entry, changes what every key of the inbox can send and receive, and stays after the key is revoked.
inbox_updateIt sets the inbox's retention, and retention_days: 0 erases the inbox's mail.
domain_deleteRemoving a domain stops its sending and revokes every key of the domain.

Permissions

There are 41 permissions. The names are the ones the API uses.

FamilyPermissionAllowsWebmail keyConnect an agent
Inboxesinbox_readView inboxes.YesYes
inbox_createCreate inboxes.NoNo
inbox_updateRename and edit inboxes.NoNo
inbox_deleteClose inboxes. The address is never reused.NoNo
Messagesmessage_readRead messages, threads and attachments.YesYes
message_updateOrganize: labels, trash, restore.YesYes
message_sendSend emails directly. Also allows replying.YesYes
message_replyOnly reply to received emails.YesYes
message_deletePermanently delete messages.NoNo
Draftsdraft_readView drafts.YesYes
draft_createCreate drafts.YesYes
draft_updateEdit drafts.YesYes
draft_deleteDelete drafts.YesYes
draft_sendSend a draft. Also needed to schedule one.YesYes
Labelslabel_readView the labels of the space.NoYes
label_createCreate labels.NoYes
label_writeRename and edit labels.NoYes
label_deleteDelete labels.NoYes
label_spam_readSee what is in spam.NoNo
label_blocked_readSee what is blocked.NoNo
label_unauthenticated_readSee what failed authentication.NoNo
label_trash_readSee the trash.YesYes
Allow/block listslist_entry_readView list entries.NoYes
list_entry_createAdd entries.NoNo
list_entry_deleteRemove entries.NoNo
Reportsmetrics_readRead sending and delivery metrics.NoYes
Domainsdomain_readView domains.NoYes
domain_createAdd domains.NoNo
domain_updateEdit and verify domains.NoNo
domain_deleteRemove domains.NoNo
Spacespod_readView spaces.NoYes
pod_createCreate spaces.NoNo
pod_deleteDelete spaces.NoNo
API keysapi_key_readView keys. Secrets are never returned.NoNo
api_key_createCreate keys.NoNo
api_key_updateTurn on the allow-list-only mode of a key.NoNo
api_key_deleteRevoke keys.NoNo
Webhookswebhook_readView webhooks.NoNo
webhook_createRegister webhooks.NoNo
webhook_updateEdit and test webhooks.NoNo
webhook_deleteDelete webhooks.NoNo

A key with message_reply and without message_send can only answer the sender of a received message. It cannot name other recipients, and it cannot reply to all.

A route that has no permission assigned refuses every key that has a permission set.

In the MCP server, a tool appears only when the key holds its permission and the key's scope reaches it. See MCP tools.

Allow-list-only mode

A key in this mode can send only to recipients on the send allow list. Turn it on per key in the webmail under Lists, with Deny by default, per key. See Send and reply.

Expiration

An expired key stops working at the instant in expires_at. Requests answer 401, the same as a wrong key.

Revoke

In the webmail: Settings › API keys, then Revoke on the key. The agent loses access at once, and a revoked key stays revoked.

An open WebSocket connection checks its key every 30 seconds and closes when the key is revoked or expired.