Choosing an API
The Platform API, APIchat, the Bots API with the AI Agents and Channels APIs, the MCP server, and the Widgets and Core SDKs: which one fits the job.
Landbot gives you HTTP APIs, an MCP server and two browser SDKs. Most integrations use one of them. Pick it before you write code, so you don't have to rebuild later.
At a glance
| Surface | Runs in | Talks to | Base URL | Token |
|---|---|---|---|---|
| Platform API | Your server | Your workspace: customers, channels, message hooks, outgoing messages | api.landbot.io/v1/ |
Agent token |
| APIchat | Your middleware | One APIchat channel: messages pushed in from an external platform | chat.landbot.io/v1/ |
Channel token |
| Bots API (alpha) | Your server | The bots themselves: create, edit, test and publish a flow | api.landbot.io/v0-alpha/ |
Agent token |
| AI Agents API | Your server | The AI agent an ai_agent block runs |
api.landbot.io/v3/ |
Agent token |
| Channels API | Your server | Where a bot is reached and how its web chat looks | api.landbot.io/ |
Agent token |
| MCP server | An AI assistant | Your bots, built and edited for you by Claude, Codex and other clients | mcp.landbot.io/mcp |
OAuth sign-in |
| Widgets SDK | The visitor's browser | A bot, as a chat embedded in a website | Public configUrl |
None |
| Core SDK | The visitor's browser | A bot, through the same engine as the Widgets SDK, with a UI you build | Public configUrl |
None |
The HTTP APIs are server-to-server. The SDKs run in the browser from a public bot config, with no token and no proxy.
Decide in one question each
Platform API
Do you need to do something about customers from a server? Use the Platform API to:
- Send a message into an existing conversation (
send_text,send_image,send_templateand the rest) - List, search or page through customers
- Read or write Fields on a customer
- Assign a customer to an agent or a bot, or unassign them
- Archive, block or opt out a customer
- Register message hooks to hear about new messages
To show the bot to a person, use an SDK instead.
See the Platform API overview.
APIchat
Are you connecting Landbot to a messaging platform it doesn't support natively? Use APIchat for a middleware that:
- Receives messages from the external platform (Telegram, Slack, SMS, a mobile app, an IVR)
- Pushes them into Landbot with
POST /v1/send/{customer_token}/ - Listens to Landbot's webhook for the bot's replies
- Forwards those replies to the external platform
APIchat puts a Landbot bot on a platform the Landbot UI doesn't render on. For workspace administration, use the Platform API.
See the APIchat overview.
Bots API
Do you need to create or change a bot's flow from code? Use the Bots API to:
- Create a bot, list yours, change its settings, move it to the trash
- Read or rewrite its diagram, or add, change and remove single blocks
- Deploy the draft to a test channel and try it
- Publish a version and read the published history
It works with the AI Agents API (the agent an ai_agent block runs) and the Channels API (where the bot is reached and what it looks like). It describes bots and doesn't run conversations: talking to a published bot is still a job for the SDKs, APIchat or the Platform API.
The Bots API is in alpha, and its contract can change without notice.
See the Bots API overview.
MCP server
Do you want an AI assistant to build and edit bots for you? Connect it to the MCP server. It signs in to your Landbot account with OAuth, so there is no token to handle.
Widgets SDK
Do you want Landbot in a website with little code? The Widgets SDK has six embed formats:
- Fullpage: takes over the whole page
- Popup: a launcher bubble that opens a chat
- Container: embedded in a
<div>you choose - Livechat: a launcher with an expanding chat panel
- Native: renders straight into the parent page, without an iframe
- ContainerPopup: embedded in a container, opening as a popup
The SDK gives you a constructor (new Landbot.Popup({ configUrl: '...' })), messages between the page and the bot through customData and window.fn() calls, and lifecycle methods (open, close, setCustomData, destroy). You don't write UI code.
See the Widgets SDK overview.
Core SDK
Does none of the widget formats fit? Use the Core SDK to render the chat yourself: in a Three.js scene, a terminal, a voice interface, a mobile app webview, anything custom.
You get:
- A
Coreinstance built from aconfigUrl - Three pipelines to subscribe to (
$sequence,$readableSequence,$typingSequence), each pacing messages differently sendMessagefor the user's side- An events bus for custom signals
- Pagination methods for scrolling back through history
You write every pixel of the UI.
See the Core overview.
Common combinations
Many integrations combine two surfaces.
Widgets SDK and Platform API
The most common pair. Embed a widget in your site, and use the Platform API on your server to:
- Send proactive messages to customers, such as follow-ups
- Copy collected Fields into your CRM
- Listen to message hooks and start workflows
Each side has its own credentials. The widget uses a public configUrl that ships in client code. The Platform API uses your agent token, which stays on your server.
Core SDK and Platform API
The same split, with your own UI in front: a public config URL in the browser, the agent token on the server.
APIchat and Platform API
Both APIs work on the same workspace. APIchat carries the messages on the bridged channel. The Platform API handles everything workspace-wide: customers on every channel, message hooks, assigning agents. They use different tokens on different hosts. See Authentication.
Widgets SDK alone
You embed a bot on a site and need nothing on the server. You need the SDK, the bot's config URL and a <script> tag.
Core SDK alone
You're building a one-off UI, like the cinematic, departures and composer demos. You need the SDK, a config URL and your own DOM.
Signs you picked the wrong one
- Calling the Platform API from a browser. The agent token would ship to every visitor. Move the call to a server, or move the logic into the bot.
- Building a chat UI on Platform API message hooks. Hooks report events; they don't run a chat. For a live two-way UI, use the Widgets or Core SDK.
- Using APIchat from a browser. The channel token can't be embedded in client code safely, the same as the agent token.
- Using Core to show a chat bubble. That's what the Widgets SDK is for. Use Core only when none of the six formats fits.
See also
- Authentication: the agent token and the channel token, where to find each, and what each can do.
- Key concepts: bot, channel, customer, agent and Field.