---
title: "Update file expiry"
method: PUT
path: "/files/{file_id}/expiration"
tags: ["Files"]
---

# Update file expiry

`PUT /files/{file_id}/expiration`

## Request

- Base URL: `https://us.app.zuva.ai/api/v2`
- URL: `https://us.app.zuva.ai/api/v2/files/{file_id}/expiration`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/zuva/apis/zuva-docai/docs/files/:file_id/expiration/put.ts> (a function with typed inputs; its response is checked against the schema)

Update the expiry on a file. The expiration time can be provided as an absolute timestamp in RFC3339 format (e.g. `2022-12-23T12:34:56Z`), or as an interval relative to the time the request is made (e.g `12h` or `10d`).

## Path parameters

- `file_id` string, required

## Headers

- `Expiration` string

## Response `200`

The file was updated successfully.

- FileUpdatedResponse
  - `expiration` string: The file expiration in RFC3339 format
  - `file_id` string: The ID of the updated file resource

## Other responses

- `400`: Invalid file ID
- `401`: Unauthorized
- `403`: Forbidden
- `404`: File not found.
- `500`: Internal Server Error

## Changes

- **2023-12-13** `51f2a4c5de2e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zuva/apis/zuva-docai/changes/files/:file_id/expiration/put.md)

---

[API](https://skmtc.dev/zuva/apis/zuva-docai.md) - [All operations](https://skmtc.dev/zuva/apis/zuva-docai/llms.txt) - [OpenAPI document](https://skmtc.dev/zuva/apis/zuva-docai/revisions/7397ad071d55?raw)
