GET
/v1/files/{file}Retrieve a file
Retrieves the details of a file by its identifier. Use expand when you need selected fields expanded in the response. The returned file includes its purpose, size, timestamps, type, and download URL when available.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
filestringrequired
The unique identifier of the file to retrieve; the identifier can contain up to 5,000 characters.
expandarray<string>optional
Specifies which fields in the response to expand; each field name can contain up to 5,000 characters.
200Returns the file object with its identifier, purpose, size, creation time, expiration time, filename, title, type, links, and download URL when available.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
expires_atintegeroptional
The file expires and isn't available at this time in epoch seconds.
filenamestringoptional
The suitable name for saving the file to a filesystem.
idstringrequired
Unique identifier for the object.
linksobjectoptional
A list of [file links](https://api.stripe.com#file_links) that point at this file.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
purposestringrequired
The [purpose](https://docs.stripe.com/file-upload#uploading-a-file) of the uploaded file.
sizeintegerrequired
The size of the file object in bytes.
titlestringoptional
A suitable title for the document.
typestringoptional
The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
urlstringoptional
Use your live secret API key to download the file from this URL.
defaultError response.
errorobjectrequired
Error handling
file must identify an existing file, and expand values must not exceed 5,000 characters. A file's purpose is one of the supported file purposes, such as account_requirement, dispute_evidence, or identity_document.