---
title: "Enables a bot"
method: POST
path: "/ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/{botId}"
tags: ["bot"]
---

# Enables a bot

`POST /ocs/v2.php/apps/spreed/api/{apiVersion}/bot/{token}/{botId}`

## Path parameters

- `apiVersion` 'v1', required
- `token` string, required
- `botId` integer, required

## Headers

- `OCS-APIRequest` boolean, required

## Response `200`

Bot already enabled

- object
  - `ocs` object, required
    - `meta` OCSMeta, required
      - `status` string, required
      - `statuscode` integer, required
      - `message` string
      - `totalitems` string
      - `itemsperpage` string
    - `data` Bot, required
      - `description` string, nullable, required — A longer description of the bot helping moderators to decide if they want to enable this bot
      - `id` integer, required — Unique numeric identifier of the bot on this server
      - `name` string, required — Display name of the bot shown as author when it posts a message or reaction
      - `state` integer, required — One of the [Bot states](https://nextcloud-talk.readthedocs.io/en/latest/constants#bot-states)

## Other responses

- `201` — Bot enabled successfully
- `400` — Enabling bot errored, e.g. when the conversation is classified
- `401` — Current user is not logged in

---

[API](https://skmtc.dev/nextcloud/apis/spreed-full.md) · [All operations](https://skmtc.dev/nextcloud/apis/spreed-full/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nextcloud/spreed-full/revisions/41d6458d6d6e/schema)
