Skip to main content
POST
Complete Multipart Upload
Completing a multipart upload assembles the parts and runs the same verification as POST /files/{fileId}/finalize: the stored bytes must decode as the declared media type, and videos must contain a playable video stream. Only then is the CDN file.url created.

Body Parameters

array
required
Every part from Start Multipart Upload, each once: { "partNumber": 1, "etag": "\"…\"" }. etag is the ETag response header from that part’s PUT, quoted or not. Order does not matter.
Send a stable Idempotency-Key. Retrying with the same key returns the same finalized file.

Response

200 with file (id, url, contentType, filename, size, createdAt). Videos also include attestation with the verified durationMs, width, height, and sha256.

Error Responses

  • 400 upload_failed - a part is missing, listed twice, or its etag does not match the uploaded part; the upload expired or was aborted; or the bytes failed verification
  • 400 invalid_request - Idempotency-Key is missing or invalid
  • 422 invalid_payload - parts is empty or malformed