A lot of support email asks the same few questions: how do I change my billing email, where is my invoice, how do I cancel. The answers are already in your help docs. This post sets up a Lumbox inbox that reads each new support email, looks up the answer in those docs and in past threads, and writes a reply that waits in a queue until a person approves it.
Request and response shapes for every endpoint below are in the auto-reply agent recipe.
1. Point support@ at a Lumbox inbox
Custom domains need the Starter plan ($9 a month). Add the domain with POST /v1/domains. The response lists the DNS records to create (ownership TXT, MX, SPF, DKIM and DMARC), and POST /v1/domains/:id/verify checks them. The MX records route the whole domain’s mail to Lumbox, so if your root domain already receives mail somewhere else, use a subdomain such as help.yourco.com.
Once the domain is verified, create the inbox:
curl -X POST https://api.lumbox.co/v1/inboxes \
-H "X-API-Key: $LUMBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Support", "domain": "help.yourco.com", "local_part": "support"}'
Replies go out from support@help.yourco.com, in the customer’s original thread.
2. Paste your help text as the knowledge base
Send each help article to POST /v1/knowledge with a title and plain-text content. Lumbox splits it into chunks and embeds them. One document can be up to 2 MB, and a Starter org can store 10 MB in total.
When an email arrives, the agent has two lookup tools:
search_knowledgereturns up to five chunks with a similarity score of 0.3 or higher, each with its document title and up to 1,500 characters of text.search_past_conversationssearches earlier emails in the same inbox, outside the current thread, and returns up to five matches with sender, subject, date and a 300-character snippet. The agent can limit it to emails from the current sender.
It can also read your contact record for the sender with get_contact and tag the email with set_labels. Its system prompt tells it not to invent order numbers, prices, dates or policies, and to hand the thread to a person when the tools do not give it an answer.
3. Turn on draft-first mode
curl -X POST https://api.lumbox.co/v1/inboxes/$INBOX_ID/auto-reply \
-H "X-API-Key: $LUMBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"mode": "draft",
"instructions": "Answer for YourCo support. Under 120 words. Escalate refunds."
}'
New inboxes default to auto, which sends replies without review, so pass "mode": "draft" yourself. Each reply now becomes a pending draft, and Lumbox fires a draft.created webhook with the draft ID, recipient, subject and the first 500 characters of the text.
POST /v1/drafts/:id/approve sends the draft as written. If you add a text field to that call, your edited version goes out instead, and POST /v1/drafts/:id/reject discards it without sending anything. Each approval fires draft.approved with the sent email’s ID and an edited flag, which tells you how often the agent’s wording needed a change. The dashboard shows the same queue under Inboxes > Drafts, with an edit box on each draft.
4. Escalate to a human, in Slack
Refunds beyond policy, account deletion and legal questions should reach a person. The agent has an escalate_to_human tool for these. When it calls it, no reply or draft is written, the thread is marked NEEDS_HUMAN, and Lumbox fires thread.escalated with the sender, the subject and the agent’s reason.
Subscribe one webhook to all three events:
curl -X POST https://api.lumbox.co/v1/webhooks \
-H "X-API-Key: $LUMBOX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-server.com/lumbox", "events": ["draft.created", "draft.approved", "thread.escalated"]}'
The response includes a signing secret, shown once. Lumbox posts its own JSON, so Slack needs a small relay. It checks the X-Lumbox-Signature header (a hex HMAC-SHA256 of the raw body) and posts to a Slack incoming webhook, which takes a JSON body with a text field (Slack docs):
import { createServer } from "node:http";
import { createHmac, timingSafeEqual } from "node:crypto";
createServer(async (req, res) => {
let raw = "";
for await (const chunk of req) raw += chunk;
const expected = createHmac("sha256", process.env.LUMBOX_WEBHOOK_SECRET).update(raw).digest("hex");
const got = String(req.headers["x-lumbox-signature"] ?? "");
if (got.length !== expected.length || !timingSafeEqual(Buffer.from(got), Buffer.from(expected))) {
return res.writeHead(401).end();
}
const { event, data } = JSON.parse(raw);
if (event === "thread.escalated") {
await fetch(process.env.SLACK_WEBHOOK_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: `Needs a human: "${data.subject}" from ${data.from}. ${data.reason}` }),
});
}
res.writeHead(200).end();
}).listen(3000);
The same relay can post draft.created to a channel, so whoever is on support sees each draft as it arrives.
Some mail never reaches the agent. Lumbox skips no-reply and mailer-daemon senders, mailing lists, bulk and auto-submitted mail, and spam. It stops answering a thread once the inbox has sent five messages in it. An email that scores high on the prompt-injection screen becomes a draft even when the inbox is in auto mode.
5. The bill
On Starter you do not need a model key, because the agent runs on Lumbox AI. Every model call and embedding call is metered by its token counts, priced, and deducted from the plan’s monthly AI credit: $2 on Starter, $10 on Pro and $40 on Scale. The credit resets on the 1st of each month (UTC). If it runs out, new emails get no agent run until the reset, an upgrade, or until you save your own key with PUT /v1/ai-config, after which model calls bill to your provider account. GET /v1/usage/ai shows the month’s spend, with agent replies listed under auto_reply.
In the test run for this post, two drafted replies used 3,111 input and 144 output tokens and cost $0.000421 of AI credit, about $0.0002 a reply, on top of the $9 plan. At that rate Starter’s $2 credit covers roughly 9,500 replies a month. Approved replies also count toward the plan’s monthly sends, which is 2,000 on Starter.
Free works for a trial on a trylumbox.com address, with three limits: no AI credit, no custom domain, and 100 sends a month. On Free you save your own model key, and the knowledge base needs an OpenAI key or a connected Cloudflare account for embeddings.
For comparison, Intercom’s Fin, used with a helpdesk you already have, costs $0.99 per outcome with a 50-outcome monthly minimum (fin.ai/pricing, checked 2026-10-04). Fin’s help center describes that floor as a $49 a month base plan that includes 50 resolutions (Fin pricing: Outcomes). Fin also covers chat, WhatsApp and SMS and answers customers directly. The setup in this post covers email only, and a person approves each reply.
The full recipe, including custom HTTP tools for lookups such as order status, is at lumbox.co/docs/auto-reply-agent. Create an account to try it.