---
title: "Get upload URLs for photos used in image fields"
method: POST
path: "/v1/collections/{collectionId}/media/uploads"
tags: ["Collection items"]
---

# Get upload URLs for photos used in image fields

`POST /v1/collections/{collectionId}/media/uploads`

## Request

- Base URL: `https://api.dropl.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dropl.io/v1/collections/{collectionId}/media/uploads`
- Auth: HTTP bearer

Requires the `collections:write` scope (add, edit, reorder, and delete collection items).

## Path parameters

- `collectionId` string, uuid, required

## Request body

- CreatePhotoUploadsRequest
  - `files` object[], required
    - `fileName` string, required
    - `contentType` 'image/jpeg' | 'image/png' | 'image/webp' | 'image/avif' | 'image/heic' | 'image/heif', required
    - `sizeBytes` integer, required
    - `altText` string, nullable: What the photo shows, for screen readers and search engines (e.g. "Cedar deck with glass railing"). Line breaks and invisible characters are removed; null or empty marks the photo decorative.
  - `projectId` string, uuid: The project the photos go into; required in projects showcases.

## Response `201`

Success

- CreatePhotoUploadsResponse
  - `uploads` object[], required
    - `imageId` string, uuid, required
    - `uploadUrl` string, uri, required: PUT the file here with exactly `headers`.
    - `headers` object, required
  - `expiresAt` string, date-time, required

## Other responses

- `400`: Validation failed
- `401`: `INVALID_API_KEY`: missing, invalid, expired, or revoked key
- `403`: `INSUFFICIENT_SCOPE` (names the missing scope), `SITE_RESTRICTED_KEY`, or a plan limit
- `404`: Not found, or outside the key's sites
- `429`: Rate limited

---

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