Files

Retrieves a file you uploaded — poll it after uploading the bytes to see upload_status become ready. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource.

get/files/{id}

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required

The unique identifier of the file, prefixed file_.

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Response

file retrieved

File required
blurhash, string nullable required

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

content_type, string nullable required

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

created_at, string required

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

duration_seconds, number nullable required

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

filename, string nullable required

The original filename, including its extension.

height, integer nullable required

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

id, string required

The file's ID, prefixed file_.

multipart_chunk_size, integer nullable

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

multipart_upload_id, string nullable

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

multipart_upload_urls, FileMultipartUrl[] nullable
object, string required

The type of this object, always file.

optimized_url, string nullable required

URL to the optimized file. null when no optimized version is available.

removed_by_moderation, boolean required

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

size, integer nullable required

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

upload_headers, object

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_url, string nullable

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

url, string nullable 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.

visibility, 'public' | 'private' required

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

waveform_url, string nullable required

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

width, integer nullable required

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

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

    • info

      added the required property optimized_url to the response with the status

    • info

      added the required property blurhash to the response with the status

    • info

      added the required property duration_seconds to the response with the status

    4 more changes in this revision