List a site's backups
/v1/sites/{siteId}/backups Lists the site's backups, newest first (its 60 newest): running, completed and failed ones, and ones being deleted. Filter by status and trigger.
A completed backup can be restored (POST /sites/{siteId}/backups/{backupId}/actions/restore, where canRestore) and its parts downloaded (GET /sites/{siteId}/backups/{backupId}/download, where canDownload).
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:read - View sites. See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses.
Path parameters
| Field | Type and description |
|---|---|
siteId Required | string The site's id. |
Query parameters
| Field | Type and description |
|---|---|
limit | integer 1 to 100 Default How many items to return, from 1 to 100. Default 25. |
cursor | string 1 to 1,024 characters The |
sort | string Default The field to sort by. Each list names the fields it can be sorted by. One of: |
order | string Default
One of: |
status | string Only backups with this status. One of: |
trigger | string Only backups made this way. One of: |
Example request
curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/backups?status=completed" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/backups?status=completed", {
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
},
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data, pagination } = await res.json();
console.log(data, pagination.nextCursor); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
for await (const item of rf.sites.backups.list({
siteId: "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
status: "completed",
})) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/backups?status=completed');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
$answer = json_decode($body, true);
print_r($answer['data']);
echo $answer['pagination']['nextCursor'] ?? 'Last page', PHP_EOL; import os
import requests
response = requests.get(
"https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/backups",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"status": "completed",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of Backup objects in data, with a Pagination object in pagination.
The Backup object's fields 14 fields
| Field | Type and description |
|---|---|
id | string The backup's id. |
status | string
Known values: |
trigger | string Why it was made: Known values: |
location | string Where it's kept, in words: Rabbitflare Backup and its region, or the name your storage had when the backup was made. |
sizeBytes | integer or null Its whole size. Null until it's completed. |
filesBytes | integer or null The size of its files part (a .tar.gz archive). Null until it's completed. |
databaseBytes | integer or null The size of its database part (a gzipped SQL dump). Null until it's completed. |
progress | number or null How far it got, from 0 to 1, when that's known (1 once it's completed). Null otherwise. |
stage | string or null What it's doing while it runs, like |
error | string or null Why it failed, in one plain sentence. Null unless it failed. |
startedAt | string An ISO 8601 time, in UTC When it was started (asked for, or due). |
finishedAt | string or null An ISO 8601 time, in UTC When it completed or failed. Null while it runs. |
canRestore | boolean Whether the site can be restored from it ( |
canDownload | boolean Whether its parts can be downloaded ( |
Example response
{
"data": [
{
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"status": "completed",
"trigger": "scheduled",
"location": "Rabbitflare Backup (Europe (Frankfurt))",
"sizeBytes": 1284311552,
"filesBytes": 1201143808,
"databaseBytes": 83167744,
"progress": 1,
"stage": null,
"error": null,
"startedAt": "2026-11-19T03:00:04.000Z",
"finishedAt": "2026-11-19T03:06:41.000Z",
"canRestore": true,
"canDownload": true
}
],
"pagination": {
"limit": 25,
"hasMore": false,
"nextCursor": null
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
400 invalid_ | A query parameter is unknown or has a wrong value ( Correct or remove the parameter named in |
400 invalid_ | The cursor isn't one this list gave, or was made with other filters or another sort. Start again from the first page, or keep the filters and sort the cursor was made with. |
403 feature_ | This product isn't open to the account. Contact support if you'd like it opened. |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |