---
title: "Delete a chat"
method: DELETE
path: "/chats/{chat_id}"
tags: ["Chat"]
---

# Delete a chat

`DELETE /chats/{chat_id}`

## Request

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

Delete a chat and its messages.

## Path parameters

- `chat_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Response `204`

Successful Response

## Other responses

- `401`: Missing or invalid authentication.
- `403`: No access to this chat.
- `404`: No chat exists with the given id.
- `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)
