Skip to main content
POST
TypeScript

Autorisations

Authorization
string
header
requis

An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

En-têtes

Idempotency-Key
string

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

Maximum string length: 255
Exemple:

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

Api-Version-Date
string

Pins the request to a dated API version.

Exemple:

"2026-11-17"

Corps

application/json
filename
string
requis

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

Exemple:

"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).

Exemple:

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.

Exemple:

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.

Options disponibles:
public,
private
Exemple:

"public"

Réponse

file created with a single-part upload destination

blurhash
string | null
requis

BlurHash placeholder for an image or video. Null when unavailable or removed by moderation.

Exemple:

null

content_type
string | null
requis

The original file's MIME type, for example application/pdf. It is kept when moderation removes the file.

Exemple:

"application/pdf"

created_at
string
requis

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

Exemple:

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

duration_seconds
number | null
requis

Audio or video duration in seconds. Null when unavailable or removed by moderation.

Exemple:

null

filename
string | null
requis

The original filename, including its extension.

Exemple:

"evidence.pdf"

height
integer | null
requis

Image or video height in pixels. Null when unavailable or removed by moderation.

Exemple:

null

id
string
requis

The file's ID, prefixed file_.

Exemple:

"file_xxxxxxxxxxxxxx"

object
string
requis

The type of this object, always file.

Exemple:

"file"

removed_by_moderation
boolean
requis

Whether moderation removed the file. When true, url serves a replacement image. filename, size and content_type still describe the original file.

Exemple:

false

size
integer | null
requis

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

Exemple:

9670

upload_status
enum<string>
requis

Where the file is in its upload lifecycle.

Options disponibles:
pending,
processing,
ready,
failed
Exemple:

"pending"

url
string | null
requis

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.

Exemple:

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

visibility
enum<string>
requis

public files are served from an unsigned CDN URL. private files are served from a signed URL that expires.

Options disponibles:
public,
private
Exemple:

"private"

waveform_url
string | null
requis

Audio waveform URL. Null when unavailable or removed by moderation.

Exemple:

null

width
integer | null
requis

Image or video width in pixels. Null when unavailable or removed by moderation.

Exemple:

null

multipart_chunk_size
integer | null

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

Exemple:

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.

Exemple:

"upload-id"

multipart_upload_urls
object[] | null
upload_headers
object

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

Exemple:
upload_url
string | null

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

Exemple:

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