---
title: "Get presigned URL for media upload"
method: POST
path: "/media/upload-url"
tags: ["Media"]
---

# Get presigned URL for media upload

`POST /media/upload-url`

## Request

- Base URL: `https://socialrobot.io/api/v1`
- URL: `https://socialrobot.io/api/v1/media/upload-url`
- Auth: API key in header `x-api-key`

Get a presigned URL to upload media files to storage. Returns upload URL and permanent file URL.

## Request body

- object
  - `filename` string, required: The original filename including extension
  - `contentType` string, required: The MIME type that will be uploaded

## Response `200`

Upload URL generated successfully

- object
  - `presignedUrl` string, required: The presigned URL for the media
  - `key` string, required: The storage key for the uploaded media
  - `url` string, required: The public URL for the uploaded media
  - `uploadMethod` 'PUT', required: The HTTP method used for upload
  - `contentType` string, required: The MIME type that should be used for the upload

## Other responses

- `400`: Invalid request data
- `401`: Unauthorized - Invalid or missing API key
- `500`: Internal server error

---

[API](https://skmtc.dev/socialrobot/apis/socialrobot-io-scheduler-api.md) · [All operations](https://skmtc.dev/socialrobot/apis/socialrobot-io-scheduler-api/llms.txt) · [OpenAPI document](https://skmtc.dev/socialrobot/apis/socialrobot-io-scheduler-api/revisions/c2e9cdf5e75e?raw)
