---
title: "uploadFilePublic"
method: POST
path: "/v1/files/public/upload"
tags: ["File"]
---

# uploadFilePublic

`POST /v1/files/public/upload`

Create a pre-signed S3 URL for uploading a file without authentication.

**No authentication required.** This endpoint is intended for public-facing forms and journeys
where end-users need to upload files without logging in.

The uploaded file is stored temporarily (one week). Use `saveFileV2` with proper authentication
to store the file permanently.

**Security note:** Files uploaded via this endpoint are temporary and require authenticated
access to be saved permanently.

## Request body

- UploadFilePayload
  - `filename` string, required
  - `mime_type` string — MIME type of file
  - `index_tag` string — Used to index the file at the storage layer, which helps when browsing for this file
  - `metadata` object — Allows passing in custom metadata for the file, expects key-value pairs of string type

## Response `201`

Pre-signed URL for uploading the file

- object
  - `s3ref` object — S3 reference to use when saving the file permanently
    - `bucket` string, required
    - `key` string, required
  - `upload_url` string, url — Pre-signed URL for uploading the file via PUT request
  - `error` string — Error message if the upload preparation failed

## Other responses

- `400` — Invalid request parameters or payload
- `500` — An unexpected error occurred on the server

---

[API](https://skmtc.net/epilot/apis/file-api.md) · [All operations](https://skmtc.net/epilot/apis/file-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/file-api/revisions/4d61b97f1e97/schema)
