Publish

​

Publishing is creating a version. Sent empty, it checks the draft and puts it live. Any violation refuses it.

Sent with source, it restores that version: the diagram goes back into your draft and is published from there, so the history only ever grows.

Answers the publication, not the version — no id and no Location header yet.

Path Parameters

Body·

application/json

What a publication may be asked for. Sent empty, or not sent at all, it publishes the draft. Carrying a source, it restores the version named there. Nothing else is read: a field this does not declare is refused naming it, so a caller cannot send a diagram, a label or an author beside the version and have any of it published.

  • The publication to bring back. Its diagram is stored in your draft and published from there, and the greeting a visitor is met with goes back with it.

    The channel's own look does not: design, style, logo and the rest stay as they are today. Restoring a flow should not undo brand changes.

    Properties: 1

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/bots/{bot_id}/versions
curl https://api.landbot.io/v0-alpha/bots/123e4567-e89b-12d3-a456-426614174000/versions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token YOUR_AGENT_TOKEN' \
  --data '{
  "source": {
    "version": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
}'
{
  "data": {
    "bot_id": "123e4567-e89b-12d3-a456-426614174000",
    "publication_count": 1,
    "published_at": "2026-09-16T09:18:19"
  }
}