Restore a site to a version
Puts any site of the company, a company site or a member’s, back to a version from its history, as the signed-in admin, whom the restore’s version names. The site’s files, pages, menus and settings become the version’s, and it is published; unpublished drafts are replaced. Its name, handle, visibility, status and shares do not change, so a site that was taken down stays taken down. The restore is saved as a new version, so it can be undone by restoring the version before it. Either the whole version is restored or nothing changes. A restore waits for the site’s latest change to be saved to its history first; until it is, it answers 409 sync_pending and the save is started, so retry shortly. Needs application_themes.update and a signed-in admin.
curl --request POST \
--url https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sha": "a1b2c3d"
}
'import requests
url = "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore"
payload = { "sha": "a1b2c3d" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sha: 'a1b2c3d'})
};
fetch('https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sha' => 'a1b2c3d'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore"
payload := strings.NewReader("{\n \"sha\": \"a1b2c3d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sha\": \"a1b2c3d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sha\": \"a1b2c3d\"\n}"
response = http.request(request)
puts response.read_body{
"restored": {
"sha": "a1b2c3d",
"files_written": 12,
"files_removed": 2
},
"status": 200,
"meta": {
"request_uuid": "3b8f1d27-6c4e-4a91-8e5d-2f7c9a1b0e64",
"timestamp": "2026-10-30T14:05:12Z"
}
}{}{}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Authorizations
A company admin credential for your company, or a droplet installation token with the website scope for reads, except on the share routes, which refuse a droplet token.
Path Parameters
The site's id.
Body
The version to restore. Any other field is refused.
The sha of the version, 7 to 40 hex characters, from sha in the versions listing.
^[0-9a-fA-F]{7,40}$curl --request POST \
--url https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sha": "a1b2c3d"
}
'import requests
url = "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore"
payload = { "sha": "a1b2c3d" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({sha: 'a1b2c3d'})
};
fetch('https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sha' => 'a1b2c3d'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore"
payload := strings.NewReader("{\n \"sha\": \"a1b2c3d\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sha\": \"a1b2c3d\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/company/v2026-10/member-sites/{id}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sha\": \"a1b2c3d\"\n}"
response = http.request(request)
puts response.read_body{
"restored": {
"sha": "a1b2c3d",
"files_written": 12,
"files_removed": 2
},
"status": 200,
"meta": {
"request_uuid": "3b8f1d27-6c4e-4a91-8e5d-2f7c9a1b0e64",
"timestamp": "2026-10-30T14:05:12Z"
}
}{}{}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"details": {}
},
"status": 123,
"meta": {
"request_uuid": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}