Skip to content

Stripe: Files schemas

1 Stripe schema with complete fields and constraints.

← Files operations · All schemas

Create a file — response body

FieldTypePresenceDescription and constraints
$objectRootThis object represents files hosted on Stripe's servers. You can upload
files with the [create file](https://docs.stripe.com/api#create_file) request
(for example, when uploading dispute evidence). Stripe also
creates files independently (for example, the results of a [Sigma scheduled
query](#scheduled_queries)).

Related guide: [File upload guide](https://docs.stripe.com/file-upload)
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
expires_atJSONOptional
expires_at (anyOf 1)JSONAlternative
expires_at (anyOf 1) (anyOf 1)integerAlternativeThe file expires and isn't available at this time in epoch seconds.
Format: unix-time
expires_at (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
expires_at (anyOf 2)nullAlternative
filenameJSONOptional
filename (anyOf 1)stringAlternativeThe suitable name for saving the file to a filesystem.
Maximum length: 5000
filename (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
linksJSONOptional
links (anyOf 1)objectAlternativeA list of [file links](https://docs.stripe.com/api#file_links) that point at this file.
links (anyOf 1).dataarrayRequired within parentDetails about each object.
links (anyOf 1).data[]ModelEach itemExpand Create a file link — response body
links (anyOf 1).has_morebooleanRequired within parentTrue if this list has another page of items after this one that can be fetched.
links (anyOf 1).objectstringRequired within parentString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Known values: list
links (anyOf 1).urlstringRequired within parentThe URL where this list can be accessed.
Maximum length: 5000
Pattern: ^/v1/file_links
links (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: file
purposestringRequired within parentThe [purpose](https://docs.stripe.com/file-upload#uploading-a-file) of the uploaded file.
Known values: account_requirement, additional_verification, business_icon, business_logo, customer_signature, dispute_evidence, document_provider_identity_document, finance_report_run, financial_account_statement, identity_document, identity_document_downloadable, issuing_regulatory_reporting, pci_document, platform_terms_of_service, selfie, sigma_scheduled_query, tax_document_user_upload, terminal_android_apk, terminal_reader_splashscreen, terminal_wifi_certificate, terminal_wifi_private_key
sizeJSONRequired within parent
size (anyOf 1)integerAlternativeThe size of the file object in bytes.
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
titleJSONOptional
title (anyOf 1)stringAlternativeA suitable title for the document.
Maximum length: 5000
title (anyOf 2)nullAlternative
typeJSONOptional
type (anyOf 1)stringAlternativeThe returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
Maximum length: 5000
type (anyOf 2)nullAlternative
urlJSONOptional
url (anyOf 1)stringAlternativeUse your live secret API key to download the file from this URL.
Maximum length: 5000
url (anyOf 2)nullAlternative

Referenced models: Create a file link — response body

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.