---
title: "Update Chat"
method: PATCH
path: "/workspaces/{workspace_id}/chat/chats/{chat_id}"
tags: ["chat"]
---

# Update Chat

`PATCH /workspaces/{workspace_id}/chat/chats/{chat_id}`

## Path parameters

- `chat_id` string, uuid, required
- `workspace_id` string, uuid, required

## Request body

- UpdateChatRequest — PATCH body: rename, focus routing, and/or clearing the cohort rung. `focused_persona_id` is tri-state — absent (leave), null (clear focus -> analyst), or a persona id (focus mode); the service reads `model_fields_set` to tell absent from null.
  - `name` string, nullable
  - `focused_persona_id` string, uuid, nullable
  - `cohort_filter` unknown
  - `population_id` unknown

## Response `200`

Successful Response

- Chat — The one chat shape — the `chats` columns, plus the fetch-time `can_write` flag (reads are workspace-wide, writes owner-scoped), the joined `population_name`/`focused_persona_name` (chat-v2 Decision 30: labels ride the chat row, no extra fetch), and the service-derived cohort enrichment (single-row reads only, chat-scope-ladder Decision 9).
  - `id` string, uuid, required
  - `workspace_id` string, uuid, required
  - `population_id` string, uuid, nullable, required
  - `population_name` string, nullable, required
  - `owner_id` string, uuid, required
  - `owner_name` string, nullable
  - `name` string, nullable, required
  - `cohort_filter` object, nullable, required
  - `cohort_label` string, nullable
  - `cohort_size` integer, nullable
  - `focused_persona_id` string, uuid, nullable, required
  - `focused_persona_name` string, nullable, required
  - `has_study_draft` boolean, required
  - `created_at` string, required
  - `updated_at` string, required
  - `can_write` boolean, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/useauxos/apis/auxos.md) · [All operations](https://skmtc.dev/useauxos/apis/auxos/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/useauxos/auxos/revisions/2f853c0b59f4/schema)
