---
title: "Upload a file to a card"
method: POST
path: "/cards/{id}/attachments"
---

# Upload a file to a card

`POST /cards/{id}/attachments`

## Request

- Base URL: `https://craaft.io/api/v1`
- URL: `https://craaft.io/api/v1/cards/{id}/attachments`
- Auth: HTTP bearer

Multipart upload with a single `file` part. Bytes flow through the
API to object storage (max **25 MiB** per file). Requires the card's
workspace to be on a paid plan - Free workspaces receive `402`.

## Response `201`

Created

- Attachment
  - `id` string, uuid, required
  - `cardId` string, uuid, required
  - `name` string, required: Original filename
  - `size` integer, required: Byte size
  - `contentType` string, required
  - `uploadedBy` string, uuid, required
  - `uploadedByName` string, required
  - `createdAt` string, date-time, required

## Other responses

- `400`: Missing/empty file or malformed multipart body
- `402`: Workspace plan does not allow uploads
- `404`: Resource doesn't exist or caller isn't a member of its workspace
- `413`: File exceeds the 25 MiB limit

---

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