---
title: "Add an attachment to a transaction"
method: POST
path: "/transactions/{transactionId}/files"
tags: ["transactions"]
---

# Add an attachment to a transaction

`POST /transactions/{transactionId}/files`

Requires **transactions:read:all** and either of **transactions:write** or **transactions:write:all** scopes.

## Path parameters

- `transactionId` string, uuid, required

## Response `200`

Successful Transaction Response

- object
  - `data` TransactionFile
    - `id` string, required — The id of the file attached to the transaction
    - `fileType` string, required — The MIME type of the file
    - `fileName` string, required — The name of the file attachment
    - `url` string, required — The signed URL that is valid for 5 minutes that allows access to the attachment
  - `links` Links
    - `next` string, uri — The url to retrieve the next page of results from
    - `prev` string, uri — The url to retrieve the previous page of results from
    - `self` string, uri, required — The url of the current resource(s)
  - `meta` object

## Other responses

- `401` — Unsuccessful Response - Not authorised - Missing authorization header - Invalid access Token
- `403` — Unsuccessful Response - Forbidden - Invalid scopes
- `404` — Unsuccessful Response - Resource Not found

---

[API](https://skmtc.net/moneyhub/apis/moneyhub-data-api.md) · [All operations](https://skmtc.net/moneyhub/apis/moneyhub-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/moneyhub/moneyhub-data-api/revisions/f2eb965eb9af/schema)
