Replaces an AI chat conversation's tags with the given list of tag ids or names; names that do not exist yet are created as case tags. Returns the updated conversation, where attachedTags leave out tags the other side added by hand.
PATCH
/ai-chat/{caseId}/profile/{providerId}/conversation/{conversationId}/tags
curl \
--request PATCH 'http://api.example.com/ai-chat/{caseId}/profile/{providerId}/conversation/{conversationId}/tags' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"tags": [
"string"
]
}'
Request examples
{
"tags": [
"string"
]
}
Response examples (200)
{
"data": {
"createdAt": "2026-01-15T14:30:00.000Z",
"updatedAt": "2026-01-15T14:30:00.000Z",
"id": "507f1f77bcf86cd799439011",
"aiChatProvider": "65a1b2c3d4e5f6a7b8c9d0e2",
"externalId": "conv_01HZX3K9P7",
"title": "Lease review",
"createdDate": "2026-01-15T14:28:00.000Z",
"updatedDate": "2026-01-15T14:41:00.000Z",
"model": "gpt-4o",
"projectId": "0f8e2c1a-6b7d-4e3f-9a1b-2c3d4e5f6a7b",
"projectName": "Contract reviews",
"systemPrompt": "You are a helpful assistant.",
"isShared": false,
"messagesCount": 12,
"firstMessageDate": "2026-01-15T14:28:00.000Z",
"lastMessageDate": "2026-01-15T14:41:00.000Z",
"lastMessageText": "Here is a plain-English summary of clause 4.",
"totalInputTokens": 0,
"totalOutputTokens": 0,
"tags": [
{
"_id": "65a1b2c3d4e5f6a7b8c9d0a1",
"name": "Responsive"
}
],
"commentsCount": 2,
"comments": [
{
"_id": "65a1b2c3d4e5f6a7b8c9d0e3",
"case": "507f1f77bcf86cd799439011",
"comment": "65a1b2c3d4e5f6a7b8c9d0e2"
}
],
"attachedTags": [
{
"tagId": "507f1f77bcf86cd799439011",
"tag": "Important",
"addedBy": "user",
"addedById": "507f1f77bcf86cd799439012",
"removedAt": "2026-05-04T09:42:00Z",
"removedBy": "user",
"removedById": "string"
}
]
},
"statusCode": 200,
"timestamp": "2026-01-15T10:15:00.000Z"
}