---
title: "Create session"
method: POST
path: "/workspaces/{id}/sessions"
tags: ["sessions"]
---

# Create session

`POST /workspaces/{id}/sessions`

## Path parameters

- `id` string, required

## Request body

- ProtoSession
  - `attached_clients` integer
  - `completion_tokens` integer
  - `cost` number
  - `created_at` integer
  - `id` string
  - `is_busy` boolean
  - `message_count` integer
  - `parent_session_id` string
  - `prompt_tokens` integer
  - `summary_message_id` string
  - `title` string
  - `todos` ProtoTodo[]
    - `active_form` string
    - `content` string
    - `status` string
  - `updated_at` integer

## Response `200`

OK

- ProtoSession
  - `attached_clients` integer
  - `completion_tokens` integer
  - `cost` number
  - `created_at` integer
  - `id` string
  - `is_busy` boolean
  - `message_count` integer
  - `parent_session_id` string
  - `prompt_tokens` integer
  - `summary_message_id` string
  - `title` string
  - `todos` ProtoTodo[]
    - `active_form` string
    - `content` string
    - `status` string
  - `updated_at` integer

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/charmbracelet/apis/crush-api.md) · [All operations](https://skmtc.dev/charmbracelet/apis/crush-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/charmbracelet/crush-api/revisions/81bee9ef86c6/schema)
