---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "ContentVersion Restore Flow Reference"
description: "Restore a previous Site Definition File version by creating a new version and updating the Site Definition reference."
contentType: "reference"
audience: "admin,developer"
---

# ContentVersion Restore

Restore a previous Site Definition File version by creating a new version and updating the Site Definition reference.
The namespaced Apex action name is `rooms__ContentVersionRestoreAction`.

**Reference status: Administrative.** Review the limitations below before using this action in a new Flow.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | No HTTP callout is made by the action. |
| Record writes | Inserts a new ContentVersion and updates the Site Definition record in the calling Flow transaction. |
| Platform event | The action does not directly publish a platform event. |
| Background work | No background job is explicitly submitted by the action. Related record automation can still run. |
| Email | No email is sent. |

Use this administrative action with one request at a time. It processes only the first request. The selected historical version remains available; restoration creates a new version.

## Inputs

Required describes the Flow input setting. Additional configuration rules can still require a value.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `recordId` | Record ID (Content Version ID) | Yes | Select the previous ContentVersion to restore. Its Site Definition relationship selects the target. |
| `siteDefinitionId` | Site Definition ID | Yes | Required by the Flow contract. Supply the matching Site Definition ID; the File version relationship determines the target. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Whether the restore action completed. |
| `message` | Error Message | Restore error details. |
| `recordId` | Record ID (Content Version ID) | The supplied previous ContentVersion ID. |
| `newRecordId` | New Content Version Record ID | The newly created ContentVersion ID. |

## Configure the Flow

1. Review the historical File version and its Site Definition relationship.
2. Supply that version and the matching Site Definition ID.
3. Store Success, Message and New Content Version Record ID.
4. Check the Site Definition reference after Success is `true`.

Confirm the Flow user's Apex action access and access to the records or Files used by this operation. Review the configured Salesforce API connection user's access when the action makes an API request.

## Troubleshooting

**Restore action missing Site Definition ID context.** The selected File version must have a Site Definition relationship. Supplying the other input alone does not establish that relationship.

**A later callout fails.** This action writes records in the current transaction. Review the later action transaction boundary.

**Only one version is restored.** Use one request per invocation; additional requests are not processed.

See the [Flow action catalog](/content/build/flows/index.md) for related actions and transaction guidance. Confirm that the action and input fields are available in the installed package.
