---
title: "Generate a presigned URL for direct CSV upload"
method: POST
path: "/api/v1/s3/presigned-upload-url"
tags: ["main", "s3"]
---

# Generate a presigned URL for direct CSV upload

`POST /api/v1/s3/presigned-upload-url`

Generate a presigned PUT URL for direct CSV file upload to S3/MinIO.

This endpoint enables browser-to-storage uploads without passing through the backend

Access Control:
* All authenticated users can upload CSV files scoped to their organization.
* Files are stored with organization-scoped keys for multi-tenancy.

Returns:
* upload_url: Presigned URL (valid for 15 minutes) for PUT request
* file_key: Unique storage key to use as source_id in campaign creation
* expires_in: URL expiration time in seconds

## Headers

- `authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- PresignedUploadUrlRequest
  - `file_name` string, required — CSV filename
  - `file_size` integer, required — File size in bytes (max 10MB)
  - `content_type` string — File content type

## Response `200`

Successful Response

- PresignedUploadUrlResponse
  - `upload_url` string, required
  - `file_key` string, required
  - `expires_in` integer, required

## Other responses

- `404` — Not found
- `422` — Validation Error

---

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