[PR #2683] (api) ability to run bank sync via the API #4454

Closed
opened 2026-02-28 20:56:04 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/2683

State: closed
Merged: Yes


Allow running 3rd party (gocardless, simplefin) bank-sync via the API package.

This will allow people to run the bank-sync operation in the background on a schedule (i.e. with cron jobs).

Usage:

const api = require('@actual-app/api');

(async () => {
  await api.init({
    // Budget data will be cached locally here, in subdirectories for each file.
    dataDir: '/path/to/budget/file',
    // This is the URL of your running server
    serverURL: 'https://xxxxxxx.fly.dev',
    // This is the password you use to log into the server
    password: 'xxxxxx',
  });

  // This is the ID from Settings → Show advanced settings → Sync ID
  await api.downloadBudget('xxxxxx-xxxx-xxxxx-xxxxx');

  // Run bank sync for a single account
  await api.runBankSync({ accountId: 'xxxxxx-xxxxx-xxx-xxxxx-xxxxxxxx' });

  // Run bank sync for all accounts
  await api.runBankSync();

  await api.shutdown();
})();

Docs: https://github.com/actualbudget/docs/pull/350

**Original Pull Request:** https://github.com/actualbudget/actual/pull/2683 **State:** closed **Merged:** Yes --- Allow running 3rd party (gocardless, simplefin) bank-sync via the API package. This will allow people to run the bank-sync operation in the background on a schedule (i.e. with cron jobs). Usage: ```javascript const api = require('@actual-app/api'); (async () => { await api.init({ // Budget data will be cached locally here, in subdirectories for each file. dataDir: '/path/to/budget/file', // This is the URL of your running server serverURL: 'https://xxxxxxx.fly.dev', // This is the password you use to log into the server password: 'xxxxxx', }); // This is the ID from Settings → Show advanced settings → Sync ID await api.downloadBudget('xxxxxx-xxxx-xxxxx-xxxxx'); // Run bank sync for a single account await api.runBankSync({ accountId: 'xxxxxx-xxxxx-xxx-xxxxx-xxxxxxxx' }); // Run bank sync for all accounts await api.runBankSync(); await api.shutdown(); })(); ``` Docs: https://github.com/actualbudget/docs/pull/350
GiteaMirror added the pull-request label 2026-02-28 20:56:04 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#4454