Idempotency
Send `Idempotency-Key` on `POST /api/v1/media` so retries after network failures do not create duplicate uploads.
Publish and export clients retry on network loss, timeouts, and ambiguous responses. POST /api/v1/media accepts:
Idempotency-Key: <unique-string>
Semantics
- Same key + same request body → same
media_idresponse (safe retry) - Same key + different body → 409 conflict
- Keys are scoped to the authenticated principal and workspace
Lightroom recommendation
Use a stable key per publish attempt, e.g.:
lr-{catalogId}-{photoUuid}-{exportRevision}
Store the returned media_id on the published photo so re-publish can choose update vs new upload when PATCH media exists.
