---
title: "Upload Agent Attachment"
method: POST
path: "/agent/threads/{thread_id}/attachments"
tags: ["agent"]
---

# Upload Agent Attachment

`POST /agent/threads/{thread_id}/attachments`

## Request

- Base URL: `https://api.threadchain.pro` (the document declares no server; this is the origin it was published from)
- URL: `https://api.threadchain.pro/agent/threads/{thread_id}/attachments`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

Store a chat-uploaded file so a later tool call can resolve it by id
(Phase 5 parity with the ADK assistant's attachment upload — see
app/models/agent_attachment.py for why this is a Postgres row instead of
ADK session state).

## Path parameters

- `thread_id` string, required

## Request body `multipart/form-data`

- BodyUploadAgentAttachmentAgentThreadsThreadIdAttachmentsPost
  - `file` string, binary, required

## Response `200`

Successful Response

- AttachmentResponse
  - `attachment_id` string, required
  - `filename` string, required
  - `kind` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/threadchain/apis/threadchain-backend.md) - [All operations](https://skmtc.dev/threadchain/apis/threadchain-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/threadchain/apis/threadchain-backend/revisions/8ee288a7e6bd?raw)
