Replace the draft diagram
Replaces the whole diagram. This is the autosave path, so a diagram that breaks rules is stored anyway and comes back with save_state and violations. You never lose work, and publishing is what refuses.
The one exception is a bot_link block naming its bot by uuid. We swap that uuid for the number the runtime reads, so a uuid naming none of the brand's bots cannot be stored and the whole write is refused with linked_bot_not_found. A jump that names its bot by number is stored as it comes.
Kept as you sent it, keys and all. Two things are added: isTarget: true, on any node that does not already say whether a connection may end at it, and the number, channel family and name of the bot each bot_link names by uuid.
Request
- Base URL: https://api.landbot.io/v0-alpha
- URL: https://api.landbot.io/v0-alpha/bots/{bot_id}/draft
- Auth: one of:
- API key in header Authorization
- API key in cookie sessionid
- HTTP bearer
Request body
Example request
{
"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"
}
}
}
}Response
The stored draft, with the outcome of validating it
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.