Backup & updates

Restore a backup

POST/api/restore
Admin. 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
tempolightstring

The version that made it.

savedAtstring <date-time>

An ISO date and time.

dataobjectrequired

Everything except the PIN: devices, room, scenes, schedules, settings, songs (saved passwords and tokens too).

Responses

200OKapplication/json
oktruerequired
400The body isn't valid JSON, or a value is wrong.application/json
errorstringrequired

What went wrong, in a sentence for people.

403Locked, or not allowed.application/json
errorstringrequired

What 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": []
  }
}'
Response
{
  "ok": true
}
Edit on GitHub