> ## Documentation Index
> Fetch the complete documentation index at: /dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload files

> Store a PDF, doc or text file for a user and make its text findable.

Send the file as base64. Constella stores it and reads its text a little later, the same way it reads files people upload in Constella. Then search and recall find it.

```bash theme={"system"}
curl https://api.constella.app/platform/v1/users/u_123/files \
  -H "Authorization: Bearer $CONSTELLA_APP_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"file_name\": \"lease.pdf\", \"id\": \"doc:lease\", \"data\": \"$(base64 -i lease.pdf)\"}"

# 202 {"job_id": "..."}
```

| Field | | |
| - | - | - |
| `file_name` | required | Up to 200 characters. The ending (`.pdf`, `.docx`, `.txt`) tells Constella how to read it. |
| `data` | required | The file, as base64. Up to 20 MB. |
| `id` | | Your id for the file. Uploading the same id again replaces it. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.