> For the complete documentation index, see [llms.txt](https://docs.cekat.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cekat.ai/api-documentation/chat/conversation/update-a-conversation.md).

# Update a conversation

Changes which AI agent replies in a conversation, and whether it stays assigned after the conversation is resolved. Each change adds a system note to the conversation.

```json
{"openapi":"3.0.3","info":{"title":"Cekat Open API","version":"1.0.0"},"tags":[{"name":"Conversation","description":"A conversation is the chat thread between one contact and one of your inboxes. Use these endpoints to list conversations, read one in detail, see which human agent handled each one, and change the AI agent that replies."}],"servers":[{"url":"https://api.cekat.ai","description":"Production"}],"security":[{"CekatApiKey":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"CekatApiKey":{"type":"apiKey","in":"header","name":"api_key","description":"Your business's Cekat API key, from **Settings → Developers & API** in the Cekat dashboard (https://chat.cekat.ai/developers?section=apikeys). Available on the Business and Enterprise plans."},"BearerAuth":{"type":"http","scheme":"bearer","description":"The same Cekat API key, sent as `Authorization: Bearer YOUR_API_KEY`. Accepted only by endpoints under `/api/...`."}},"schemas":{"ApiError":{"type":"object","description":"Error body returned by the `/api/...` endpoints.","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"statusCode":{"type":"integer"},"error":{"type":"object","properties":{"message":{"type":"string"}}},"correlationId":{"type":"string","description":"Request ID. Include it when contacting Cekat support."}}},"RateLimitError":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"ApiUnauthorized":{"description":"The API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"ApiNotFound":{"description":"The resource was not found or does not belong to your business.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Wait and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}}}},"paths":{"/api/conversations/{conversation_id}":{"put":{"tags":["Conversation"],"operationId":"UpdateConversation","summary":"Update a conversation","description":"Changes which AI agent replies in a conversation, and whether it stays assigned after the conversation is resolved. Each change adds a system note to the conversation.","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assigned_ai_agent":{"type":"string","format":"uuid","description":"ID of the AI agent to assign."},"keep_assigned_ai_agent_on_resolve":{"type":"boolean","description":"Keep the AI agent assigned after the conversation is resolved. Not allowed on inboxes that use a flow."}}}}}},"responses":{"200":{"description":"Conversation updated.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","additionalProperties":true,"description":"The updated conversation record."}}}}}},"400":{"description":"The AI agent was not found, `keep_assigned_ai_agent_on_resolve` is not a boolean, or the inbox uses a flow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"$ref":"#/components/responses/ApiUnauthorized"},"404":{"$ref":"#/components/responses/ApiNotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}
```
