---
title: "Request a pre-signed upload URL"
method: POST
path: "/open-api/v1.0/media/upload-url"
tags: ["Media Library"]
---

# Request a pre-signed upload URL

`POST /open-api/v1.0/media/upload-url`

*Rate limit: 20 requests / minute per shop. See [Rate limiting](/guides/rate-limiting).*

Returns a pre-signed upload URL for uploading a new image. After receiving the response, PUT the image bytes directly to the uploadUrl.

## Request body

- ComFourthwallOpenapiModelMediaRequestUploadUrlV1
  - `fileName` string, required — Name of the file
  - `contentType` string, required — MIME type of the file
  - `size` integer, required — Size of the file in bytes. Must match the `x-goog-content-length-range` header sent when uploading the bytes to `uploadUrl`.

## Response `201`

Created

- ComFourthwallOpenapiModelMediaUploadUrlResponseV1
  - `uploadUrl` string, required
  - `fileUrl` string, required
  - `expiresAt` string, date-time

## Other responses

- `406` — Possible errors: `MEDIA_FILE_SIZE_EXCEEDED_ERROR`, `UNSUPPORTED_ASSET_TYPE_ERROR`, `UNSUPPORTED_MEDIA_TYPE_ERROR`
- `429` — Rate limited: 20 requests / minute per shop (effective limit). All applicable limits: - `open-api-medium-rate-limiter` — 20 requests / minute per shop - `open-api-rate-limiter` — 100 requests / 10 seconds per shop

---

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