Create or replace the mailbox's event webhook
One URL per mailbox, all events, no filters. Any PUT re-enables a hook the 24h auto-disable turned off. Omit secret to keep the stored one, pass a string to rotate, null to clear. What your endpoint receives (payload, X-OpenEmail-Signature scheme, retry policy) is specified as event-batch in this document's top-level webhooks section.
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: [].
mailboxId*stringMailbox ULID identifier
application/json- body
secret?|HMAC signing secret — write-only. Omit to keep, string to set, null to clear
1 <= length <= 256url*stringHTTPS endpoint on a public host
uriThe hook
application/json- response
consecutiveFailures*integerConsecutive delivery failures; reset by any success or PUT
createdAt*integerCreation timestamp in epoch seconds
int64degraded?booleanPlatform domains only: true while attempts above the hook's supported rate are queued on their retry ladder (never dropped). The health fields of a platform hook are a projection published at a fixed cadence of about a minute
disabledReason*|'failing' after the 24h auto-disable; any PUT re-enables
domain?stringPresent on the domain scope
enabled*booleanfailingSince*|When the current failing streak began, epoch seconds
int64hasSecret*booleanWhether a signing secret is set (write-only)
lastDeliveredAt*|Last successful delivery, epoch seconds
int64lastFailure*string|nulllastFailureAt*|Last failed delivery, epoch seconds
int64mailboxId?stringPresent on the mailbox scope
retryAfter?|Platform domains only: when the degraded hook has room again, epoch seconds
int64scope*string"mailbox""domain"updatedAt*integerLast update timestamp in epoch seconds
int64url*stringcurl -X PUT 'https://api.open.email/api/v1/mailboxes/string/event-webhook' \
-H 'Content-Type: application/json' \
-d '{
"secret": "whsec_5e8a1c9f2b7d4e6a8c1f3b5d7e9a2c4f",
"url": "https://hooks.acme.example/openemail"
}'{
"consecutiveFailures": 0,
"createdAt": 1785542400,
"disabledReason": null,
"enabled": true,
"failingSince": null,
"hasSecret": true,
"lastDeliveredAt": 1788264000,
"lastFailure": null,
"lastFailureAt": null,
"mailboxId": "01J9MBX7F4Q2K9T3W600000000",
"scope": "mailbox",
"updatedAt": 1788264000,
"url": "https://hooks.acme.example/openemail"
}Clear retention window DELETE
Clears this mailbox's OWN retention window. The account default, if any, then applies — the response says which window is now in force, which is why this…
Read the mailbox's event webhook GET
The mailbox-scope event webhook: endpoint URL and delivery status. The signing secret is write-only and never returned.