---
title: "Upload file attachment"
method: POST
path: "/v1/files/upload"
---

# Upload file attachment

`POST /v1/files/upload`

## Request

- Base URL: `https://api.runbear.io`
- URL: `https://api.runbear.io/v1/files/upload`
- Auth: HTTP bearer

Upload a file attachment for an agent thread. Supports various file types including documents, images, and text files up to 50MB.

## Request body `multipart/form-data`

- FileUploadRequest
  - `file` union, required: File to upload (max 50MB)
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
    - string, binary
  - `assistant_id` string, uuid, required: Unique identifier of the agent
  - `thread_id` string, uuid, required: Unique identifier of the thread

## Response `200`

Default Response

- FileUploadResult
  - `url` string, uri, required: Public URL of the uploaded file
  - `name` string, required: Path name of the uploaded file
  - `contentType` string, required: MIME type of the uploaded file

## Other responses

- `404`: The thread does not exist, or it is not accessible with the presented credential. Absent and inaccessible threads are deliberately indistinguishable.
- `429`: Rate limit exceeded for this organization and agent. Retry after the number of seconds in the `Retry-After` header. Every response — not only a 429 — carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`.

---

[API](https://skmtc.dev/runbear/apis/runbear-api.md) - [All operations](https://skmtc.dev/runbear/apis/runbear-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runbear/apis/runbear-api/revisions/c6a9c3066a5a?raw)
