Skip to main content
POST
Create file
This page documents the Legacy API. For new integrations, use Create File in the Current API.

인증

Authorization
string
header
필수

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

본문

application/json

Parameters for CreateFile

filename
string
필수

The name of the file including its extension (e.g., "photo.png" or "document.pdf").

visibility
enum<string> | null

Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to private.

사용 가능한 옵션:
public,
private

응답

A successful response

A file that has been uploaded or is pending upload.

content_type
string | null
필수

The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg).

예시:

"image/jpeg"

filename
string | null
필수

The original filename of the uploaded file, including its file extension.

예시:

"document.pdf"

id
string
필수

The unique identifier for the file.

예시:

"file_xxxxxxxxxxxxx"

size
string | null
필수

The file size in bytes. Null if the file has not finished uploading.

예시:

"123.45"

upload_headers
object | null
필수

Headers to include in the upload request. Only present in the response from the create mutation.

upload_status
enum<string>
필수

The current upload status of the file (e.g., pending, ready).

사용 가능한 옵션:
pending,
processing,
ready,
failed
upload_url
string | null
필수

The presigned URL to upload the file contents to. Only present in the response from the create mutation.

예시:

"https://media.whop.com/uploads/presigned"

url
string | null
필수

The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading.

visibility
enum<string>
필수

Whether the file is publicly accessible or requires authentication.

사용 가능한 옵션:
public,
private