Blocks
Add blocks to the draft
Adds blocks, with their connections, to the diagram you already have. All of them apply or none do. top and left say where on the canvas each one goes.
Broken rules are stored and reported, as on autosave. A few problems are refused outright instead — When a call fails lists which.
This only adds. To change or remove something, use PATCH /bots/{bot_id}/draft.
post/bots/{bot_id}/draft/blocks
Request
- Base URL: https://api.landbot.io/v0-alpha
- URL: https://api.landbot.io/v0-alpha/bots/{bot_id}/draft/blocks
- Auth: one of:
- API key in header Authorization
- API key in cookie sessionid
- HTTP bearer
Request body
Example request
{
"blocks": [
{
"id": "n1",
"type": "send_text",
"params": {
"messages": [
{
"entity": "text",
"text": "Thanks!",
"id": "$0"
}
]
}
}
],
"connections": [
{
"id": "welcome.$success--n1",
"type": "$success",
"sourcePath": "welcome",
"targetPath": "n1"
}
]
}Response
The draft after the change
Example response
{
"data": {
"diagram": {
"nodes": {
"hidden": {
"id": "hidden",
"path": "hidden",
"template": "hidden",
"params": {}
},
"welcome": {
"id": "welcome",
"path": "welcome",
"template": "var_text",
"params": {
"version": 3,
"text": "Hi! What is your name?",
"destination": "name"
}
}
},
"connections": {
"hidden.success--welcome": {
"id": "hidden.success--welcome",
"type": "success",
"sourcePath": "hidden",
"targetPath": "welcome"
}
}
},
"edited_at": "2026-09-16T09:18:19"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.