# GetFilesFile

From **Stripe API**.

`GET /v1/files/{file}`

<p>Retrieves the details of an existing file object. Supply the unique file ID from a file, and Stripe will return the corresponding file object. To access file contents, see the <a href="/docs/file-upload#download-file-contents">File Upload Guide</a>.</p>

## Parameters

### `expand`

- Location: query
- Required: false
- Type: `array`

Specifies which fields in the response should be expanded.

### `file`

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

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

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).

```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"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url https://api.stripe.com/v1/files/{file} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{}'
```
