LumboxLumbox Docs

Quickstart

Get up and running in under a minute.

Quickstart

1. Get an API Key

Sign up at lumbox.co and create an API key from the dashboard.

2. Create an Inbox

curl -X POST https://api.lumbox.co/v1/inboxes \
  -H "X-API-Key: ak_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-bot"}'

Response:

{
  "id": "inb_abc123",
  "address": "my-bot@trylumbox.com",
  "name": "my-bot",
  "created_at": "2025-01-01T00:00:00.000Z"
}

3. Wait for an OTP

Use the email address to sign up for a service, then wait for the verification code:

curl https://api.lumbox.co/v1/inboxes/inb_abc123/otp?timeout=60 \
  -H "X-API-Key: ak_your_key"

Response:

{
  "code": "847291",
  "all_codes": ["847291"],
  "from": "noreply@github.com",
  "subject": "Your verification code",
  "expires": null,
  "email_id": "eml_xyz789"
}

That's it. Three API calls: create an inbox, use the address, get the code.

Using the SDK

TypeScript

npm install lumbox
import { Lumbox } from "lumbox";

const client = new Lumbox({ apiKey: process.env.LUMBOX_API_KEY });

const inbox = await client.createInbox({ name: "signup-bot" });
console.log(inbox.address); // signup-bot@trylumbox.com

const otp = await inbox.waitForOtp({ timeout: 60 });
console.log(otp.code); // "847291"

Python

pip install lumbox
from lumbox import Lumbox
import os

client = Lumbox(api_key=os.environ["LUMBOX_API_KEY"])

inbox = client.create_inbox(name="signup-bot")
print(inbox.address)  # signup-bot@trylumbox.com

otp = inbox.wait_for_otp(timeout=60)
print(otp["code"])  # "847291"