Backups
Download a full FinzBooks backup of the organization as a .zip, and restore one into an organization. It is the same file as Settings → Data Migration → Download backup in the app. For a single resource as CSV, see Export.
/backups/exportDownload the backup (.zip)AIBooks.backups.READThe zip holds the chart of accounts (with opening balances), contacts, items, taxes, every transaction (invoices, bills, payments, credit and debit notes, expenses, journals) and a _finzbooks_config.json with settings, number series, branches, accounting periods, tags, salespersons and GST, TDS and TCS configuration. API keys and IRP, e-way bill or gateway credentials are never included. The response is the file, not the JSON envelope:
curl -H "Authorization: Bearer $PAT" "$BASE/backups/export" -o backup.zip
200 OK
Content-Type: application/zip
Content-Disposition: attachment; filename="<organization-based name>.zip"The zip is built while the request is open, so for a large organization allow a long client timeout. A token with AIBooks.fullaccess.all also satisfies the scope.
/backups/restoreRestore a backup (async)AIBooks.backups.CREATEIdempotency-Key is required (400 idempotency.key_required without it). Send multipart/form-data with one file: a .zip from /backups/export. A non-zip upload is treated as a single data file. The import runs in the background and maps masters automatically. It is best aimed at a fresh organization; the endpoint description advises against targeting one that already has data.
curl -X POST "$BASE/backups/restore" \
-H "Authorization: Bearer $PAT" \
-H "Idempotency-Key: $(uuidgen)" \
-F "file=@backup.zip"
200 OK
{ "code": 0, "message": "Restore started.", "jobId": "mj_…", "status": "RUNNING" }The response has jobId and status at the top level, not inside a resource object.
Notable errors
400 validation— empty upload; a file named.zipthat is not a valid zip; or no data files (.csv,.xlsx,.xls) found inside. Note the code is the bare stringvalidation, notvalidation.invalid_value.
/backups/restore/{job_id}Restore statusAIBooks.backups.READ200 OK
{
"code": 0,
"message": "OK",
"jobId": "mj_…",
"status": "COMPLETED", // RUNNING | COMPLETED | FAILED (see note)
"counts": { … } // counts reported by the importer
}Poll until status is no longer RUNNING. The restore worker sets COMPLETED or FAILED; the underlying job type can also hold PARTIAL and ROLLED_BACK, so handle any other value as final. The shape of counts comes from the importer and may grow; read the keys you need defensively. Unknown job id: 404 not_found (bare string, not not_found.resource).