---
search:
  tags:
    - Assets
    - POST
seo:
  description: >-
    Reserves an Asset and returns a presigned PUT URL to upload the bytes to.
    The URL is… Reference for the POST /assets/uploads endpoint in the AdCrunch
    API.
sidebar:
  label: Reserve an Asset and mint an upload URL
  badge: POST
title: Reserve an Asset and mint an upload URL
type: openapi-operation
---
Reserves an Asset and returns a presigned `PUT` URL to upload the bytes to. The URL is valid for one hour, and `expiresAt` says when it stops being accepted.

The client uploads **directly** to storage — the bytes never pass through this worker, because Cloudflare rejects over-limit request bodies at the proxy before any code runs. Read `GET /assets/{id}` once the upload completes.

Send the `PUT` with the header `If-None-Match: *`. A `PUT` without it answers `403`. The URL can create the object once, and never replace it: a second `PUT` answers `412`. A `412` means that the bytes are already stored, so continue and read the Asset. To use a different file, reserve a new Asset.

The URL is the credential: anyone holding it can create that one object until it expires. Nothing is known about the file until a read inspects what actually landed, so size and type cannot be enforced here.

The reserved Asset stays `pending` until a read finds the object. That read completes the Asset and answers it `ready` or `failed`. A read before the `PUT` answers `pending`. A list does not answer a `pending` Asset. The daily sweep finalizes a reservation that nobody read when its object exists, and deletes a reservation with no object, one day after the reservation.

`POST /assets/uploads`
