# file

From **Stripe API**.

This is an object representing a file hosted on Stripe's servers. The
file may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)
request (for example, when uploading dispute evidence) or it may have
been created by Stripe (for example, the results of a [Sigma scheduled
query](#scheduled_queries)).

Related guide: [File Upload Guide](https://stripe.com/docs/file-upload).

- Type: `object`

## Properties

### `created`

- Required: true
- Type: `integer`
- Format: `unix-time`

Time at which the object was created. Measured in seconds since the Unix epoch.

### `expires_at`

- Required: false
- Type: `integer`
- Format: `unix-time`
- Nullable: true

The time at which the file expires and is no longer available in epoch seconds.

### `filename`

- Required: false
- Type: `string`
- Nullable: true
- maxLength: `5000`

A filename for the file, suitable for saving to a filesystem.

### `id`

- Required: true
- Type: `string`
- maxLength: `5000`

Unique identifier for the object.

### `links`

- Required: false
- Type: `object`
- Nullable: true

A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.

### `object`

- Required: true
- Type: `string`
- Allowed values: `"file"`

String representing the object's type. Objects of the same type share the same value.

### `purpose`

- Required: true
- Type: `string`
- Allowed values: `"account_requirement"`, `"additional_verification"`, `"business_icon"`, `"business_logo"`, `"customer_signature"`, `"dispute_evidence"`, `"document_provider_identity_document"`, `"finance_report_run"`, `"identity_document"`, `"identity_document_downloadable"`, `"pci_document"`, `"selfie"`, `"sigma_scheduled_query"`, `"tax_document_user_upload"`

The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.

### `size`

- Required: true
- Type: `integer`

The size in bytes of the file object.

### `title`

- Required: false
- Type: `string`
- Nullable: true
- maxLength: `5000`

A user friendly title for the document.

### `type`

- Required: false
- Type: `string`
- Nullable: true
- maxLength: `5000`

The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).

### `url`

- Required: false
- Type: `string`
- Nullable: true
- maxLength: `5000`

The URL from which the file can be downloaded using your live secret API key.

## JSON Schema

```json
{"description":"This is an object representing a file hosted on Stripe's servers. The\nfile may have been uploaded by yourself using the [create file](https://stripe.com/docs/api#create_file)\nrequest (for example, when uploading dispute evidence) or it may have\nbeen created by Stripe (for example, the results of a [Sigma scheduled\nquery](#scheduled_queries)).\n\nRelated guide: [File Upload Guide](https://stripe.com/docs/file-upload).","properties":{"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"expires_at":{"description":"The time at which the file expires and is no longer available in epoch seconds.","format":"unix-time","nullable":true,"type":"integer"},"filename":{"description":"A filename for the file, suitable for saving to a filesystem.","maxLength":5000,"nullable":true,"type":"string"},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"links":{"description":"A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.","nullable":true,"properties":{"data":{"description":"Details about each object.","items":{"$ref":"#/components/schemas/file_link"},"type":"array"},"has_more":{"description":"True if this list has another page of items after this one that can be fetched.","type":"boolean"},"object":{"description":"String representing the object's type. Objects of the same type share the same value. Always has the value `list`.","enum":["list"],"type":"string"},"url":{"description":"The URL where this list can be accessed.","maxLength":5000,"type":"string"}},"required":["data","has_more","object","url"],"title":"FileFileLinkList","type":"object","x-expandableFields":["data"]},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["file"],"type":"string"},"purpose":{"description":"The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.","enum":["account_requirement","additional_verification","business_icon","business_logo","customer_signature","dispute_evidence","document_provider_identity_document","finance_report_run","identity_document","identity_document_downloadable","pci_document","selfie","sigma_scheduled_query","tax_document_user_upload"],"type":"string","x-stripeBypassValidation":true},"size":{"description":"The size in bytes of the file object.","type":"integer"},"title":{"description":"A user friendly title for the document.","maxLength":5000,"nullable":true,"type":"string"},"type":{"description":"The type of the file returned (e.g., `csv`, `pdf`, `jpg`, or `png`).","maxLength":5000,"nullable":true,"type":"string"},"url":{"description":"The URL from which the file can be downloaded using your live secret API key.","maxLength":5000,"nullable":true,"type":"string"}},"required":["created","id","object","purpose","size"],"title":"File","type":"object","x-expandableFields":["links"],"x-resourceId":"file"}
```
