inboxes

Create inbox API key

Mint an API key scoped to this inbox. The key can only read and send from this one inbox — its threads, messages, and drafts — and can never reach another inbox, manage pods, or mint keys. The full token is returned once, here — store it securely, it cannot be retrieved again. An account-wide key, or a pod-scoped key for this inbox's pod, may mint; an inbox-scoped key cannot.

post/v1/inboxes/{id}/api-keys

Request

  • Base URL: https://api.openmail.sh
  • URL: https://api.openmail.sh/v1/inboxes/{id}/api-keys
  • Auth: HTTP bearer

Path parameters

idstring required

Inbox ID

Request body

namestring nullable

Human-readable label to identify the key later.

Response

API key created

idstring

OpenMail API key ID

namestring nullable

Human-readable label for the key, if set.

podIdstring nullable

ID of the pod this key is scoped to, or null for an account-wide key. A pod-scoped key can only access resources in this pod.

inboxIdstring nullable

ID of the inbox this key is confined to, or null. When set, the key can only access this single inbox and its threads, messages, and drafts (its podId is the inbox's pod).

tokenPrefixstring

Non-secret leading characters of the token, to help you identify it.

last4string

Last 4 characters of the token, shown alongside the prefix.

createdAtstring date-time
lastUsedAtstring date-time nullable

When the key last authenticated a request, or null if never used.

Changes

No recorded changes to this operation across all 1 revision of this API.