List your backup storage
/v1/backup-destinations Lists the storage of your own that sites can be backed up to, newest first: buckets, SFTP servers, Google Drive and Dropbox. A site's backups go to one of them when its settings name its id as destination. Keys and passwords are never answered. Filter by kind and status.
Rabbitflare Backup isn't listed: it's always there, as destination: "rabbitflare".
Storage belongs to the whole account, as in the panel, not to a server: a token limited to some servers sees and manages all of it too, with where it points (detail) and the count of sites on every server that back up to it (siteCount).
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:files - Files and logins. File Manager, WordPress logins, cron jobs, backup downloads and backup storage. Full access to the sites' code and data.
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: |
kind | string Only storage of this kind. One of: |
status | string Only storage with this status. One of: |
Example request
curl "https://api.rabbitflare.com/v1/backup-destinations?status=ok" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" const res = await fetch("https://api.rabbitflare.com/v1/backup-destinations?status=ok", {
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.backupDestinations.list({ status: "ok" })) {
console.log(item);
} <?php
$ch = curl_init('https://api.rabbitflare.com/v1/backup-destinations?status=ok');
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/backup-destinations",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
params={
"status": "ok",
},
timeout=120,
)
response.raise_for_status()
answer = response.json()
print(answer["data"], answer["pagination"]["nextCursor"]) Response
200 OK Returns a list of BackupDestination objects in data, with a Pagination object in pagination.
The BackupDestination object's fields 10 fields
| Field | Type and description |
|---|---|
id | string The storage's id: what a site's backup settings name as |
kind | string What it is: Known values: |
name | string Its name. |
detail | string Where it points: a bucket and its folder ( |
status | string
Known values: |
lastError | string or null What went wrong when it was last checked or used, in one plain sentence. Null unless |
publicKey | string or null An SFTP server's Rabbitflare key, when it signs in with one: this public half goes in the user's |
hostKeyFingerprint | string or null An SFTP server's identity (its host key's fingerprint), noted at its first successful check: backups go only to a server that still has it. Null until then, and for other kinds. |
siteCount | integer How many sites back up to it now. |
createdAt | string An ISO 8601 time, in UTC When it was connected. |
Example response
{
"data": [
{
"id": "8f9a0b1c-2d3e-4f4a-9b5c-6d7e8f9a0b12",
"kind": "s3",
"name": "Amazon S3 · shop-backups",
"detail": "shop-backups/sites",
"status": "ok",
"lastError": null,
"publicKey": null,
"hostKeyFingerprint": null,
"siteCount": 1,
"createdAt": "2026-11-12T09:30:00.000Z"
}
],
"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. |