Source Imports
A source import moves a whole budget from another product into a Budget Thing
workspace: accounts, categories, payees, transactions and, where the export
has one, the plan. It is a different thing from a bank-file import, which adds
transactions to one existing account (see File Imports). The two share the imports:read and
imports:write scopes but have their own paths.
The import runs in the background. Your integration creates it, uploads the export file, asks Budget Thing to inspect the file, sends back a configuration built from that inspection, and then polls until the import finishes.
Scopes and roles
| Operation | Scope |
|---|---|
| Create an import | imports:write |
| Inspect an import | imports:write |
| Start an import | imports:write |
| Get an import | imports:read |
A token that runs a whole import needs both. As always, scopes only restrict:
creating, inspecting and starting also require the token's owner to be an
owner, admin or editor of the workspace, and anything less is refused with
403 FORBIDDEN. Any member can read an import's status.
The lifecycle
POST /api/v1/workspaces/{workspaceID}/imports → awaiting_upload
PUT <upload.url> (the file itself)
POST /api/v1/workspaces/{workspaceID}/imports/{importID}/inspect → awaiting_configuration
POST /api/v1/workspaces/{workspaceID}/imports/{importID}/start → queued
GET /api/v1/workspaces/{workspaceID}/imports/{importID} → processing → completed | failed
The same flow as statuses. Each label is the request that moves the import on;
poll means reading it with GET until the status changes.
Each step only works from the status the previous one left behind.
| Status | Meaning |
|---|---|
awaiting_upload | Created. Upload the file, then inspect. |
inspecting | Inspection is running. You only see this if you read the import while an inspect request is still in flight. |
awaiting_configuration | Inspected. Read inspection and start the import with a configuration. |
queued | Accepted and waiting for a worker. |
processing | Running. progress and steps update as it goes. |
completed | Finished. summary reports what was created. |
failed | Ended without importing. error says why. |
The schema also lists cancelled. The API does not currently set it, and
there is no cancel operation; if you ever see it, treat it as a final status.
completed, failed and cancelled are final. A failed import cannot be
retried — create a new one.
1. Create the import
curl https://api.budgetthing.com/api/v1/workspaces/wks_3fQ0mZk8Xr2Lp9Va6Ne1Ty/imports \
-H "Authorization: Bearer $BUDGETTHING_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "ynab",
"filename": "My Budget as of 2026-11-01.zip",
"contentType": "application/zip",
"size": 482113
}'
| Field | Required | Notes |
|---|---|---|
type | Yes | The product the export comes from. See Import types. |
filename | Yes | The file's name, 1–512 characters. It is shown back to the user and carried in webhook events. |
contentType | No | The file's media type. |
size | No | The file's size in bytes. If you send it, the uploaded file must be exactly this size. |
The answer is 201 Created with the import object in
status awaiting_upload, plus an upload object:
{
"id": "srcimp_7Hc2LqT9wXe4Nb0Zr5Ka1M",
"workspaceId": "wks_3fQ0mZk8Xr2Lp9Va6Ne1Ty",
"type": "ynab",
"status": "awaiting_upload",
"filename": "My Budget as of 2026-11-01.zip",
"contentType": "application/zip",
"progress": {"percent": 0},
"steps": null,
"createdAt": "2026-11-11T15:04:05Z",
"updatedAt": "2026-11-11T15:04:05Z",
"upload": {
"url": "https://uploads.example.com/imports/...",
"method": "PUT",
"headers": {"Content-Type": "application/zip"},
"expiresAt": "2026-11-11T15:19:05Z"
}
}
Some import types refuse to be created at all in certain workspaces — a YNAB or Actual Budget import, for example, needs a workspace with no transactions. Those checks run here, before you upload anything.
2. Upload the file
Send the raw file bytes to upload.url with upload.method, adding every
header in upload.headers exactly as given. Do not send your Budget Thing
token: the URL is pre-signed.
curl -X PUT "$UPLOAD_URL" \
-H "Content-Type: application/zip" \
--data-binary @"My Budget as of 2026-11-01.zip"
The URL stops working at upload.expiresAt. If it lapses, create a new
import.
3. Inspect the file
curl -X POST https://api.budgetthing.com/api/v1/workspaces/wks_3fQ0mZk8Xr2Lp9Va6Ne1Ty/imports/srcimp_7Hc2LqT9wXe4Nb0Zr5Ka1M/inspect \
-H "Authorization: Bearer $BUDGETTHING_TOKEN"
Inspection reads the uploaded file and reports what is in it, without
importing anything. It runs while you wait and answers 200 with the import in
status awaiting_configuration and an inspection object. The shape of
inspection depends on the import type.
If the file is missing, is a different size from the one you declared, or is
not a valid export, inspection answers with an error and the import moves to
failed. Create a new import to try again.
4. Start the import
curl -X POST https://api.budgetthing.com/api/v1/workspaces/wks_3fQ0mZk8Xr2Lp9Va6Ne1Ty/imports/srcimp_7Hc2LqT9wXe4Nb0Zr5Ka1M/start \
-H "Authorization: Bearer $BUDGETTHING_TOKEN" \
-H "Content-Type: application/json" \
-d '{"configuration": { ... }}'
The body is a single configuration object whose shape depends on the import
type, and which is checked against the inspection. A configuration the import
type rejects answers 422 INVALID_IMPORT_CONFIGURATION, and the import stays in
awaiting_configuration so you can correct it and send it again.
An accepted configuration answers 200 with the import in status queued.
From here it cannot be changed.
5. Poll for the result
curl https://api.budgetthing.com/api/v1/workspaces/wks_3fQ0mZk8Xr2Lp9Va6Ne1Ty/imports/srcimp_7Hc2LqT9wXe4Nb0Zr5Ka1M \
-H "Authorization: Bearer $BUDGETTHING_TOKEN"
Poll every few seconds until the status is final. A large budget can take a
while. If you would rather be told, subscribe to the
transaction_import.* webhook events instead.
The import object
Every operation returns the same object.
| Field | Notes |
|---|---|
id | The import's ID, prefixed srcimp_. |
workspaceId | The workspace being imported into. |
type | The import type. |
status | See the lifecycle. |
filename | The name you gave when creating the import. |
contentType | The media type you gave, if any. |
size | The uploaded file's size in bytes, once inspected. |
inspection | What inspection found. Present from awaiting_configuration on. |
progress.percent | Overall progress, 0–100. |
progress.currentStep | The key of the step running now, if any. |
steps | The import type's steps, in order. null until the import is started. |
summary | What was created. Present once completed. |
error | Why the import failed. Present once failed. |
createdAt, updatedAt | RFC 3339 timestamps. |
startedAt, completedAt | Set when a worker picks the import up, and when it ends. |
Each entry in steps looks like this:
{
"key": "transactions",
"label": "Import transactions and transfers",
"translationKey": "sourceImports.ynab.steps.transactions",
"status": "processing",
"processed": 1200,
"total": 4810
}
A step's status is pending, processing, completed, failed or
skipped. processed and total appear only while a step can count its
work. Show label to the user, or resolve translationKey if you localize.
Errors on a failed import
When an import fails in the background there is no HTTP error to read, so the reason is recorded on the import:
{
"status": "failed",
"error": {
"code": "invalid_import_artifact",
"message": "errors.api.uploadedArtifactIsInvalid.detail",
"messageEnglish": "Uploaded artifact is invalid"
}
}
message is a translation key and messageEnglish is the same explanation in
English. code is the stable value to branch on. Note that it is lower case
here, while the same failure returned as an HTTP error carries it upper case in
the problem body — invalid_import_artifact here,
INVALID_IMPORT_ARTIFACT there.
code | What happened |
|---|---|
artifact_missing | No file was uploaded, or it is gone. |
invalid_upload_size | The uploaded file is empty, too large, or not the size you declared. |
invalid_import_artifact | The file is not a valid export for this import type. |
inspection_failed | Inspection could not finish. |
invalid_import_configuration | The configuration no longer fits the file. |
ynab_import_requires_empty_workspace, source_import_requires_empty_workspace | The workspace gained transactions after the import was started (YNAB, Actual Budget). |
storage_failure | The uploaded file could not be read from storage. |
execution_failure | The import could not be started, or failed while processing. |
progress_failure | The import ran, but its result could not be recorded. |
Errors from the operations
These are returned as application/problem+json, in the
standard error shape.
| Status | code | When |
|---|---|---|
403 | FORBIDDEN | The user's workspace role cannot import. |
404 | NOT_FOUND | No such import in this workspace — including one that has been cleaned up. |
409 | CONFLICT | Inspecting an import that is not awaiting_upload, or two requests raced to change it. |
409 | IMPORT_ALREADY_STARTED | Starting an import that is not awaiting_configuration, or that was already queued. |
409 | YNAB_IMPORT_REQUIRES_EMPTY_WORKSPACE | A YNAB import into a workspace that has transactions. |
409 | SOURCE_IMPORT_REQUIRES_EMPTY_WORKSPACE | An Actual Budget import into a workspace that has transactions. |
422 | VALIDATION_ERROR | The body failed schema validation — for example, an unknown type. |
422 | VALIDATION_FAILED | filename is only whitespace, or longer than 512 UTF-8 bytes after trimming. An empty filename fails schema validation (VALIDATION_ERROR) first. |
422 | UPLOAD_TOO_LARGE | The declared size is above the upload limit. A size of zero fails schema validation (VALIDATION_ERROR) first. |
422 | ARTIFACT_MISSING | Inspecting or starting before the file was uploaded. |
422 | INVALID_UPLOAD_SIZE | The uploaded file is empty, too large, or not the declared size. |
422 | INVALID_IMPORT_ARTIFACT | The file is not a valid export for this import type. |
422 | INVALID_IMPORT_CONFIGURATION | The configuration does not fit the inspection. |
Time limits
Imports that are never finished are cleaned up, and so is the uploaded file:
- An import still
awaiting_uploadis deleted a day after it was created. - An import left in
awaiting_configurationis deleted seven days after inspection. - After an import ends, the record and its file are deleted — a day after a completed import, seven days after a failed one.
Once deleted, reading the import answers 404. The accounts, categories and
transactions it created are not affected. Record the summary you need
before then.
The upload URL is valid for 15 minutes, and the largest file accepted is 256 MiB.
Webhook events
A source import publishes the same three events as any other transaction
import: transaction_import.started when a worker picks it up, and
transaction_import.completed or transaction_import.failed when it ends. The
event's import.source is the import type — ynab for a YNAB import — and
import.account_id is absent, because a source import fills a whole workspace
rather than one account. A failure event carries only a category
(file_invalid, configuration_invalid, storage_unavailable or
processing_error); read the import for the full error.
Individual transactions created by an import do not each send an event. See Webhook events.
Import types
ynab
Imports a budget exported from YNAB. The workspace must have no transactions — the import builds its history from scratch and cannot merge into an existing one. This is checked when you create the import, again when you start it, and once more when it runs.
The file. Upload the ZIP archive exactly as YNAB exports it. It must
contain one register file (a name ending in - Register.csv, or exactly
Register.csv) and may contain a plan file (ending in - Plan.csv, or exactly
Plan.csv); everything else in the archive is ignored. A bare CSV is not
accepted.
The same import type also reads a Zerosum export. When the archive has no
register file, a transactions.csv (required) and a budget.csv (optional) at
any depth are read instead, and the inspection, configuration and summary have
the same shape. There is no separate import type for Zerosum. See
Import from Zerosum for what is mapped and what is
left behind.
The inspection.
{
"source": "ynab",
"accounts": [
{
"sourceId": "ynab_account_5f0c2e9a41b7d3086ae1c2f4",
"name": "Everyday Checking",
"sourceType": "Checking",
"suggestedAccountType": "checking",
"transactionCount": 1834
}
],
"transactionCount": 4810,
"hasPlan": true,
"dateFormat": {
"suggested": "MM/DD/YYYY",
"candidates": ["MM/DD/YYYY", "DD/MM/YYYY"],
"ambiguous": true,
"rejected": [
{"format": "YYYY-MM-DD", "row": 2, "value": "11/01/2026"}
]
},
"warnings": [
{"code": "zerosum_tags_ignored", "count": 12}
]
}
sourceis the export format the file was recognized as:ynaborzerosum. Zerosum files use the YNAB import type, so this is how you tell them apart, for example to name the source on a progress screen. It is absent on imports inspected before the field was added; treat that asynab.accountslists every account in the register.sourceIdis the value you send back in the configuration.hasPlansays whether the archive included a plan, so budgeted amounts will be imported as well as transactions.dateFormatreports which date formats read every date in the register.suggestedis the recommended one, ornullwhen no supported format reads them all. Whenambiguousistrue, more than one format works — dates such as03/04/2026read either way — and you should let the user confirm the choice.rejectedgives, for each format that does not work, the first register row (1-based) whose date it cannot read.warningsis present only when the file has something the import does not carry over. The import still succeeds. Each entry has a stablecodeand the number of rows it applies to (count). Codes arezerosum_tags_ignored,zerosum_set_aside_ignoredandzerosum_transfer_untracked(a transfer to an account that is not in the export, imported as a regular transaction). Treat an unknown code as a generic warning.
The configuration.
{
"configuration": {
"accounts": [
{"sourceId": "ynab_account_5f0c2e9a41b7d3086ae1c2f4", "accountType": "checking"}
],
"dateFormat": "MM/DD/YYYY"
}
}
accountsmust map every account in the inspection, once each, to a Budget Thing account type:checking,savings,credit_card,cash,digital_wallet,asset,liabilityorinvestment. Starting fromsuggestedAccountTypeis usually right. A missing, duplicate or unknownsourceId, or an unknown account type, is refused withINVALID_IMPORT_CONFIGURATION.dateFormatis required and must be one of the inspection'scandidates. The supported formats areMM/DD/YYYY,DD/MM/YYYY,YYYY-MM-DD,YYYY/MM/DD,DD-MM-YYYY,DD.MM.YYYYandYYYY.MM.DD. A format that was rejected is refused with a message naming the row and date it cannot read. The import uses the format you send and never guesses again.
The steps, in order: load, validate, categories, accounts,
payees, transactions, reconciliation, finalize.
The summary. Every field is a count, except
negativeBalanceRolloverAmountMinor, which is an amount in the workspace's
minor unit.
| Field | Counts |
|---|---|
accountsCreated | Accounts created. |
categoryParentsCreated, categoriesCreated | Category groups and categories created. |
payeesCreated | Payees created. |
payeesMatched | Source payees that reused an existing payee instead of creating one. |
transactionsCreated | Transactions created. |
splitTransactionsCreated | Split transactions created. |
accountTransfersCreated | Transfers between accounts created. |
liabilityPaymentsCreated | Of those transfers, the ones recognized as credit card payments. |
transactionsCleared, transactionsReconciled | Transactions marked cleared, and marked reconciled. |
reconciliationsCreated | Account reconciliations recorded. |
zeroValueRowsSkipped | Register rows with a zero amount, skipped. |
planRowsProcessed | Plan rows read. |
zeroAssignedRowsSkipped | Plan rows with nothing assigned, skipped. |
planActivityRowsValidated | Plan activity rows checked against the imported transactions. |
categoryTransfersCreated | Every movement of money between categories the import made. The five fields below break it down. |
fundingTransfersCreated | Monthly amounts assigned to categories, from the plan. |
explicitCategoryTransfersCreated | Category moves recorded in the register. |
inferredCategoryTransfersCreated | Category moves worked out from the plan's activity. |
negativeBalanceRolloversCreated | Overspent category balances carried forward. negativeBalanceRolloverAmountMinor is their total. |
availableBalanceAdjustmentsCreated | Adjustments made so category balances match the export. |
For what a YNAB import brings across and how it maps YNAB concepts, see Import from YNAB in the help centre.
actual
Imports a budget exported from Actual Budget (Settings → Export data). Like
YNAB, the workspace must have no transactions, and the import is
all-or-nothing. The refusal is SOURCE_IMPORT_REQUIRES_EMPTY_WORKSPACE. There is
no in-app screen yet, so this type is API only.
The file. Upload the ZIP exactly as Actual exports it, containing
db.sqlite and metadata.json. The database is read-only and never executed;
files that are oversized, malformed or contain unexpected schema objects are
refused with INVALID_IMPORT_ARTIFACT.
The inspection.
{
"budgetName": "Household",
"schemaVersion": 1788468782000,
"budgetType": "envelope",
"accounts": [
{
"sourceId": "actual_account_9cc689540e721247074d1a03",
"name": "Everyday Checking",
"offBudget": false,
"closed": false,
"suggestedAccountType": "checking",
"transactionCount": 10
}
],
"transactionCount": 12,
"categoryCount": 3,
"payeeCount": 3,
"budgetRows": 3,
"amountSamples": [-120000, -8250],
"warnings": [{"code": "carryOverNotImported", "count": 1}]
}
budgetType is envelope or tracking; only envelope budgets have their
monthly assignments imported. amountSamples are raw integers from the file,
in hundredths of a unit: Actual always stores two decimal places whatever the
currency, so 100000 is 1,000.00 (¥1,000 in a yen workspace). Show them to
the user to confirm against Actual before starting.
The configuration.
{
"configuration": {
"currency": "USD",
"accounts": [
{"sourceId": "actual_account_9cc689540e721247074d1a03", "accountType": "checking"}
]
}
}
currencymust equal the workspace's base currency. The file carries no currency, so this is the user's confirmation that its amounts are in it.accountsmust map every inspectionsourceId, once each, to a Budget Thing account type. A mismatch is refused withINVALID_IMPORT_CONFIGURATION.
The summary has the same counters as a YNAB import, plus warnings: an
array of {code, count} pairs. Warnings never contain names or other content
from the file.
Warning code | Counts |
|---|---|
trackingBudgetSkipped | 1 when a tracking budget's amounts were not imported |
orphanTransactionsSkipped | Rows of deleted accounts, or split lines with no parent |
unpairedTransfersImportedAsTransactions | Transfer halves imported as ordinary transactions |
splitParentAmountMismatch | Splits whose lines did not sum to the total (lines are used) |
zeroAmountRowsSkipped | Rows with a zero amount |
unresolvedCategories | Rows imported uncategorized because their category is gone |
budgetRowsForUnknownCategories | Budget amounts on income or deleted categories |
duplicateNamesRenamed | Names made unique with a numeric suffix |
transferCategoriesDropped | Transfers between two asset-type accounts that had a category |
carryOverNotImported | Categories with carry-over turned on |
holdForNextMonthNotImported | Months with money held for next month |
For what is brought across, see Import from Actual Budget.