---
title: "Save Chat"
method: POST
path: "/api/mcp/save_chat"
tags: ["mcp"]
---

# Save Chat

`POST /api/mcp/save_chat`

## Request

- Base URL: `https://writer.swapp1990.org` (the document declares no server; this is the origin it was published from)
- URL: `https://writer.swapp1990.org/api/mcp/save_chat`
- Auth: none declared

Persist a chat thread to a chapter+revision slot.

Replaces any prior thread at that slot — pass the FULL message
history each time, not a delta. `chapter_chat(auto_save=true)`
does this automatically; this endpoint is for callers that build
the thread themselves.

## Request body

- SaveChatInput
  - `job_id` string, required: The story job ID.
  - `chapter` integer, required
  - `revision` integer: Revision number. 0 = general chapter chat.
  - `slot` string, nullable: Optional non-chapter chat slot, e.g. selected paragraph thread.
  - `messages` PlanMessage[]
    - `role` string, required
    - `content` string
    - `plan` object, nullable
    - `cover` object, nullable
    - `writer_thinking` string, nullable
    - `writer_thinking_data` object, nullable
    - `metadata` object, nullable
    - `type` string, nullable
    - `applied_at` string, nullable
    - `applied_revision` integer, nullable
    - `applied_status` string, nullable

## Response `200`

Successful Response

- GenericToolResponse: Fallback for tools whose payload is still being tightened.
  - `story_url` string, nullable
  - `article_url` string, nullable
  - `job_id` string, nullable
  - `status` string, nullable
  - `is_terminal` boolean, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api.md) · [All operations](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api/revisions/ce5e2a89ab4d?raw)
