Skip to navigation

Start an upload session

Starts a single-use link that a person sends one photo through, with no API key: for an agent that never holds the photo. Send the upload_url to the person; they open it to choose the photo, or send it with curl -T photo.jpg <upload_url>. Treat the link as opaque, like a presigned URL: it takes a PUT of the image bytes with their Content-Type and no API key, and answers 201 with the stored session. The first stored photo wins and a later send answers 409 UPLOAD_ALREADY_USED; a refused body (413, 415, 422) leaves the link usable; an unknown, expired or revoked link answers 404 UPLOAD_NOT_FOUND. The link works once and expires at expires_at (15 minutes); the photo is held to max_bytes and content_types, the limits of POST /v1/assets. Read the session until it is stored, then retain its asset_id as evidence. upload_url carries the link’s secret, which is stored only as a digest: it is in this answer only. Send an Idempotency-Key: it is required, and a retry with the same key answers the same session with upload_url null and Idempotency-Replayed: true; start a new session for a new link. Requires the digitisation.write scope; served only where digitisation and upload sessions are enabled for your environment.

Authentication

X-API-Keystring

API key for one environment of your account. Keep server-side; never expose in browser clients.

Headers

Idempotency-Keystring or nullOptional

Response

The session and its single-use upload_url; a replay under the same Idempotency-Key answers it with Idempotency-Replayed: true and no url

asset_idstring or null
content_typeslist of enums
Allowed values:
expires_atdatetime
idstring
max_bytesinteger
statusenum
Allowed values:
upload_urlstring or null

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
503
Service Unavailable Error