Skip to main content
A File is an uploaded document or media object, identified by a file_ ID. Creating a file returns a presigned destination; upload the bytes there and the file becomes ready. Use the Files API to create a file, upload its content directly to storage (in one PUT, or in parts for large files), and retrieve it while polling for readiness. A ready file’s ID can be attached wherever Whop accepts files.

Endpoints

Attributes

string
required
The file’s ID, prefixed file_.
string | null
required
The file’s MIME type, e.g. application/pdf.
string
required
When the file was created, as an ISO 8601 timestamp.
string | null
required
The original filename, including its extension.
integer | null
The byte size each part (except the last) must be. Present only on create, and only for multipart uploads.
string | null
The ID of the multipart upload, passed back to complete. Present only on create, and only for multipart uploads.
object[] | null
The presigned URL for each part. Present only on create, and only for multipart uploads.

Properties

integer
required
The 1-based index of this part within the multipart upload.
string
required
The presigned URL to PUT this part’s bytes to.
string
required
The type of this object, always file.
integer | null
required
The file size in bytes. null until the upload has finished.
object
Headers to send with the upload PUT. Present only on create.
string
required
Where the file is in its upload lifecycle.Available options: pending, processing, ready, failed
string | null
Presigned URL to PUT the file’s bytes to. Present only on create, and only for single-part uploads.
string | null
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.
string
required
public files are served via an unsigned CDN URL; private files via a signed, expiring URL.Available options: public, private
File