---
title: "Upload a file to a one-time URL"
method: PUT
path: "/uploads/{uploadId}"
tags: ["Messages"]
---

# Upload a file to a one-time URL

`PUT /uploads/{uploadId}`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/uploads/{uploadId}`
- Auth: none required

The receiver for URLs from `attachment-uploads`. No API key: the `t` token
in the query string is the credential. The body is the raw file bytes.
A second upload to the same URL is refused, and so is any wrong or expired
token, with the same `404`.

## Path parameters

- `uploadId` string, uuid, required

## Query parameters

- `t` string, required

## Response `200`

Stored

- object
  - `uploaded` boolean
  - `uploadId` string, uuid
  - `filename` string
  - `sizeBytes` integer

## Other responses

- `400`: Already used
- `404`: Not valid or expired
- `413`: Larger than the slot allows

---

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