---
title: "UpdateFileBody"
description: "Request body for updating a File."
section: "Reference"
group: "Types"
order: 92
---

## Definition

```ts
interface UpdateFileBody {
  name?: string | undefined;
  directoryId?: string | undefined;
  expiresAt?: string | null | undefined;
}
```

## Fields

| Field         | Type                          | Notes                                                                                                                     |
| ------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `name`        | `string \| undefined`         | `optional` — New filename.                                                                                                |
| `directoryId` | `string \| undefined`         | `optional` — Destination directory if moving the file.                                                                    |
| `expiresAt`   | `string \| null \| undefined` | `optional` — Update the file TTL. Pass a future ISO-8601 timestamp to set expiry, or `null` to keep the file permanently. |
