---
title: "Compact Conversation"
method: POST
path: "/api/chatbot/compact"
tags: ["chatbot"]
---

# Compact Conversation

`POST /api/chatbot/compact`

Trigger conversation compaction inline. Called after a successful chat message.

## Headers

- `x-api-key` string, nullable
- `x-user-id` string, nullable

## Request body

- CompactRequest
  - `conversation_id` string, required

## Response `200`

Successful Response

- CompactResponse
  - `success` boolean, required
  - `messages_compacted` integer
  - `skipped` boolean
  - `reason` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/versions/523833f9e819/schema)
