---
title: "Bot Switch Workspace Route"
method: POST
path: "/api/v1/bot/switch-workspace"
tags: ["bot"]
---

# Bot Switch Workspace Route

`POST /api/v1/bot/switch-workspace`

Set which linked workspace the bot answers for this platform user. 404 if the user
isn't linked to the requested workspace.

## Query parameters

- `provider` string, required
- `platform_user_id` string, required

## Request body

- BotSwitchRequest
  - `workspace_id` string, required

## Response `200`

Successful Response

- EnvelopeBotSwitchResult
  - `data` BotSwitchResult, required
    - `switched` boolean, required
    - `name` string, nullable
  - `meta` Meta
    - `request_id` string
    - `timestamp` string, date-time
    - `total` integer, nullable
    - `truncated` boolean, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/minro/apis/minro-cs-platform.md) · [All operations](https://skmtc.dev/minro/apis/minro-cs-platform/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/minro/minro-cs-platform/revisions/eb854265cf29/schema)
