API Reference.
A small, predictable REST API over your backups, restores, schedules, jobs and storage. JSON in, JSON out. Everything you can do in the dashboard, you can automate here.
Authentication
Every request is authenticated with an API key issued from your dashboard under API keys. Pass it as a Bearer token. Keys are scoped to a single organization and carry that org's full access — treat them like passwords.
- Base URL
- https://xbackupman.com
- Header
- Authorization: Bearer xbm_…
# Every endpoint expects the same header
curl https://xbackupman.com/api/v1/sources \
-H "Authorization: Bearer xbm_xxxxxxxxxxxxxxxxxxxxxxxx"
# Missing or invalid key →
{ "error": "Unauthorized" } // 401Sources
List every backup source in your organization.
{
"connections": [{ "id": "…", "name": "production-pg", "type": "postgres" }],
"files": [{ "id": "…", "name": "app-server" }],
"wordpress": [{ "id": "…", "name": "marketing-site" }]
}curl https://xbackupman.com/api/v1/sources \
-H "Authorization: Bearer $XBM_API_KEY"Backups
List completed backups, most recent first (max 100).
{
"backups": [
{ "id": "…", "objectKey": "org/…/db.sql.gz",
"sizeBytes": 44892160, "createdAt": "2026-07-15T02:00:00.000Z" }
]
}curl https://xbackupman.com/api/v1/backups \
-H "Authorization: Bearer $XBM_API_KEY"Trigger a backup of a source. Returns the queued job.
{ "type": "connection" | "file" | "wordpress", "id": "<source-uuid>" }{ "jobId": "…", "status": "pending" } // 202curl -X POST https://xbackupman.com/api/v1/backups \
-H "Authorization: Bearer $XBM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "type": "connection", "id": "<source-uuid>" }'Restore a backup onto a target. Overwrites the target — requires confirm:true.
{ "target": "db:<id>" | "file:<id>" | "wp:<id>", "confirm": true }{ "jobId": "…" } // 202curl -X POST https://xbackupman.com/api/v1/backups/<backup-id>/restore \
-H "Authorization: Bearer $XBM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "target": "db:<connection-id>", "confirm": true }'Re-download a backup and re-check its SHA-256 checksum.
{ "jobId": "…" } // 202curl -X POST https://xbackupman.com/api/v1/backups/<backup-id>/verify \
-H "Authorization: Bearer $XBM_API_KEY"Storage
List your storage targets (no secrets are returned).
{
"targets": [
{ "id": "…", "name": "prod-r2", "bucket": "backups",
"endpoint": "https://…r2.cloudflarestorage.com", "region": "auto" }
]
}curl https://xbackupman.com/api/v1/storage \
-H "Authorization: Bearer $XBM_API_KEY"Schedules
List your backup schedules.
{
"schedules": [
{ "id": "…", "cron": "0 2 * * *", "retentionDays": 30, "enabled": true }
]
}curl https://xbackupman.com/api/v1/schedules \
-H "Authorization: Bearer $XBM_API_KEY"Create a schedule. Cron cadence and retention are bounded by your plan.
{ "source": "db:<id>" | "file:<id>" | "wp:<id>",
"storageTargetId": "<uuid>", "cron": "0 2 * * *", "retentionDays": 30 }{ "id": "…" } // 201curl -X POST https://xbackupman.com/api/v1/schedules \
-H "Authorization: Bearer $XBM_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "source": "db:<connection-id>", "storageTargetId": "<target-id>",
"cron": "0 2 * * *", "retentionDays": 30 }'Delete a schedule you own.
{ "ok": true }curl -X DELETE https://xbackupman.com/api/v1/schedules/<schedule-id> \
-H "Authorization: Bearer $XBM_API_KEY"Jobs
List recent jobs, newest first. limit defaults to 20, capped at 100.
Query: ?limit=20{
"jobs": [
{ "id": "…", "kind": "backup", "status": "done",
"createdAt": "2026-07-15T02:00:00.000Z" }
]
}curl "https://xbackupman.com/api/v1/jobs?limit=20" \
-H "Authorization: Bearer $XBM_API_KEY"Fetch a single job's full detail.
{
"id": "…", "kind": "backup", "status": "done", "error": null,
"createdAt": "2026-07-15T02:00:00.000Z",
"startedAt": "2026-07-15T02:00:01.000Z",
"finishedAt": "2026-07-15T02:00:12.000Z"
}curl https://xbackupman.com/api/v1/jobs/<job-id> \
-H "Authorization: Bearer $XBM_API_KEY"Command line (xbm)
The xbm CLI is a thin wrapper over this API. Configure it with two environment variables and it talks to the same endpoints.
- XBM_API_KEY
- Required. Your xbm_ key from the dashboard.
- XBM_API_URL
- Optional. Defaults to https://xbackupman.com.
export XBM_API_KEY=xbm_xxxxxxxxxxxxxxxxxxxxxxxx
export XBM_API_URL=https://xbackupman.com # optional| xbm sources | List your backup sources |
| xbm backups | List completed backups |
| xbm backup <type> <id> | Trigger a backup (type: connection | file | wordpress) |
| xbm jobs | List recent jobs |
| xbm restore <backup-id> <target> | Restore a backup onto a target |
| xbm verify <backup-id> | Verify a backup's checksum |
| xbm schedules | List backup schedules |
| xbm storage | List storage targets |
| xbm download <backup-id> | Download a decrypted backup artifact |
| xbm local backup <path...> --to <dest> | Standalone: encrypt & back up local files (no account) |
| xbm local restore <archive> --into <dir> | Standalone: decrypt & restore an archive |
| xbm local schedule <path...> --to <dest> | Print a cron / Task Scheduler entry |
| xbm agent enroll --name <name> | Enroll a server with your account (needs XBM_API_KEY) |
| xbm agent backup <path...> --name <label> | Agent: encrypt local data with your org key → your storage |
| xbm agent restore <objectKey> --into <dir> | Agent: download & decrypt an agent backup |