Skip to main content
The InboxKit plugin handles incoming webhooks. Set your Corsair HTTP handler’s URL under Settings → API → Webhooks in InboxKit (see Overview for setup context and the exact URL shape). A team has one URL. A workspace’s own URL, set with workspaces.updateWebhook, is used only when the team has none. Mailbox events carry passwords by default. Unless you turn off Include mailbox credentials on that card, mailbox.status_changed includes the mailbox’s decrypted password, app password and 2FA secret. Turn it off unless you need them. Either way, the plugin deletes them from the delivery before verifying it, so after hooks, local data and result.body never see them, and mailboxes.showCredentials still works. A before hook runs ahead of the plugin and does see them, so don’t log the request there, and use an HTTPS URL. Real-time email events aren’t handled yet. That switch on the same card sends a delivery for every mail sent or received, and nothing documents their shape. Leave it off: each one would get a 404, and InboxKit pauses a URL after five failures in a row. What the signature proves. X-InboxKit-Signature is sha256= and the SHA-256 of your team API key, so there is no separate secret to store. It covers none of the delivery and is the same every time: it shows the sender knows your key, and anyone who has seen one can forge deliveries until you rotate the key. Treat an event as a prompt to look, and read the current state with domains.list or mailboxes.get before acting on it. Rotating the key briefly refuses deliveries still signed with the old one, and InboxKit tries a refused delivery up to three times. Routing tenants. Every delivery names its team in team_id, the same uid that account.get returns. Store it with corsair.withTenant(id).inboxkit.keys.set_tenant_external_id(uid), or pass ?tenantId= on the URL.
New to Corsair? See webhooks and hooks.

Webhook map

  • clientIdRequests
    • statusChanged (clientIdRequests.statusChanged)
  • consentRequests
    • statusChanged (consentRequests.statusChanged)
  • domains
    • statusChanged (domains.statusChanged)
  • mailboxes
    • statusChanged (mailboxes.statusChanged)

HTTP handler setup

app/api/webhook/route.ts

Events

Client Id Requests

Status Changed

clientIdRequests.statusChanged A client ID request’s status changed. Payload
webhookHooks example

Status Changed

consentRequests.statusChanged An OAuth consent request’s status changed. Payload
webhookHooks example

Domains

Status Changed

domains.statusChanged A domain’s status changed. Payload
webhookHooks example

Mailboxes

Status Changed

mailboxes.statusChanged A mailbox’s status changed. Unless the team has turned it off, InboxKit sends the mailbox’s passwords in this delivery; the plugin removes them before a handler returns. Use mailboxes.showCredentials if you need them. Payload
webhookHooks example