---
title: "Put this chat in a workspace, creating it when asked. The chats of a workspace share its sandbox, projects and architecture blueprint."
method: PUT
path: "/ai/conversations/{public_id}/workspace"
tags: ["AI Chat"]
---

# Put this chat in a workspace, creating it when asked. The chats of a workspace share its sandbox, projects and architecture blueprint.

`PUT /ai/conversations/{public_id}/workspace`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/conversations/{public_id}/workspace`
- Auth: HTTP bearer

## Path parameters

- `public_id` string, required

## Request body

- SetChatWorkspaceRequest: Put a chat in a workspace: an existing one (`application_id`) or a new one (`create`). Exactly one of the two.
  - `application_id` string, nullable
  - `create` NewChatWorkspace: A new workspace to create for the chat.
    - `description` string, nullable
    - `name` string, required
  - `keep_sandbox` 'workspace' | 'chat': Which sandbox the chats keep when a chat with a sandbox of its own joins a workspace that already has one.

## Response `200`

The chat's workspace

- ChatWorkspaceResponse: A chat's workspace, and the chats in it.
  - `chats` WorkspaceChatSummary[], required: The workspace's chats, most recently active first, at most 20.
    - `last_activity_at` string, required: ISO 8601.
    - `public_id` string, required
    - `title` string, nullable
    - `turn_status` string, required
  - `joinable` boolean, required: Whether this chat can be put in a workspace. Chats about one project cannot: the project is their scope.
  - `reason` string, nullable: Why the chat cannot be in a workspace, when `joinable` is false.
  - `workspace` ChatWorkspace: The workspace a chat is in.
    - `description` string, nullable
    - `name` string, required
    - `public_id` string, required: Public id of the workspace (`app_…`).

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Conversation or workspace not found
- `500`: Internal server error

## Changes

> 81 revisions in range; 1 not diffed.

- **2026-10-20** `79089e9f49ee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/conversations/:public_id/workspace/put.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) · [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) · [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/ab6d5d19e930?raw)
