Skip to Content
POST
/api/v1/deliver/inbound

Processes and delivers an inbound MIME email message to a mailbox, webhook, forwarding address, or mailing group with Sieve filter execution. Who calls it: the platform's inbound MTA at DATA time (system key, any recipient); an account key may also call it to inject mail, confined to recipients on domains the account owns. Mailbox app passwords are refused (403 insufficient_scope). Most integrations never call this: mail arrives by being sent to your address.

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

Header Parameters

x-delivery-id*string

Caller transaction ID and idempotency key

Length1 <= length
x-envelope-from*string

SMTP envelope sender (MAIL FROM)

x-envelope-to*string

SMTP envelope recipient (RCPT TO)

x-source-host?string

MTA receiving hostname

x-delivery-meta?string

JSON delivery metadata string (max 8 KB)

x-accept-held?string

1 from the system key: smtp-in's re-post of a recipient it set aside because the recipient mailbox's receive hold refused it (policyScope: "mailbox") after another recipient of the same transaction committed. The leg is accepted and staged (202) instead of refused: a paused one is delivered once the hold clears, or reported to the sender as expired at the paced queue's deadline; a disabled one is reported to the sender at once (a delivery-status notice; none to a null reverse-path, whose leg is kept for the operator). Ignored from any other caller and for any other refusal.

content-length*string

MIME message size in bytes

Request Body

body*stringmessage/rfc822

Raw RFC 5322 MIME message bytes

Response Body

Message delivered to mailbox or processed by Sieve filter

application/json
  1. response
duplicate*boolean

True if message was an idempotent duplicate

messageId*string

Assigned message ULID

sentCopy?string

Status of saved sent copy

Value in"saved""duplicate""over_quota"
sentThreadId?|

Thread ID of saved sent copy

status*"delivered"

Message was immediately delivered to mailbox

Value in"delivered"
threadId*|

Conversation thread ULID, or null

uid*|

IMAP UID in inbox, or null

Formatint64
uidValidity*|

IMAP UIDVALIDITY epoch, or null

Formatint64
Example Request
curl -X POST 'https://api.open.email/api/v1/deliver/inbound' \
  -H 'x-delivery-id: string' \
  -H 'x-envelope-from: string' \
  -H 'x-envelope-to: string' \
  -H 'content-length: string' \
  -H 'Content-Type: message/rfc822' \
  -d 'string'
Example Response
{
  "duplicate": true,
  "messageId": "string",
  "sentCopy": "saved",
  "sentThreadId": "string",
  "status": "delivered",
  "threadId": "string",
  "uid": 0,
  "uidValidity": 0
}