# PostFileLinksLink

From **Stripe API**.

`POST /v1/file_links/{link}`

<p>Updates an existing file link object. Expired links can no longer be updated.</p>

## Parameters

### `link`

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

## Request body

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

- Type: `object`

```json
{"additionalProperties":false,"properties":{"expand":{"description":"Specifies which fields in the response should be expanded.","items":{"maxLength":5000,"type":"string"},"type":"array"},"expires_at":{"anyOf":[{"enum":["now"],"maxLength":5000,"type":"string"},{"format":"unix-time","type":"integer"},{"enum":[""],"type":"string"}],"description":"A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately."},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"enum":[""],"type":"string"}],"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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`."}},"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`

To share the contents of a `File` object with non-Stripe users, you can
create a `FileLink`. `FileLink`s contain a URL that can be used to
retrieve the contents of the file without authentication.

```json
{"description":"To share the contents of a `File` object with non-Stripe users, you can\ncreate a `FileLink`. `FileLink`s contain a URL that can be used to\nretrieve the contents of the file without authentication.","properties":{"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"expired":{"description":"Whether this link is already expired.","type":"boolean"},"expires_at":{"description":"Time at which the link expires.","format":"unix-time","nullable":true,"type":"integer"},"file":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/file"}],"description":"The file object this link points to.","x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/file"}]}},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"metadata":{"additionalProperties":{"maxLength":500,"type":"string"},"description":"Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.","type":"object"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["file_link"],"type":"string"},"url":{"description":"The publicly accessible URL to download the file.","maxLength":5000,"nullable":true,"type":"string"}},"required":["created","expired","file","id","livemode","metadata","object"],"title":"FileLink","type":"object","x-expandableFields":["file"],"x-resourceId":"file_link"}
```

### `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 POST \
  --url https://api.stripe.com/v1/file_links/{link} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{
  "expand": [
    "string"
  ],
  "expires_at": "string",
  "metadata": "string"
}'
```
