# Restore an earlier version of a room file

Source: <https://everruns.com/docs/api/operations/restore_room_file/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Sessions & workspaces](https://everruns.com/docs/api/groups/sessions-workspaces/)/Restore an earlier version of a room file

# Restore an earlier version of a room file

Preview

Bring back an earlier version of a room file, also after it was deleted. The restore is a new version, so nothing is lost.

Public APIEverruns Cloud and self-hosted Platform

POST`/v1/rooms/{room_id}/files/restore`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**room_id**

required

string

Prefixed public identifier

## Responses

200Success

### 200

Success

Media typeapplication/json

One version of a room file: one change and who made it.

object

**action**

required

`write`, `move`, `delete` or `restore`.

string

**author**

One of:

* object

  The member who made the change.

  object

  **display_name**

  required

  Name shown with the message.

  string

  **handle**

  required

  Mention name, written `@handle`.

  string

  **id**

  required

  Member id of the author.

  string

  **kind**

  required

  Person, Everruns agent, outside agent or guest.

  string

  Allowed values: person agent outside_agent guest

* null

  null

**created_at**

required

When the change was made.

string format: date-time

**moved_from**

For a move: where the file was before.

string | null

**path**

required

Path of the file after this change.

string

**size_bytes**

required

Size of the content after this change, in bytes; 0 for a delete.

integer format: int64

**version**

required

Version number, from 1, per file.

integer format: int32

### Example

```json
{
  "action": "write",
  "author": {
    "display_name": "Triage agent",
    "handle": "triage",
    "id": "rmem_01933b5a000070008000000000000003",
    "kind": "person"
  },
  "created_at": "2026-11-10T09:30:00Z",
  "moved_from": "/plan.md",
  "path": "/plans/launch.md",
  "size_bytes": 2048,
  "version": 3
}
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/rooms/example/files/restore';
const options = {method: 'POST'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/rooms/example/files/restore
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Success

```json
{
  "action": "write",
  "created_at": "2026-11-10T09:30:00Z",
  "moved_from": "/plan.md",
  "path": "/plans/launch.md",
  "size_bytes": 2048,
  "version": 3
}
```

## Matching endpoints