---
title: "Upload a file"
method: POST
path: "/api/attachments"
tags: ["Files"]
---

# Upload a file

`POST /api/attachments`

Upload a file so that it can be attached to a payment link. Only PDFs smaller than 5 MB are supported.

## Response `200`

OK.

- object
  - `fileId` string, uuid — A file ID that should be used in the files property on a create link call.

## Other responses

- `400` — Bad request.
- `401` — Request lacks valid authentication.
- `404` — The specified resource was not found.

---

[API](https://skmtc.net/peachpayments/apis/checkout.md) · [All operations](https://skmtc.net/peachpayments/apis/checkout/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/peachpayments/checkout/revisions/3a98165665f8/schema)
