Skip to main content
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
BlurHash placeholder for an image or video. Null when unavailable or removed by moderation.
string | null
required
The original file’s MIME type, for example application/pdf. It is kept when moderation removes the file.
string
required
When the file was created, as an ISO 8601 timestamp.
number | null
required
Audio or video duration in seconds. Null when unavailable or removed by moderation.
string | null
required
The original filename, including its extension.
integer | null
required
Image or video height in pixels. Null when unavailable or removed by moderation.
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.
boolean
required
Whether moderation removed the file. When true, url serves a replacement image. filename, size and content_type still describe the original 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. Public files get a permanent CDN URL, and private files get a signed URL that expires. null until the upload has finished. When moderation removes the file, a replacement image URL.
string
required
public files are served from an unsigned CDN URL. private files are served from a signed URL that expires.Available options: public, private
string | null
required
Audio waveform URL. Null when unavailable or removed by moderation.
integer | null
required
Image or video width in pixels. Null when unavailable or removed by moderation.
File