Receive real-time notifications when new emails arrive in AI Inbx.
inbound.email.received
Good to know • Webhooks are delivered at-least-once. Make your handler idempotent.
Create an HTTPS endpoint
Configure the webhook in your dashboard
AI_INBX_SECRET
in your environment.Verify every request (recommended)
X-AiInbx-Timestamp
– integer seconds since Unix epochX-AiInbx-Signature
– sha256=
followed by an HMAC-SHA256 signature calculated over timestamp.body
Manage existing webhooks
createNextRouteHandler
helper that ships with the TypeScript SDK. It automatically:
AI_INBX_SECRET
is set
Tip: Your API route can live under any path (e.g., /api/my-inbox-webhook
). Just make sure to use that same URL when configuring the webhook in the dashboard.
Tip: When noAI_INBX_SECRET
is configured the helper still works butisVerified
will beundefined
.
Field | Type | Description |
---|---|---|
event | string | Always inbound.email.received for now |
data.email | object | The full email record (see GET /emails/{id} in the API reference) |
data.organization | object | Organization context – helpful if you operate multiple orgs |
attempt | number | Delivery attempt (starts at 1 , increments on retries) |
timestamp | number | Unix epoch seconds of when we sent the webhook |
consecutiveFailures
for every webhook:
attempt
in the payload equals consecutiveFailures + 1
– useful for debugging.isActive = false
).