---
title: "Save assistant chat history"
method: PUT
path: "/v1/assistant-chat/history"
tags: ["Assistant Chat"]
---

# Save assistant chat history

`PUT /v1/assistant-chat/history`

Replaces the current user-scoped assistant chat history (ephemeral session context).

## Request body

- SaveAssistantChatHistoryDto
  - `messages` AssistantChatMessageDto[], required
    - `id` string, required
    - `role` 'user' | 'assistant', required
    - `text` string, required
    - `createdAt` number, required — Unix epoch millis

## Response `200`

---

[API](https://skmtc.dev/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.dev/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/ac8d1e4e2e79/schema)
