---
title: "Get presigned URL for file upload"
method: POST
path: "/api/resources/upload-url"
tags: ["Resources"]
---

# Get presigned URL for file upload

`POST /api/resources/upload-url`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/resources/upload-url`
- Auth: HTTP bearer

## Request body

- object
  - `filename` string, required
  - `content_type` string, required
  - `cohort_id` string, uuid

## Response `200`

Presigned upload URL

- object
  - `success` boolean
  - `data` PresignedUploadResponse
    - `upload_url` string: Presigned URL for uploading file to S3
    - `download_url` string: Signed CloudFront URL for downloading after upload
    - `key` string: S3 object key
    - `expires_in` integer: URL expiration time in seconds

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
