---
title: "Upload Chat Attachment"
method: POST
path: "/api/chat/attachments"
tags: ["chat"]
---

# Upload Chat Attachment

`POST /api/chat/attachments`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/chat/attachments`
- Auth: HTTP bearer

Upload a single file (PDF/TXT/MD/DOCX/CSV/HTML, ≤10MB), parse to plain text,
and return an attachment id the frontend can pass in chat send via attachment_ids.

上传单个附件（PDF/TXT/MD/DOCX/CSV/HTML，≤10MB），解析为文本后返回附件 id。

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
