---
title: "Upload to a link"
method: PUT
path: "/attachments/uploads/{token}"
tags: ["Attachments"]
---

# Upload to a link

`PUT /attachments/uploads/{token}`

## Request

- Base URL: `https://api.caliuapp.com`
- URL: `https://api.caliuapp.com/attachments/uploads/{token}`
- Auth: HTTP bearer

Send the raw bytes of the file an upload link was made for. The token in the path is the credential: no Authorization header.

## Path parameters

- `token` string, required: From upload_url

## Response `201`

File uploaded

- object
  - `attachment` Attachment, required
    - `id` string, required
    - `filename` string, required
    - `content_type` string, required
    - `size_bytes` number, required
    - `r2_key` string, required
    - `created_at` string, required

## Other responses

- `402`: Free storage limit reached (Caliu Pro required)
- `404`: Link unknown, used or expired
- `411`: Content-Length missing
- `413`: File over 100MB
- `500`: Storage failure

---

[API](https://skmtc.dev/caliuapp/apis/caliu-api.md) · [All operations](https://skmtc.dev/caliuapp/apis/caliu-api/llms.txt) · [OpenAPI document](https://skmtc.dev/caliuapp/apis/caliu-api/revisions/1ba4d3f687fe?raw)
