# Retrieve a file

Source: https://developers.swell.is/backend-api/files/retrieve-a-file

Retrieve an existing file using the ID that was returned when created.

## Arguments

- `id` (objectId, required): The id of the file to retrieve.

## Example request

`GET /:files`

**cURL**

```sh
$ curl https://api.swell.store/:files/6595457d82e01f0012243057 \
  -u store-id:secret-key
```

**Node**

```javascript
const { swell } = require('swell-node');
swell.init('store-id', 'secret-key');

await swell.get('/:files/{id}', {
  id: '6595457d82e01f0012243057'
});
```

**PHP**

```php
<?php $swell = new \Swell\Client('store-id', 'secret-key');

$swell->get('/:files/{id}', [
  'id' => '6595457d82e01f0012243057'
]);
```

## Example response

```json
{
    "length": 4898,
    "chunkSize": 261120,
    "uploadDate": "2024-01-03T11:31:09.153Z",
    "filename": "image.jpg",
    "content_type": "image/jpeg",
    "date_created": "2024-01-03T11:31:09.143Z",
    "date_uploaded": "2024-01-03T11:31:09.158Z",
    "md5": "f082a5c3677bb757e11d738cb6f60624",
    "url": "https://cdn.swell.store/f082a5c3677bb757e11d738cb6f60624/image.jpg",
    "id": "6595457d82e01f0012243057"
}
```
