---
title: "Update a conversation"
method: PATCH
path: "/api/projects/{id}/conversations/{convId}"
tags: ["Conversations"]
---

# Update a conversation

`PATCH /api/projects/{id}/conversations/{convId}`

## Request

- Base URL: `https://dosai.pro`
- URL: `https://dosai.pro/api/projects/{id}/conversations/{convId}`
- Auth: HTTP bearer

Rename the client, fix their phone, retag, pin, archive or close the dialog. Send only the fields that change.

## Request body

- ConversationUpdate: All fields optional; send only what changes.
  - `client_name` string
  - `phone` string
  - `tags` string[]
  - `status` 'open' | 'resolved' | 'closed'
  - `archived_at` union: true archives now, false or null un-archives, or pass an ISO timestamp.
    - boolean
    - string, date-time
  - `pinned_at` union: Same shape as archived_at, for pinning.
    - boolean
    - string, date-time

## Response `200`

Updated conversation, wrapped in `data`.

- object
  - `data` Conversation, required
    - `id` string, uuid, required
    - `project_id` string, uuid
    - `chat_id` string
    - `chat_name` string, nullable
    - `client_name` string, nullable
    - `phone` string, nullable
    - `stage` string, nullable
    - `lead_status` string, nullable
    - `status` 'open' | 'resolved' | 'closed'
    - `ai_on` boolean
    - `ai_engaged` boolean: The assistant has replied at least once; this is what makes the dialog count in analytics.
    - `ai_paused_at` string, date-time, nullable
    - `messages_count` integer
    - `last_message_at` string, date-time, nullable
    - `summary` string, nullable
    - `tags` string[], nullable
    - `language` string, nullable
    - `assigned_user_id` string, uuid, nullable
    - `archived_at` string, date-time, nullable
    - `pinned_at` string, date-time, nullable
    - `snoozed_until` string, date-time, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400`: Validation failed.
- `401`: Missing, invalid, expired or revoked key.
- `403`: Not allowed. Distinguish by `code`: `INSUFFICIENT_SCOPE` (read-only key attempted a mutation), `API_KEY_PROJECT_SCOPE` (project-scoped key reached outside its project), `FORBIDDEN` (the user's role on this project is too low), `ACCOUNT_BANNED`.
- `404`: No such resource, or it belongs to another account.
- `429`: Too many requests. 120/min per key overall, plus a stricter per-endpoint budget. Retry after the number of seconds in Retry-After.

---

[API](https://skmtc.dev/dosai/apis/dos-ai-public-api.md) · [All operations](https://skmtc.dev/dosai/apis/dos-ai-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dosai/apis/dos-ai-public-api/revisions/38ce5f4e8f50?raw)
