---
title: "Generate Presigned Urls Endpoint"
method: POST
path: "/generatePresignedUrls"
---

# Generate Presigned Urls Endpoint

`POST /generatePresignedUrls`

Generates presigned URLs for uploading files to S3.

Request Body:
    files (list): List of file information with contentType (required)
    projectId (int): The ID of the project (required)
    folderName (str): Optional folder name for organization
    photographerId (str): Optional ID of the photographer
    
Returns:
    JSON response with:
        - urls: List of objects containing file id, key, presigned URL, and contentType
        
Errors:
    - 401 if user is not authenticated
    - 403 if user lacks permission
    - 400 if required parameters are missing
    - 500 if S3 service access fails

## Request body

- GeneratePresignedUrlsRequest
  - `files` FileInfo[], required
    - `extension` string, required
    - `contentType` string, required
  - `projectId` integer, required
  - `folderName` string, nullable
  - `photographerId` string, nullable
  - `fileType` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/pavoot/apis/fastapi.md) · [All operations](https://skmtc.dev/pavoot/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pavoot/fastapi/revisions/16997cca6697/schema)
