Update settings, or restore from trash

​

Writes only the fields you send. An empty body answers 400, and so does a field we do not describe.

state: active is how you take a bot out of the trash, and the only value state accepts. Any other write to a trashed bot answers 404, as if it were not there.

Path Parameters

Body·

required
application/json

What a write to the bot itself may carry. Every field is optional and only the ones sent are written, so a body carrying none of them is refused rather than answered as a write that changed nothing. name, workspace and is_active are the bot's own settings; state is which side of the trash it is on, and active is its one accepted value.

  • Set to active to restore a bot from the trash. trashed is not accepted: the trash is entered by deleting the bot.

    values
    activetrashed
  • The workspace to file the bot under. Send null to file it under none. A workspace that does not exist, or belongs to another brand, is rejected with 422.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/bots/{bot_id}
curl https://api.landbot.io/v0-alpha/bots/123e4567-e89b-12d3-a456-426614174000 \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token YOUR_AGENT_TOKEN' \
  --data '{
  "name": "",
  "workspace": null,
  "is_active": true,
  "state": "active"
}'
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "string",
    "channel_family": "landbot",
    "channels": [
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "state": "active",
    "is_active": true,
    "preview_only": true,
    "required_tier": "sandbox",
    "builder_version": "string",
    "workspace": 1,
    "is_published": true,
    "has_unpublished_changes": true,
    "created_at": "2026-09-16T09:18:19",
    "edited_at": "2026-09-16T09:18:19",
    "last_published_at": "2026-09-16T09:18:19"
  }
}