# Use the full download_url from GET /bots/:id/backups
curl -L "https://api.phanomcloud.online/backups/c1a2b3d4.../download?token=HMAC_TOKEN&user=USER_UUID" \
-o backup.zip
// Get the URL from the list endpoint first
const { data } = await (await fetch("/bots/BOT_ID/backups", {
headers: { Authorization: "Bearer sess_..." }
})).json();
const downloadUrl = data.backups[0].download_url;
window.location.href = downloadUrl; // triggers browser download
HTTP/1.1 200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="before-v2-update.zip"
Content-Length: 45678
[binary zip data]
{
"success": false,
"error": "Token expired or invalid"
}
Backups
Download Backup
Downloads the ZIP file of a backup using a signed URL. No session token required — uses an HMAC token from the list endpoint.
GET
/
backups
/
{backupId}
/
download
# Use the full download_url from GET /bots/:id/backups
curl -L "https://api.phanomcloud.online/backups/c1a2b3d4.../download?token=HMAC_TOKEN&user=USER_UUID" \
-o backup.zip
// Get the URL from the list endpoint first
const { data } = await (await fetch("/bots/BOT_ID/backups", {
headers: { Authorization: "Bearer sess_..." }
})).json();
const downloadUrl = data.backups[0].download_url;
window.location.href = downloadUrl; // triggers browser download
HTTP/1.1 200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="before-v2-update.zip"
Content-Length: 45678
[binary zip data]
{
"success": false,
"error": "Token expired or invalid"
}
Path Parameters
string
required
UUID of the backup to download.
Query Parameters
string
required
HMAC-signed token from the
download_url returned by GET /bots/:id/backups. Valid for approximately 1 hour.string
required
UUID of the user who owns the backup.
Do not construct this URL manually. Always use the
download_url returned by the List Backups endpoint, which contains a pre-signed token valid for 1 hour.Response
Returns the backup as a.zip file with:
Content-Type: application/zipContent-Disposition: attachment; filename="backup-name.zip"
# Use the full download_url from GET /bots/:id/backups
curl -L "https://api.phanomcloud.online/backups/c1a2b3d4.../download?token=HMAC_TOKEN&user=USER_UUID" \
-o backup.zip
// Get the URL from the list endpoint first
const { data } = await (await fetch("/bots/BOT_ID/backups", {
headers: { Authorization: "Bearer sess_..." }
})).json();
const downloadUrl = data.backups[0].download_url;
window.location.href = downloadUrl; // triggers browser download
HTTP/1.1 200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="before-v2-update.zip"
Content-Length: 45678
[binary zip data]
{
"success": false,
"error": "Token expired or invalid"
}

