---
title: "File a chat into a project"
method: POST
path: "/projects/{id}/chats"
tags: ["Projects"]
---

# File a chat into a project

`POST /projects/{id}/chats`

## Request

- Base URL: `https://app.gc.ai/api/external/v1`
- URL: `https://app.gc.ai/api/external/v1/projects/{id}/chats`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/gc-ai/apis/gc-ai-external-api/docs/projects/:id/chats/post.ts> (a function with typed inputs; its response is checked against the schema)

File an existing chat into a project so it is browsable under `GET /projects/{id}/chats` alongside the project's files. If the chat already belongs to another project, this moves it.

Requires write access to the project. User-scoped keys can only file chats they created. Org-scoped keys can file non-access-controlled chats into non-access-controlled projects.

## Path parameters

- `id` string, uuid, required: The project ID

## Request body

- AttachChatRequest
  - `chat_id` string, uuid, required: ID of an existing chat to file into the project

## Response `204`

Chat filed into the project (idempotent)

## Other responses

- `400`: Invalid request body
- `401`: Missing or malformed API key
- `403`: Invalid API key
- `404`: Project not found, chat not found, or insufficient write access
- `429`: Rate limit exceeded. See [Rate Limits](https://docs.gc.ai/api-reference/concepts/rate-limits) for the tiers, limits, and how to back off.
- `500`: Internal server error
- `503`: Service temporarily unavailable

---

[API](https://skmtc.dev/gc-ai/apis/gc-ai-external-api.md) - [All operations](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gc-ai/apis/gc-ai-external-api/revisions/2bbdfddf7107?raw)
