---
title: "Get presigned upload URLs for media files"
method: POST
path: "/upload-urls"
tags: ["Media"]
---

# Get presigned upload URLs for media files

`POST /upload-urls`

## Request

- Base URL: `https://post.adaptlypost.com/post/api/v1`
- URL: `https://post.adaptlypost.com/post/api/v1/upload-urls`
- Auth: HTTP bearer

Requires the `media.upload` permission.

## Headers

- `X-Workspace-Id` string

## Request body

- GetUploadUrlsRequest
  - `files` object[], required
    - `fileName` string, required
    - `mimeType` 'image/jpeg' | 'image/png' | 'image/webp' | 'video/mp4' | 'video/quicktime' | 'application/pdf' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', required: Documents (PDF, PPT, PPTX, DOC, DOCX) are for LinkedIn `DOCUMENT` posts. Keep the file extension in `fileName`: the post reads the file type from it

## Response `201`

Presigned upload URLs

- object
  - `urls` object[]
    - `fileName` string
    - `uploadUrl` string: PUT the file bytes to this URL
    - `publicUrl` string: Public URL to reference in mediaUrls after upload. Reusable across posts; the file stays until the last post referencing it has published
    - `key` string
    - `expiresAt` string, date-time

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `403`: The key's role does not hold `media.upload`
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/adaptlypost/apis/adaptlypost-public-api.md) · [All operations](https://skmtc.dev/adaptlypost/apis/adaptlypost-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adaptlypost/apis/adaptlypost-public-api/revisions/8390a5fa9a0d?raw)
