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

# Update Conversation

Update a conversation's editable metadata (subject, context).

Users can only update conversations they created. Fields are applied with PATCH semantics: an omitted field is left unchanged, a `null` field is cleared. Typically used to refresh `context` when the user switches page during an agent conversation.

```json
{"openapi":"3.1.0","info":{"title":"Ibexa Agentic Marketing Platform","version":"0.1.0"},"security":[{"OAuth2PasswordBearer":[]}],"components":{"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/login/access-token"}}}},"schemas":{"UpdateConversationPayloadSchema":{"properties":{"subject":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subject","description":"Optional subject"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context","description":"Context the assistant works within, as a free-form mapping (e.g. {\"report_id\": 67}). Replaces the stored context."}},"type":"object","title":"UpdateConversationPayloadSchema","description":"Pydantic schema for updating a conversation's editable metadata.\n\nFields are applied with PATCH semantics: an omitted field is left unchanged,\nwhile a field sent as ``null`` clears the stored value. ``context`` fully\nreplaces the stored mapping (no deep merge)."},"ConversationResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"agent_id":{"type":"integer","title":"Agent Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"feedback_rate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Feedback Rate"},"parent_conversation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Conversation Id","description":"ID of the parent conversation when this is a sub-agent conversation, otherwise null."}},"type":"object","required":["id","agent_id","created_by"],"title":"ConversationResponseSchema","description":"Pydantic schema for conversation response."}}},"paths":{"/api/v1/conversations/{conversation_id}":{"patch":{"tags":["conversations","public"],"summary":"Update Conversation","description":"Update a conversation's editable metadata (subject, context).\n\nUsers can only update conversations they created. Fields are applied with\nPATCH semantics: an omitted field is left unchanged, a ``null`` field is\ncleared. Typically used to refresh ``context`` when the user switches page\nduring an agent conversation.","operationId":"conversations-update_conversation","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversationPayloadSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponseSchema"}}}},"400":{"description":"Invalid request payload or parameters","content":{"application/json":{}}},"401":{"description":"User not authenticated","content":{"application/json":{}}},"403":{"description":"User lacks permission","content":{"application/json":{}}},"404":{"description":"Resource not found or user has no permission to access it","content":{"application/json":{}}}}}}}}
```
