Lumbox Docs

Webhooks

Get notified in real-time when emails arrive.

Webhooks

Register a webhook URL to receive real-time notifications when emails arrive.

Create Webhook

POST /v1/webhooks
curl -X POST https://api.lumbox.co/v1/webhooks \
  -H "X-API-Key: ak_..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://your-server.com/webhook", "events": ["email.received"]}'

Webhook Payload

When an email arrives, we POST to your URL:

{
  "event": "email.received",
  "data": {
    "email_id": "eml_xyz789",
    "inbox_id": "inb_abc123",
    "from": "noreply@github.com",
    "subject": "Your verification code",
    "parsed": {
      "otp_codes": ["847291"],
      "category": "verification"
    }
  }
}

List Webhooks

GET /v1/webhooks

Delete Webhook

DELETE /v1/webhooks/:id

Tip: For most use cases, the long-poll endpoints (/wait and /otp) are simpler than webhooks. Use webhooks when you need to process emails asynchronously or in a separate service.