---
title: "Deactivate documents in a chat"
method: POST
path: "/chats/{chat_id}/inactive-documents"
tags: ["Chat"]
---

# Deactivate documents in a chat

`POST /chats/{chat_id}/inactive-documents`

Exclude the given documents from the chat's retrieval context.

## Path parameters

- `chat_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Response `201`

Successful Response

- ChatInactiveDocument[]
  - `creator_user_id` integer, required — ID of the user who marked the document inactive.
  - `created_at` string, date-time — Timestamp when the document was marked inactive in the chat.
  - `chat_id` integer, required — ID of the chat the inactive document belongs to.
  - `document_id` integer, required — ID of the document marked inactive in the chat.

## Other responses

- `401` — Missing or invalid authentication.
- `403` — No access to this chat.
- `404` — Chat or one of the documents does not exist.
- `422` — Validation Error

---

[API](https://skmtc.net/neulandai/apis/neuland-ai-hub-api.md) · [All operations](https://skmtc.net/neulandai/apis/neuland-ai-hub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neulandai/neuland-ai-hub-api/revisions/b53e89b98c2b/schema)
