---
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`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/chats/{chat_id}/inactive-documents`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/chats/:chat_id/inactive-documents/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Path parameters

- `chat_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Request body `application/x-www-form-urlencoded`

- BodyChatsDeactivateDocuments
  - `document_ids` integer[], required

## 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.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
