---
title: "Create Workspace Chat"
method: POST
path: "/v1/workspaces/{workspaceId}/chats"
tags: ["Replica"]
---

# Create Workspace Chat

`POST /v1/workspaces/{workspaceId}/chats`

Creates a chat immediately. For preparing or sleeping workspaces, the chat stays visible and is created in the engine after startup completes. Archived and error workspaces return 409.

## Path parameters

- `workspaceId` string, uuid, required

## Request body

- CreateChatRequest — Request body for creating a new chat
  - `provider` 'claude' | 'codex' | 'cursor' | 'opencode' | 'pi', required — Coding agent provider for this chat
  - `id` string, uuid — Optional client-generated chat ID.
  - `createdAt` string, date-time — Optional client-generated creation time.
  - `title` string — Title for the chat
  - `parentChatId` string, uuid — Optional parent chat ID.
  - `clientRequestId` string — Opaque client-chosen id echoed back in the `chat.created` event, so clients doing optimistic UI can recognize their own create

## Response `201`

Chat accepted

- CreateWorkspaceChatResponse
  - `chat` WorkspaceChat, required
    - `id` string, uuid, required
    - `provider` 'claude' | 'codex' | 'cursor' | 'opencode' | 'pi', required
    - `title` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `processing` boolean, required
    - `parentChatId` string, uuid, nullable, required
    - `lastMessageText` string, nullable

## Other responses

- `400` — Bad request - Missing or invalid parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Resource not found
- `409` — Conflict - Resource already exists or operation conflicts with current state
- `500` — Internal server error

---

[API](https://skmtc.net/tryreplicas/apis/replica-api.md) · [All operations](https://skmtc.net/tryreplicas/apis/replica-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryreplicas/replica-api/versions/aa3b4c932f7a/schema)
