Bots API overview
Create a bot, edit its draft block by block, test it and publish it, from code.
The Bots API is how you build a bot without the builder. It owns the whole bot: its settings, the diagram being edited, the test deployment and the published versions. The builder and Copilot work on the same bot under the same rules, so what you write here is what the builder opens.
Warning The Bots API is in alpha, and
v0-alphain its address says exactly that. It runs in production against your real workspace, but anything in its contract can change, including in ways that break an integration, and a breaking change can ship without notice. Re-read the reference before you upgrade anything built on it.
Three APIs, one bot
| API | Base URL | What it is for |
|---|---|---|
| Bots API v0-alpha | https://api.landbot.io/v0-alpha |
Create a bot, edit its draft block by block, test it, publish it |
| AI Agents | https://api.landbot.io/v3 |
The AI agent an ai_agent block runs |
| Channels | https://api.landbot.io |
Where a bot is reached and what it looks like: design, CSS and images |
A bot usually needs all three: a block names the agent it runs, and visitors reach the bot through a channel that carries how it looks.
The Channels API is an older one and does not answer the way the Bots API does. Its reference opens with the four things that catch people out.
Authentication
All three take your agent token, the same one the Platform API uses. You will find it under Settings → Account in the dashboard.
curl https://api.landbot.io/v0-alpha/bots \
-H "Authorization: Token YOUR_AGENT_TOKEN" \
-H "Content-Type: application/json"
A 403 from the Bots API is about your account: your role does not carry the permission the
operation needs, your account is disabled or locked, or your subscription has expired and you tried
to write. When a Bots API call fails has every status.
Before you start
Read How a bot works once: the draft and its published versions, the diagram, and what an answer looks like. The reference will make sense after that.
The reference describes the whole agreed contract, not only what is built. Each operation carries
x-implemented, and the ones that are not served yet say so in their own description, together with
what a request to them answers today.