---
title: "Upload an attachment."
method: POST
path: "/v1/attachments/{id}/upload"
tags: ["attachments"]
---

# Upload an attachment.

`POST /v1/attachments/{id}/upload`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/attachments/{id}/upload`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://demo.firefly-iii.org/oauth/authorize`
    - Token URL: `https://demo.firefly-iii.org/oauth/token`
  - HTTP bearer

Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.

## Path parameters

- `id` string, required

## Headers

- `X-Trace-Id` string, uuid

## Request body `application/octet-stream`

- string, binary

## Response `204`

Upload was a success

## Other responses

- `400`: Bad request
- `401`: Unauthenticated
- `404`: Page not found
- `422`: Validation error. The body will have the exact details.
- `500`: Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-3-0/revisions/ea05639f58ae?raw)
