Skip to Content
PATCH
/api/v1/identities/{identityId}

Updates mailbox storage quota, primary address label, and outbound sending limits; or, alone in its request, suspends or resumes the mailbox (suspended), or pauses, stops or restores its receiving (receiveHold). A control answers 200 once enforced everywhere core must enforce it, or 202 (with Retry-After) while that is still being applied: poll GET until suspensionPending, or receiveHoldPending, is false.

Authorization

bearerAuth
headerAuthorizationBearer <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: [].

Path Parameters

identityId*string

Identity ULID identifier

Header Parameters

idempotency-key?string

A control PATCH's (suspended, receiveHold) idempotency key, 1 to 128 characters, unique per gesture. A retry with the same key is recognised and never written again: it answers the state as it stands (200, 202, or 409 suspension_changed / receive_hold_changed if a newer different change won), so a lost answer or a 503 can be retried without reasserting this change over someone else's. The same key asking for another value is 409 idempotency_key_reused. On a settings PATCH it is 400 idempotency_key_unsupported

Request Body

application/json
  1. body
ephemeral?boolean

Create 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

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

Itemsitems <= 1000
primaryAddress?|

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

Lengthlength <= 320
quotaBytes?|
Range0 < value <= 9007199254740991
receiveHold?|||

Hold the mailbox's RECEIVING, the account owner's control, independent of suspension: 'paused' tells every sender to retry later (429 receiving_paused, SMTP 451; senders give up after about four to five days, after which their mail bounces and is lost, so a pause is for interruptions measured in days), 'disabled' rejects mail to it at once (403 receiving_disabled, SMTP 550; a rejection already issued cannot be undone), null receives normally again. Existing mail, settings and logins are untouched. Must be the ONLY field of its request (400 control_exclusive otherwise). A change of mode restamps receiveHoldAt; re-sending the current value keeps it and completes any propagation still pending

semantic?boolean

SEMANTIC (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

Formatint64
sendHold?|||

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

Range0 <= value <= 9007199254740991
sendMsgsPerHour?|

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

Range0 <= value <= 9007199254740991
sendRcptsPerDay?|

System callers only. Envelope recipients this mailbox may send to per rolling 24h. null = the platform default; 0 = unlimited

Range0 <= value <= 9007199254740991
sendRcptsPerHour?|

System callers only. The BURST window: envelope recipients this mailbox may send to per hour. null = the platform default; 0 = unlimited

Range0 <= value <= 9007199254740991
suspended?boolean

Suspend (true) or resume (false) the mailbox: the account owner's control over a person's mailbox. A suspended mailbox's logins are refused as a wrong password is, its sending is held and its open sessions end; it keeps receiving mail, its credentials and settings are kept, and its owner keys still read and administer it. Must be the ONLY field of its request (400 control_exclusive otherwise). Re-sending the current value keeps suspendedAt and completes any enforcement still pending

Response Body

Updated mailbox details

application/json
  1. response
accountId*|

Account ID owning this mailbox, or null

createdAt*integer

Creation timestamp in epoch seconds

Formatint64
ephemeral*boolean

Whether 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

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*boolean

Whether 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*string

Unique mailbox ULID

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?boolean

Present, 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

Formatint64
receiveHold*|||

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

Formatint64
receiveHoldPending*boolean

Whether 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*boolean

Whether 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)

Formatint64
sendMsgsPerHour*|

Hourly (burst) outbound message limit (null = platform default, 0 = unlimited)

Formatint64
sendRcptsPerDay*|

Daily outbound recipient limit (null = platform default, 0 = unlimited)

Formatint64
sendRcptsPerHour*|

Hourly (burst) outbound recipient limit (null = platform default, 0 = unlimited)

Formatint64
suspendedAt*|

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}

Formatint64
suspensionPending*boolean

Whether 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

Example Request
curl -X PATCH 'https://api.open.email/api/v1/identities/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "accountId": "string",
  "createdAt": 0,
  "ephemeral": true,
  "groupAddress": "string",
  "hasMailStore": true,
  "id": "string",
  "permittedRecipients": [
    "string"
  ],
  "primaryAddress": "string",
  "provisioningPending": true,
  "quotaBytes": 0,
  "receiveHold": "paused",
  "receiveHoldAt": 0,
  "receiveHoldPending": true,
  "retentionDays": 0,
  "semantic": true,
  "sendHold": "disabled",
  "sendMsgsPerDay": 0,
  "sendMsgsPerHour": 0,
  "sendRcptsPerDay": 0,
  "sendRcptsPerHour": 0,
  "suspendedAt": 0,
  "suspensionPending": true
}