# Uploads (/reference/public-api/uploads)

<Steps>
<Step>
### Prepare [#prepare]

`POST /api/v1/uploads` with `name` and `size` (exact bytes, at least 1). `lastModified` (Unix milliseconds), `author` and `language` are optional. The content type comes from the extension.
</Step>

<Step>
### Send the file [#send-the-file]

PUT the raw file to the returned `url`, with **every returned header**. The URL may be a signed storage URL or a same-origin proxy URL. Prepare another upload if `expiresAt` has passed.
</Step>

<Step>
### Add it to the library [#add-it-to-the-library]

```json title="POST /api/v1/documents"
{ "source": { "type": "upload", "uploadId": "..." } }
```
</Step>
</Steps>

## Expiry and limits [#expiry-and-limits]

- Pending uploads expire after 24 hours. Signed transfer URLs expire after five minutes; proxy URLs last as long as the pending upload.
- The file must match its declared length and the instance's maximum upload size, and its bytes are verified before registration.
- Storage transport and CORS are described in [Object storage](/configure/object-blob-storage).

## DOCX [#docx]

The compute worker converts DOCX to PDF. Without a worker, the request returns `503 COMPUTE_WORKER_REQUIRED`.

Until conversion finishes, creation returns **`202` with an upload resource** rather than a document.

1. Read progress from `statusUrl`, or follow SSE snapshots at `eventsUrl`.
2. Read `statusUrl` once conversion completes. That read verifies and registers the PDF and returns it as `document`.

Conversion continues with the tab closed, but registration still needs the status read. A failed upload includes an error message.

| Upload status | Meaning |
| --- | --- |
| `pending` | Waiting for the file |
| `processing` | Converting |
| `ready` | The file is registered. The PDF itself may still be `not_started` or `processing`. |
| `failed` | `error` explains why |

A compute limit or worker outage does not fail registration; the document parses later. A converted DOCX's file URL serves the PDF.