---
title: "Upload Attachment"
method: POST
path: "/v1/attachments"
---

# Upload Attachment

`POST /v1/attachments`

## Request

- Base URL: `https://www.tandem-cc.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.tandem-cc.com/v1/attachments`
- Auth: none declared

Upload a file from the web composer (the paperclip button).

Accepts JSON ``{filename, content_base64, content_type?}`` (base64 keeps
the upload on the same JSON path as the rest of the API — no multipart
dependency). Stores the blob and creates an attachment row owned by the
signed-in handle; ``message_id`` stays NULL until the message is sent,
which binds it via ``bind_owned_attachments_to_message``. Same 25MB cap
as the ``attach`` verb. Returns the new attachment_id + metadata.

## Headers

- `X-Tandem-Api-Key` string, nullable
- `Authorization` string, nullable

## Request body

- object

## Response `201`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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