Data exports
A data export is a full copy of the account’s structured data: a zip with one CSV file per table, all read from one consistent snapshot, with a list of the attached files and a manifest. It is the same export that an account admin takes from Settings, Data Export in Drum. These endpoints and the Settings page run the same operations, so they apply the same rules, limits and error codes.
There is no MCP tool for data exports, on purpose. See MCP or the REST API?.
For a step-by-step guide, see Back up your account data with the API.
Endpoints
| Method and path | Does |
|---|---|
POST /api/v1/data_exports |
Asks for an export. Answers 202 with the export and a Location header to poll |
GET /api/v1/data_exports |
Lists the account’s exports, newest first |
GET /api/v1/data_exports/:id |
One export: its status, counts, checksum and expiry |
GET /api/v1/data_exports/:id/download |
Answers 303 to a short-lived signed link to the zip |
HEAD /api/v1/data_exports/:id/download |
Checks whether a link can be issued, without issuing one |
Every response has Cache-Control: private, no-store.
Access
- Only an account admin can list, ask for or download exports. An export holds every record of the account, including time, costs and pay rates, so no role permission is enough on its own. Any other user gets
403not_authorized. The token’s user must be an admin who has not been archived. - The API permission of each verb applies as usual (
api_readfor the reads and the download,api_createto ask for one). An admin holds all four. - The account comes from the token. An
account_idparameter is ignored. - An account with no active subscription gets
402on every endpoint. An admin of that account can still take the export from Settings, Data Export in Drum, so the data is never locked in. - An export of another account answers
404data_export_not_found.
The daily limit
An account can make one successful export per calendar day, in the account’s time zone. The web and the API share it.
- A run that fails does not use up the day’s export, up to three failed runs a day.
- A run that finishes after midnight counts for the day it was asked for.
- Downloads are not limited while the export is kept.
Ask for an export
curl -X POST "https://app.getdrum.com/api/v1/data_exports" \
-H "Authorization: Bearer $DRUM_API_TOKEN"
There is no request body. The answer is 202 Accepted with the export (status queued) and a Location header that points at GET /api/v1/data_exports/:id.
| Status | code |
When |
|---|---|---|
409 |
data_export_in_progress |
An export is already queued or running. data_export_id names it. If you lost the response to an earlier POST, poll that id instead of asking again |
429 |
data_export_limit_reached |
Today’s export was made, or three runs failed today. The Retry-After header (seconds) and next_available_at say when to try again |
409 |
data_exports_paused |
Drum has paused new exports for a while. Try again later |
409 |
data_export_unavailable |
The export could not be started. Try again in a few minutes |
403 |
not_authorized |
The token’s user is not an account admin |
402 |
none | The account has no active subscription |
List exports
GET /api/v1/data_exports returns the account’s exports, newest first.
| Parameter | Meaning |
|---|---|
limit |
1 to 50. Default 10 |
offset |
Skips this many exports. Default 0 |
{
"data_exports": [
{"id": 412, "status": "completed", "source": "api", "...": "..."}
],
"count": 1,
"limit": 10,
"offset": 0,
"has_more": false
}
Each entry has the fields of the export. count is the number of exports on this page, not a total.
Read an export
GET /api/v1/data_exports/:id returns one export. Poll it about once a minute until status is completed or failed. A large account can take a few minutes. The read never contains a download link.
The export
{
"id": 412,
"status": "completed",
"source": "api",
"requested_by": {"id": 5501, "name": "Priya Nair"},
"requested_at": "2026-11-28T03:15:02Z",
"quota_date": "2026-11-28",
"quota_time_zone": "Brisbane",
"quota_window_ends_at": "2026-11-28T14:00:00Z",
"started_at": "2026-11-28T03:15:04Z",
"completed_at": "2026-11-28T03:17:41Z",
"failed_at": null,
"expires_at": "2026-12-05T03:17:41Z",
"snapshot_at": "2026-11-28T03:15:05Z",
"format_version": 1,
"total_rows": 184213,
"row_counts": {"projects.csv": 1204, "tracked_times.csv": 96311, "...": 0},
"byte_size": 18734112,
"sha256": "3b7f0c1e...",
"error_code": null,
"error_message": null,
"download_links_count": 1,
"downloadable": true
}
| Field | Meaning |
|---|---|
status |
queued, running, completed, failed, or expired (it completed, and its file was deleted after 7 days) |
source |
web (from Settings) or api |
requested_by |
{id, name} of the member who asked for it, or null |
requested_at, started_at, completed_at, failed_at |
ISO 8601 times in UTC, or null |
quota_date, quota_time_zone, quota_window_ends_at |
The day the export counts for against the daily limit, the account time zone, and when that day ends |
snapshot_at |
When the data was read. Every file shows the account as it was at this moment |
expires_at |
When the file is deleted: 7 days after completion |
format_version |
The archive format. See Format changes |
total_rows, row_counts |
The rows in the archive, in total and for each file. row_counts is null until the export completes |
byte_size, sha256 |
The size of the zip in bytes, and its SHA-256, to check a download |
error_code, error_message |
Why a failed export failed. See below |
download_links_count |
How many download links were issued. It does not count finished downloads |
downloadable |
true while a link can be issued |
A failed export has one of these error_code values, with a short error_message. A failed run does not use up the day’s export, so you can ask again.
error_code |
Meaning |
|---|---|
attempts_exhausted |
The export stopped after several attempts |
enqueue_failed |
The export could not be started |
lease_lost, snapshot_interrupted, worker_stopped |
The export was interrupted |
read_source_unavailable, replica_behind |
The export database was not available, or was behind. Try again later |
requester_not_authorized |
The person who asked is no longer an account admin |
schema_mismatch, unknown_enum_value |
Some data could not be exported yet. Drum has been told |
storage_unavailable |
The export could not be stored |
internal_error |
The export failed |
Download an export
GET /api/v1/data_exports/:id/download answers 303 See Other. Its Location header is a signed link to the zip, valid for at most 5 minutes and never past expires_at. Follow it at once. For another download, ask for a new link. Each call counts one link in download_links_count.
curl -L -o drum-export.zip \
-H "Authorization: Bearer $DRUM_API_TOKEN" \
"https://app.getdrum.com/api/v1/data_exports/412/download"
With -L, curl follows the redirect. The signed link needs no token, so treat it like the file itself: do not log it or share it.
HEAD on the same path answers 200 when a link can be issued, or the error below when it cannot. It issues no link and counts none.
| Status | code |
When |
|---|---|---|
409 |
data_export_not_ready |
The export is queued, running or failed |
409 |
data_export_expired |
The export is past its 7 days |
409 |
data_export_file_unavailable |
The file is missing. Ask for a new export |
404 |
data_export_not_found |
No export with this id in the account |
Check the download against byte_size and sha256 before you rely on it.
The archive
The zip holds one CSV file for each table, and:
manifest.json, which lists every file with its source tables, columns, database types, enum names, foreign keys, how its rows belong to the account, its row count and the SHA-256 of its bytes. It also lists the columns left out of exported tables.README.txt, which describes the format below.
The CSV format
- UTF-8 with no byte order mark, comma separated, CRLF line endings, RFC 4180 quoting, and a header row.
- An empty unquoted field is
NULL.""is an empty text value. - Money is integer cents, tax exclusive, in the row’s currency, as everywhere in the API.
- Times are ISO 8601 in UTC, with microseconds. A time of day with no date (such as working hours) is a local clock time and is not shifted.
- Integer enums are written as their names, not their numbers.
- JSON columns and arrays are JSON text. Binary values are Base64.
- Files keep Drum ids and foreign key columns, so they join on them. For example,
account_user_idintracked_times.csvis theidof a row inaccount_users.csv. - Deleted records that Drum keeps are included, with a time in
discarded_at.
Formula guard. A text value that starts with =, +, -, @, a tab, a carriage return, a line feed or an apostrophe gets one extra apostrophe in front, so a spreadsheet does not run it as a formula. To get the stored value, remove exactly one leading apostrophe from any text value that starts with one. Numbers are never changed.
Rich text. rich_texts.csv holds rich text (notes, descriptions) as HTML. An attachment inside the text keeps data-export-type and data-export-id instead of a link: the id of an ActiveStorage::Blob joins to blob_id in files.csv. An embedded link keeps its address in data-export-url.
Files. files.csv lists the files attached to records: the record, the attachment name, the file name, its type, size and checksum. The files themselves are not in the archive.
Format changes
format_version is 1. A new file or column can be added within the same version, so read columns by their header name, not their position. A file or column that is removed or renamed gets a new version, and a note on this page.
What is in it
The archive covers the whole account: clients and contacts, opportunities and proposals, projects, deliverables, tasks and budgets, tracked time and timesheets, resourcing, invoices, claims and planned invoices, costs and expense claims, contracts, emails, Beats and notes, members, roles and teams, settings, catalogs and templates.
A file is named after its table, with a few exceptions:
| File | Source table |
|---|---|
deliverable_templates.csv |
procedures |
deliverables.csv |
project_procedures |
files.csv |
active_storage_attachments and active_storage_blobs |
rich_texts.csv |
action_text_rich_texts |
manifest.json lists every file in an archive.
What is left out
| Left out | Why |
|---|---|
| The attached files themselves | files.csv lists them. Download the ones you need from their records |
| API tokens, OAuth grants and tokens, MCP connections, and the connections to Xero, MYOB, QuickBooks and calendars | Credentials |
| Webhook subscriptions and their deliveries | They hold signing secrets |
The global users table |
One person can belong to several accounts, and it holds passwords, 2FA and sign-in fields. Each member’s name and email are in account_users.csv |
| Earlier data export runs | Read them with GET /api/v1/data_exports |
| The working state of imports, cost uploads, budget spreadsheet imports, the finance sync, invoice amendments and document conversions | Temporary. The records they made are exported |
| In-app notifications, the search index, derived dashboard metrics and image variants | Derived from other records. Month-end figures are in project_snapshots.csv |
| AI assistant conversations and AI provider bookkeeping | Global to Drum |
| The Drum subscription billing, plans, announcements and Drum’s audit of its own staff | Drum’s own records |