# File Links
> File Links let you generate a URL that can be used to download a File.

## The File Link object
### Example
```json
{
  "created_at": "2020-01-31T23:59:59Z",
  "expires_at": "2020-01-31T23:59:59Z",
  "file_id": "file_makxrc67oh9l6sg7w9yc",
  "id": "file_link_roapsuicj7kp1lzyus04",
  "idempotency_key": null,
  "type": "file_link",
  "unauthenticated_url": "https://example.com/file.pdf"
}
```
### Attributes
- `created_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the File Link was created.

- `expires_at` (string)
  The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the File Link will expire.

- `file_id` (string)
  The identifier of the File the File Link points to.

- `id` (string)
  The File Link identifier.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `type` (string)
  A constant representing the object's type. For this resource it will always be `file_link`.

- `unauthenticated_url` (string)
  A URL where the File can be downloaded. The URL will expire after the `expires_at` time. This URL is unauthenticated and can be used to download the File without an Increase API key.

## Create a File Link
POST /file_links

### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/file_links" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "file_id": "file_makxrc67oh9l6sg7w9yc"
  }'
```

### Body Parameters
- `expires_at` (string, optional)
  The time at which the File Link will expire. The default is 1 hour from the time of the request. The maximum is 1 day from the time of the request.

- `file_id` (string, required)
  The File to create a File Link for.