Quickstart
Send your first message to the Dexbi API and read Dexbi's answer, in two minutes.
The Dexbi API answers a member's message the way Dexbi answers in Discord: with your workspace's documents, guidance and escalation rules. You send one message. Dexbi sends back what to do and what to say. Your app does the rest.
Use it from a Modmail plugin, your own bot, or a chat widget on your website. It's on every plan, Free included.
1. Create an API key
In the dashboard, open Settings > API keys and click Create key. Copy the key right away: it's shown only once. Owners and admins can create keys.

Keep the key on your server. Never put it in browser code, a Discord message or a public repository.
Keys made by Modmail
When you connect Modmail from Deploy (see Use Dexbi with Modmail), the plugin gets a key of its own. That key belongs to its Modmail deployment:
- Dexbi uses the deployment's settings from the dashboard, and ignores the request's
settings. - Each response also has a
deploymentobject, with the deployment'sidandname,replyAs("bot"or"anonymous"),handoverRoleIds(the roles to ping on ahandover) andpaused(truewhile the deployment is paused: every message is answerednone). - Each response also has
branding: who the plugin shows as the reply's sender. On the Free plan it's Dexbi (name,iconUrl, andrequired: true, so even anonymous replies use it), andmessagealready ends with a "Powered by dexbi.app" line. On a paid plan it's your server's Personalize profile, with Dexbi's name or picture for any part you didn't set. - It isn't listed under Settings > API keys, can't be deleted there, and doesn't count toward your key limit. Disconnect in the deployment, or deleting the deployment, stops it working.
Keys you create under Settings > API keys aren't tied to a deployment. They work as described on these pages.
2. Send a message
Replace dexbi_YOUR_KEY with your key and run one of these.
curl https://api.dexbi.app/v1/messages \
-H "Authorization: Bearer dexbi_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"conversation": "thread-8812",
"member": { "id": "member-1042" },
"message": "How do I get a refund?"
}'The three fields are all you need:
conversation: your id for the thread. Use the same one for every message in it.member.id: who wrote the message, like their Discord user id.message: what they wrote.
An answer can take a few seconds, so allow up to a minute before timing out.
3. Read the answer
{
"action": "reply",
"message": "You can ask for a refund within 14 days from your order page.",
"staffNote": null,
"title": null,
"conversation": "thread-8812",
"attribution": { "text": "Powered by Dexbi", "url": "https://dexbi.app", "required": true }
}On the Free plan, show "Powered by Dexbi", linked to dexbi.app, next to Dexbi's answers. See Show the Powered by Dexbi credit.
The text comes from your workspace's documents. If they don't cover the question, Dexbi says it doesn't have that.
Look at action and do what it says:
action | Do this |
|---|---|
reply | Send message to the member. |
handover | Send message to the member, and alert your staff with staffNote. |
close | Send message, then close the thread. |
none | Nothing. |
That's the whole API: one endpoint, four actions.
Next
- Handling the response: each action, with full examples and code.
- Conversations and retries: keep a thread together, and stop double-sends.
- Settings: choose how Dexbi behaves, with ready-made recipes.
- Errors and limits: every error, the rate-limit headers and each plan's limits.
- API reference: every field and every response, with a playground to try it.
The API is also described as an OpenAPI 3.1 document at https://api.dexbi.app/v1/openapi.json. Import it into Postman, Insomnia or a code generator.
