Restore the theme's draft content to a past published version
Applies one published version back to the theme, for a client that has no local checkout to stage it in. The git_archive_url operation is the equivalent for one that does.
Publishes as it writes: every record goes through the theme’s own write seam, which publishes it. Publishing is per record and there is no whole-theme publish, so a restore that only touched drafts would leave the caller publishing every template by hand. For an active theme this therefore goes live.
It remains undoable: the version being left behind is still in the history this restored from.
The version is read as a single archive rather than file by file, and applied in one transaction: a tree that cannot be written leaves the theme as it was rather than half-restored.
Files the target version does not contain are removed, which is what makes this a restore rather than a merge — a template added after that version would otherwise survive into a tree that never had it.
Undoing a restore is another restore: the version you were on is still in the history you restored from.
curl --request POST \
--url https://api.fluid.app/api/application_themes/{id}/git_restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sha": "9f3c1e7"
}
'import requests
url = "https://api.fluid.app/api/application_themes/{id}/git_restore"
payload = { "sha": "9f3c1e7" }
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: '9f3c1e7'})
};
fetch('https://api.fluid.app/api/application_themes/{id}/git_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/application_themes/{id}/git_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' => '9f3c1e7'
]),
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/application_themes/{id}/git_restore"
payload := strings.NewReader("{\n \"sha\": \"9f3c1e7\"\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/application_themes/{id}/git_restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sha\": \"9f3c1e7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/application_themes/{id}/git_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\": \"9f3c1e7\"\n}"
response = http.request(request)
puts response.read_body{
"sha": "9f3c1e7b2a4d6f8e0c1b3a5d7e9f2c4b6a8d0e1f",
"files_written": 38,
"files_removed": 2,
"meta": {
"request_id": "3f9c2a7e-6b1d-4e8a-9c52-7d0e4b1a2f63",
"timestamp": "2026-09-18T16:40:56Z"
}
}{
"message": "<string>"
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}Body
curl --request POST \
--url https://api.fluid.app/api/application_themes/{id}/git_restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sha": "9f3c1e7"
}
'import requests
url = "https://api.fluid.app/api/application_themes/{id}/git_restore"
payload = { "sha": "9f3c1e7" }
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: '9f3c1e7'})
};
fetch('https://api.fluid.app/api/application_themes/{id}/git_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/application_themes/{id}/git_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' => '9f3c1e7'
]),
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/application_themes/{id}/git_restore"
payload := strings.NewReader("{\n \"sha\": \"9f3c1e7\"\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/application_themes/{id}/git_restore")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sha\": \"9f3c1e7\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fluid.app/api/application_themes/{id}/git_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\": \"9f3c1e7\"\n}"
response = http.request(request)
puts response.read_body{
"sha": "9f3c1e7b2a4d6f8e0c1b3a5d7e9f2c4b6a8d0e1f",
"files_written": 38,
"files_removed": 2,
"meta": {
"request_id": "3f9c2a7e-6b1d-4e8a-9c52-7d0e4b1a2f63",
"timestamp": "2026-09-18T16:40:56Z"
}
}{
"message": "<string>"
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error_message": "<string>",
"errors": "<string>",
"meta": {
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}