Backup & updates
Restore a backup
POST
/api/restoreAdmin. Needs an unlock token (
x-tempolight-token) while a PIN lock is set; without a lock, anyone can call it.Replaces everything with a backup file (or its data). The current PIN is kept.
Request body application/json
object
tempolightstringThe version that made it.
savedAtstring <date-time>An ISO date and time.
dataobjectrequiredEverything except the PIN: devices, room, scenes, schedules, settings, songs (saved passwords and tokens too).
Responses
200OKapplication/json
oktruerequired400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
403Locked, or not allowed.application/json
errorstringrequiredWhat went wrong, in a sentence for people.
Request
curl -X POST 'http://localhost:8080/api/restore' \
-H 'content-type: application/json' \
-d '{
"tempolight": "0.3.0",
"savedAt": "2026-11-04T12:00:00.000Z",
"data": {
"devices": [],
"room": {
"name": "My room",
"shapes": [],
"zones": []
},
"scenes": []
}
}'const res = await fetch("http://localhost:8080/api/restore", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"tempolight": "0.3.0",
"savedAt": "2026-11-04T12:00:00.000Z",
"data": {
"devices": [],
"room": {
"name": "My room",
"shapes": [],
"zones": []
},
"scenes": []
}
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"http://localhost:8080/api/restore",
json={
"tempolight": "0.3.0",
"savedAt": "2026-11-04T12:00:00.000Z",
"data": {
"devices": [],
"room": {
"name": "My room",
"shapes": [],
"zones": []
},
"scenes": []
}
},
)
print(res.json())Response
{
"ok": true
}{
"error": "That doesn't look like a Tempolight backup"
}{
"error": "Settings are locked. Unlock with the PIN in Settings."
}