Create an identity
An identity is a principal in an account: it owns stores (a mail store, calendars, contacts), holds credentials, and can be shared with. It takes one of two shapes at creation.
With primaryAddress (the common case): the address is claimed and routed to the identity atomically, the mail store is bound, and the initial labels are provisioned. The identity receives mail at once and logs in with the address as its username.
With withoutAddress: true: no email address and no mail store, so it receives no mail and every mail route (messages, labels, uploads, search, filters, sharing) answers 404 for it, while the identity routes (credentials, settings, delete and restore) and its calendars and contacts work as for any identity. There is no login until a credential is minted with an explicit username (POST /api/v1/identities/{identityId}/credentials), since there is no address to default to; the username is a bare name without @. Routing an address to it later (POST /api/v1/routes or /api/v1/patterns, destinationType mailbox, or a retarget of either) gives it a mail store in that write, and it then receives mail like any other identity; nothing undoes that, a later route delete included. semantic: true is refused on it (400 no_mail_store), since there is no mail to index. Until then it holds events, tasks and contacts and takes part in sharing, but not in scheduling: iCalendar names participants by mailto: address, so it can neither invite nor be invited.
A create with neither is refused 400 primary_address_required; both together is 400 without_address_has_address.
receiveHold creates the mailbox already holding its receiving (paused or disabled), committed with the identity and its address so it applies from the first arrival; the answer carries receiveHold, receiveHoldAt and receiveHoldPending as GET does. On a withoutAddress create the hold is the identity's until an address is routed to it, and the mail store that write gives it holds from its first arrival.
messageWebhook and eventWebhook configure, in the same request, the mailbox's message webhook (every message that lands in the mailbox, however it was routed, POSTed beside its normal delivery; managed afterwards at /api/v1/mailboxes/{mailboxId}/message-webhook) and the identity's mailbox-scope event webhook, so the identity never exists without them. Each is optional; with neither the request and answer are exactly as above. Both are an account's: a platform identity takes neither (409 account_required). A create naming either requires an Idempotency-Key header (1 to 128 characters), which names one creation: a retry with the same key and body answers the same identity as it now is, never re-applying either webhook over a later change; any other body under the key is refused 409 idempotency_key_reused; and an identity deleted since is never re-created (409 identity_deleted). A completed creation answers its key for 30 days, the retry window. The 200 comes once the identity, its route, each webhook and its mail store's arming are in place. Until then the answer is 503 temporary_failure with Retry-After, mail to the address is refused as temporary (SMTP 451) and the identity's calendar and contact writes too, and the setup completes in the background whether or not the request is retried. Nothing is sent to either URL at creation.
bearerAuthAuthorizationBearer <token>Two credential kinds share this scheme; GET /api/v1/auth/whoami answers which one you hold and what it reaches.
oek_… API key (minted by POST /api/v1/api-keys; shown once at mint). role: account reaches the full account surface: the directory (domains, routes, patterns, api-keys, accounts, address lists) plus every mailbox the account owns. role: system additionally reaches the operator surface, which is documented separately.
oemp_… mailbox app password (minted by POST /api/v1/identities/{identityId}/credentials). Reaches ONE mailbox: its messages, labels, threads, search, sync, send, filters and PIM collections. Directory routes refuse it with 403 insufficient_scope.
Refusal vocabulary: a missing, malformed, expired, or revoked credential answers 401 unauthorized with a WWW-Authenticate: Bearer challenge; a VALID credential outside its scope answers 403 (insufficient_scope for an app password on a directory route, system_credentials_required where only the operator may call). The public routes (health, branding, token-in-path capabilities) declare security: [].
application/json- body
accountId?stringOwning account (system callers only; account callers always own their mailboxes)
ephemeral?booleanCreate the mailbox DISPOSABLE (#483): its DELETE destroys it at once — no undo record, no 7-day window, its object gone, the address free again immediately — the shape for a mailbox per support case, agent session or transaction. Fixed at creation and reported on every read; a PATCH naming it is refused 400 ephemeral_immutable in either direction, so a key cannot make a long-lived mailbox disposable after the fact. Omitted or false creates an ordinary mailbox. Refused 400 ephemeral_requires_account on a platform identity, which has no account home to destroy through
eventWebhook?|The identity's mailbox-scope event webhook, as PUT /api/v1/mailboxes/{mailboxId}/event-webhook configures it: one URL, every supported event, batched and signed. Allowed with withoutAddress: true, for calendar and contact notifications. Requires an owning account (409 account_required on a platform identity). Manage it afterwards at /api/v1/mailboxes/{mailboxId}/event-webhook. Omitted or null configures none. Requires an Idempotency-Key
messageWebhook?|The mailbox's message webhook: every message that lands in the mailbox is POSTed here (the incoming-email payload, its signing and retries) beside its normal delivery, however it got there: its primary address, any address routed to it later, a pattern or catch-all, a group, a forward, a delivery-status or platform notice. Requires a primaryAddress (400 message_webhook_requires_address with withoutAddress: true) and an owning account (409 account_required on a platform identity). Manage it afterwards at /api/v1/mailboxes/{mailboxId}/message-webhook. Omitted or null configures none. Requires an Idempotency-Key
permittedRecipients?array<>|System callers only. Outbound recipient allowlist: the ONLY addresses this mailbox may send to. Entries are exact addresses (jo@acme.dev) or domain wildcards (*@acme.dev). null = unrestricted (the default); [] = may send to nobody. At most 1,000 entries of at most 320 characters each (400 validation_failed otherwise); a list stored before these limits keeps working. A refused submission answers 403 recipient_not_permitted — permanent, so SMTP submission gets a 550. EGRESS ONLY: a restricted mailbox still receives from anyone
items <= 1000primaryAddress?|On create: CLAIMS the address - the address→mailbox route and the label are created atomically with the mailbox (409 address_taken if already routed); must be an ASCII local part on a non-alias directory domain owned by the mailbox's account (a U-label domain spelling is canonicalized to its stored A-label). On update: selects among the mailbox's already-routed addresses (bind first via POST /routes, which is idempotent); null clears the label
length <= 320quotaBytes?|0 < value <= 9007199254740991receiveHold?|||Create the mailbox already holding its receiving: 'paused' (senders retry for about four to five days, then their mail bounces and is lost) or 'disabled' (mail to it is rejected at once). The hold commits with the identity and its address, so it applies from the first arrival. Omitted or null creates a receiving mailbox. The account owner's control, like PATCH receiveHold: refused 400 not_holdable on a platform identity, and 403 receive_hold_not_enabled from an account key while this deployment has not enabled it
semantic?booleanSEMANTIC (meaning-based) search for this mailbox (docs/semantic-search-design.md). true embeds every new message after delivery and, on an existing mailbox, backfills a recent window (the later of 12 months and the 20,000 most recent messages; older mail on request via semanticFloor); false DELETES the mailbox's embeddings. Requires the account's plan gate (403 semantic_not_enabled) and an open shard (503 semantic_capacity). Off by default
semanticFloor?|'Index older mail': LOWERS the semantic backfill floor to this epoch second (null = the whole store). Never raises it. Requires semantic search to be on (409 semantic_not_enabled); refused on create, where the floor is the creation instant
int64sendHold?|||System callers only. Operator enforcement over this mailbox's outbound mail. 'disabled' STOPS it: every submission is refused 403 sending_disabled, queued relay jobs are dropped at the relay, and vacation auto-replies stop — permanent by contract, so SMTP submission gets a 550 and the mail bounces. 'paused' HOLDS it, the reversible form for a suspension you intend to lift (non-payment, an investigation): submissions answer 429 sending_paused with Retry-After, so SMTP submission gets a 451 and the sender's MTA queues the mail; queued relay jobs are DEFERRED rather than bounced. null lifts either. Does not affect receiving or reading. Applies to work already accepted as well: a send in progress stops before its remaining recipients, and queued group fan-out, member deliveries, destination webhooks and forwarding legs from this sender's submissions are deferred under 'paused' and dropped under 'disabled'. Already-queued fan-out legs may run for up to 10 seconds after the change. A retry with the same X-Delivery-Id is refused while the hold is set.
sendMsgsPerDay?|System callers only. Distinct messages this mailbox may send per rolling 24h. null = the platform default; 0 = unlimited
0 <= value <= 9007199254740991sendMsgsPerHour?|System callers only. The BURST window: distinct messages this mailbox may send per hour (measured over the current and previous hourly bucket, so a refusal can hold for up to ~2h after a burst). null = the platform default; 0 = unlimited
0 <= value <= 9007199254740991sendRcptsPerDay?|System callers only. Envelope recipients this mailbox may send to per rolling 24h. null = the platform default; 0 = unlimited
0 <= value <= 9007199254740991sendRcptsPerHour?|System callers only. The BURST window: envelope recipients this mailbox may send to per hour. null = the platform default; 0 = unlimited
0 <= value <= 9007199254740991withoutAddress?|Create the identity with no email address and no mail store: it receives no mail, and every mail route answers 404 for it; its calendars and contacts work as for any identity. An identity is created WITH a primaryAddress unless this is true: a create with neither is refused 400 primary_address_required, and true with a primaryAddress is refused 400 without_address_has_address, both before anything is written. Omitted or null is false. A domain-scoped api key never creates one: without an address it is refused 400 primary_address_required, withoutAddress or not. There is no login until a credential is minted with an explicit username, and routing an address to it later makes it receive mail like any other identity
falseCreated identity. With messageWebhook or eventWebhook it carries each, redacted, and answers only once the identity, its route and every requested webhook are configured and its mail store armed
application/json- response
accountId*|Account ID owning this mailbox, or null
createdAt*integerCreation timestamp in epoch seconds
int64ephemeral*booleanWhether the mailbox was created DISPOSABLE (ephemeral: true at creation, immutable afterwards): its DELETE destroys it at once — no undo record, no 7-day window, the address free again immediately. False for every ordinary mailbox, whose DELETE keeps the window
eventWebhook?|Present when the create asked for an eventWebhook: the mailbox's event webhook as it now is (null if it has since been deleted)
groupAddress*|When this identity is a GROUP PERSONA, the group address whose archive it keeps and which it may send as; null for every other identity. A persona has no primaryAddress, cannot be a route target, refuses its own DELETE (delete the group route instead) and its Sieve/rules writes, and is exempt from max_mailboxes
hasMailStore*booleanWhether this identity has the mail capability. False for a calendar/contacts-only identity; true may also have a null primaryAddress. Derived from the directory row without reading or provisioning a store, not an indication that the store has been initialized or contains messages
id*stringUnique mailbox ULID
messageWebhook?|Present when the create asked for a messageWebhook: the mailbox's message webhook as it now is (null if it has since been removed)
permittedRecipients*array<string>|This mailbox's outbound recipient allowlist, written by system callers only. Entries are exact addresses (jo@acme.dev) or domain wildcards (*@acme.dev). null = unrestricted (the default); [] = may send to nobody. A submission outside the list is refused with 403 recipient_not_permitted (SMTP 550). Egress only: receiving is unaffected. A credential's own permittedRecipients may restrict sending further
primaryAddress*|Primary email address assigned to this mailbox, or null if none
provisioningPending?booleanPresent, true, only while this identity's creation with messageWebhook or eventWebhook is still setting up: mail to its address and its calendar and contact writes are refused as temporary (503 temporary_failure) until it is, and the setup completes in the background. Absent for every other identity
quotaBytes*|Storage quota in bytes, or null for unlimited
int64receiveHold*|||The account owner's hold on this mailbox's RECEIVING, independent of suspension and of sendHold: 'paused' = senders are told to retry later (429 receiving_paused, SMTP 451; they give up after about four to five days, so a pause is for short interruptions), 'disabled' = mail to it is rejected at once (403 receiving_disabled, SMTP 550), null = receiving. Set with PATCH {"receiveHold": "paused"|"disabled"|null}, or on create
receiveHoldAt*|When the current receiveHold was set (epoch seconds), restamped when the mode changes; null while receiving. The age of a pause is what decides whether it is still a pause: warn from the third day
int64receiveHoldPending*booleanWhether the current receiveHold has not yet reached the mailbox's store: true right after a change still being applied (PATCH answered 202), false once it holds. Poll until false
retentionDays*|The mailbox's OWN time-based retention window in days (null = none; the account default applies if one is set). The window in force, with a preview, is GET /mailboxes/:id/retention
semantic*booleanWhether SEMANTIC (meaning-based) search is enabled for this mailbox: messages are embedded after delivery and GET /mailboxes/:id/search/semantic and …/messages/:id/similar answer. Tenant-set, gated by the account's plan; off by default. Turning it off DELETES the mailbox's embeddings
sendHold*|||This mailbox's own operator enforcement: 'disabled' = permanent stop (403 sending_disabled), 'paused' = reversible hold (429 sending_paused), null = neither. System-written only
sendMsgsPerDay*|Daily outbound message limit (null = platform default, 0 = unlimited)
int64sendMsgsPerHour*|Hourly (burst) outbound message limit (null = platform default, 0 = unlimited)
int64sendRcptsPerDay*|Daily outbound recipient limit (null = platform default, 0 = unlimited)
int64sendRcptsPerHour*|Hourly (burst) outbound recipient limit (null = platform default, 0 = unlimited)
int64suspendedAt*|When the account owner suspended this mailbox (epoch seconds), null when it is not suspended. While suspended its logins are refused as a wrong password is, its sending is held (429 sending_paused) and its open sessions end; it still receives mail, and its owner keys can still read and administer it. Set with PATCH {"suspended": true|false}
int64suspensionPending*booleanWhether the current suspendedAt has not yet reached every core gate it must: true right after a change whose enforcement is still being applied (PATCH answered 202), false once it holds everywhere. Poll until false
curl -X POST 'https://api.open.email/api/v1/identities' \
-H 'Content-Type: application/json' \
-d '{
"eventWebhook": {
"secret": "whsec_events_3f6b8d1a9c4e2f7b",
"url": "https://hooks.acme.example/events"
},
"messageWebhook": {
"format": "parsed",
"secret": "whsec_message_7c2e9a4f1b8d3e6a",
"url": "https://hooks.acme.example/incoming"
},
"primaryAddress": "agent@acme.example"
}'{
"accountId": "01J9ACCT8B1D4F7H2K00000000",
"createdAt": 1788264000,
"ephemeral": false,
"eventWebhook": {
"consecutiveFailures": 0,
"createdAt": 1788264000,
"disabledReason": null,
"enabled": true,
"failingSince": null,
"hasSecret": true,
"lastDeliveredAt": null,
"lastFailure": null,
"lastFailureAt": null,
"mailboxId": "01J9MBX7F4Q2K9T3W600000000",
"scope": "mailbox",
"updatedAt": 1788264000,
"url": "https://hooks.acme.example/events"
},
"groupAddress": null,
"hasMailStore": true,
"id": "01J9MBX7F4Q2K9T3W600000000",
"messageWebhook": {
"createdAt": 1788264000,
"format": "parsed",
"hasSecret": true,
"updatedAt": 1788264000,
"url": "https://hooks.acme.example/incoming"
},
"permittedRecipients": null,
"primaryAddress": "agent@acme.example",
"quotaBytes": null,
"receiveHold": null,
"receiveHoldAt": null,
"receiveHoldPending": false,
"retentionDays": null,
"semantic": false,
"sendHold": null,
"sendMsgsPerDay": null,
"sendMsgsPerHour": null,
"sendRcptsPerDay": null,
"sendRcptsPerHour": null,
"suspendedAt": null,
"suspensionPending": false
}Mailboxes
The mailbox resources themselves: create/list/delete identities, settings and preferences, sharing grants, send-rate meters, and the mailbox-scoped event…
List mailboxes GET
Lists mailboxes for the authenticated account. Set state=deleted to list restorable tombstones (deleted mailboxes still within the undo window). A SYSTEM…