Skip to main content
POST
Create File

Authorizations

Authorization
string
header
required

An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.

Headers

Idempotency-Key
string

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

Maximum string length: 255
Example:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-08-25-2"

Body

application/json
filename
string
required

The name of the file including its extension, e.g. terms.pdf.

Example:

"terms.pdf"

byte_size
integer

The file's size in bytes. Required when multipart is true. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB).

Example:

15728640

multipart
boolean

Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB.

Example:

true

visibility
enum<string>

public files are served via an unsigned CDN URL — use for assets anyone may see. private files are served via a signed, expiring URL — use for sensitive documents. Defaults to private.

Available options:
public,
private
Example:

"public"

Response

file created with a single-part upload destination

content_type
string | null
required

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

Example:

"application/pdf"

created_at
string
required

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

Example:

"2026-01-01T12:00:00.000Z"

filename
string | null
required

The original filename, including its extension.

Example:

"evidence.pdf"

id
string
required

The file's ID, prefixed file_.

Example:

"file_xxxxxxxxxxxxxx"

object
string
required

The type of this object, always file.

Example:

"file"

size
integer | null
required

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

Example:

9670

upload_status
enum<string>
required

Where the file is in its upload lifecycle.

Available options:
pending,
processing,
ready,
failed
Example:

"pending"

url
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.

Example:

"https://whop-assets-example.s3.amazonaws.com/uploads/audio/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

visibility
enum<string>
required

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

Available options:
public,
private
Example:

"private"

multipart_chunk_size
integer | null

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

Example:

5242880

multipart_upload_id
string | null

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

Example:

"upload-id"

multipart_upload_urls
object[] | null
upload_headers
object

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

Example:
upload_url
string | null

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

Example:

"https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"