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

# Upload File

> Upload a file to asset storage

Upload a file via multipart form data. The file is stored in R2 and tracked in the team's asset library.

## Authentication

<ParamField header="Authorization" type="string">
  Bearer token. `Bearer <supabase-jwt>`.
</ParamField>

## Body

Send as `multipart/form-data`.

<ParamField body="file" type="file" required>
  The file to upload.
</ParamField>

<ParamField body="filename" type="string">
  Override the filename. Defaults to the original file name.
</ParamField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "public_url": "https://cdn.supapost.so/assets/team-uuid/1712000000-photo.jpg",
    "key": "assets/team-uuid/1712000000-photo.jpg"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "message": "file is required"
  }
  ```
</ResponseExample>
