v4

latestOpenAPI 3.1.02026-08-0143190206.8 KB
v1

Retrieve metadata for a single file by ID. Errors with 404 if the file doesn't exist, has been deleted, or has passed its `expires_at`.

get/v1/files/{file_id}

Path parameters

file_idstring required

The file's id returned by upload or list.

Response

Success

bytesinteger required

The size of the file, in bytes.

created_atinteger required

The Unix timestamp (in seconds) for file creation time.

expires_atinteger nullable

The Unix timestamp (in seconds) for file expiry time. null if file does not expire.

filenamestring required

The name of the file.

idstring required

The file identifier, which can be used in other API requests.

objectstring required

The object type, which is always file. Only included for compatability.

public_urlstring nullable

Public URL for the file. Only present when the file has an active public URL.

public_url_expires_atinteger nullable

Unix timestamp (seconds) when the public URL expires. Only present when the public URL has an independent expiry.

purposestring

The intended purpose of the uploaded file. Only included for OAI compatability.