---
title: "Upload Attachment"
method: POST
path: "/messages/attachments"
tags: ["messaging"]
---

# Upload Attachment

`POST /messages/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/messages/attachments`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

## Request body `multipart/form-data`

- BodyUploadAttachmentMessagesAttachmentsPost
  - `file` string, binary, required

## Response `200`

Successful Response

- AttachmentUploadResponse
  - `url` string, required
  - `name` string, nullable
  - `mime` string, nullable
  - `size` integer, nullable

## 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)
