# Update a file link

Updates an existing file link object. Expired links can no longer be updated.

## Request

```curl
curl https://api.stripe.com/v1/file_links/{{FILE_LINK_ID}} \
  -u "<<YOUR_SECRET_KEY>>" \
  -d "metadata[order_id]=6735"
```

### Response

```json
{
  "id": "link_1Mr23jLkdIwHu7ix65betcoo",
  "object": "file_link",
  "created": 1680108075,
  "expired": false,
  "expires_at": null,
  "file": "file_1Mr23iLkdIwHu7ixQkCV3CBR",
  "livemode": false,
  "metadata": {
    "order_id": "6735"
  },
  "url": "https://files.stripe.com/links/MDB8YWNjdF8xTTJKVGtMa2RJd0h1N2l4fGZsX3Rlc3RfaXVoY2hrUnJPMzlBR3dPb01XMmFkSTVq00yUPLFf3h"
}
```

## Returns

Returns the file link object if successful, and raises [an error](https://docs.stripe.com/api/file_links/update.md#errors) otherwise.

## Parameters

- `expires_at` (string, value is "now" | timestamp, optional)
  A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.

- `metadata` (map, optional)
  Set of [key-value pairs](https://docs.stripe.com/api/metadata.md) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
