Files

Complete File Multipart Upload

Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the multipart_upload_id from Create File and each part's ETag response header. For a step-by-step walkthrough of multipart uploads, see the direct file uploads guide.

post/files/{id}/complete

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

multipart_upload_idstring required

The ID of the multipart upload, returned by Create File.

Example request

{
  "multipart_parts": [
    {
      "etag": "etag-1",
      "part_number": 1
    }
  ],
  "multipart_upload_id": "upload-id"
}

Response

multipart upload completed

content_typestring nullable required

The file's MIME type, e.g. application/pdf.

created_atstring required

When the file was created, as an ISO 8601 timestamp.

filenamestring nullable required

The original filename, including its extension.

idstring required

The file's ID, prefixed file_.

multipart_chunk_sizeinteger nullable

The byte size each part (except the last) must be. Present only on create, and only for multipart uploads.

multipart_upload_idstring nullable

The ID of the multipart upload, passed back to complete. Present only on create, and only for multipart uploads.

objectstring required

The type of this object, always file.

sizeinteger nullable required

The file size in bytes. null until the upload has finished.

upload_headersobject

Headers to send with the upload PUT. Present only on create.

upload_status'pending' | 'processing' | 'ready' | 'failed' required

Where the file is in its upload lifecycle.

upload_urlstring nullable

Presigned URL to PUT the file's bytes to. Present only on create, and only for single-part uploads.

urlstring nullable required

A URL to download the file: a permanent CDN URL for public files, a signed expiring URL for private ones. null until the upload has finished.

visibility'public' | 'private' required

public files are served via an unsigned CDN URL; private files via a signed, expiring URL.

Example response

{
  "content_type": "application/pdf",
  "created_at": "2026-01-01T12:00:00.000Z",
  "filename": "evidence.pdf",
  "id": "file_xxxxxxxxxxxxxx",
  "multipart_chunk_size": 5242880,
  "multipart_upload_id": "upload-id",
  "multipart_upload_urls": [
    {
      "part_number": 1,
      "url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
    }
  ],
  "object": "file",
  "size": 9670,
  "upload_headers": {},
  "upload_status": "pending",
  "upload_url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf",
  "url": "https://whop-assets-example.s3.amazonaws.com/uploads/audio/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "visibility": "private"
}

Changes