> ## Documentation Index
> Fetch the complete documentation index at: https://docs.didit.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync Now: Refresh Bank Data on Demand

> Ask for the latest bank data of a connection at any moment with one call, wait for the result, and know the bank's daily limit and what 429 returns.

Didit's Sync Now reads the bank for the latest data of a connection at any moment, with one call.
Live syncs are included in the monthly price of the connection: nothing extra is charged.
The only limit is the bank's.

## The automatic sync

* The first sync runs when the person connects.
* After that, every active ongoing connection syncs automatically between one and four times a day, depending on the bank. `sync.frequency_per_day` on the connection says how many, and `sync.next_sync_at` when the next one is planned.
* Where the bank allows more unattended reads a day, at least two a day always remain for live syncs.
* When a sync stores changes, `bank.data.updated` arrives and you read the [change feed](https://docs.didit.me/standalone-apis/bank-transactions-sync.md) with your cursor.
* A sync that fails is retried with backoff. After 24 hours of failures the connection stays `active` with `sync.status: failing`, and `bank.sync.failed` is sent. `bank.sync.recovered` follows when it works again.
* When the bank asks the person to sign in again, the connection becomes `renewal_required`.

## Sync now, in one call

Add `"wait": true` and one request returns fresh data:

```bash theme={null}
curl -X POST https://verification.didit.me/v3/bank/connections/$CONNECTION_ID/refresh/ \
  -H "x-api-key: $DIDIT_API_KEY" -H "content-type: application/json" \
  -d '{ "wait": true }'
```

The header `Prefer: wait=25` does the same.
The call holds for up to 25 seconds:

| Answer | Meaning |
| - | - |
| `200` | The sync finished. The body is the sync with its `outcome`, the per-account counts of `added`, `modified` and `removed`, and `balances_changed`. |
| `202` | The bank has not answered in 25 seconds, or you did not ask to wait. The body has the `sync_id`: read the sync with `get_sync_run`, or subscribe to `bank.sync.completed`. `bank.data.updated` follows only when the sync stores changes. |

```json theme={null}
{
  "id": "d4a9e7b2-1c58-4f03-96ab-5e2d8c7f0b14",
  "trigger": "requested",
  "status": "succeeded",
  "outcome": "succeeded",
  "balances_changed": true,
  "results": [{ "resource": "transactions", "outcome": "succeeded", "added": 3, "modified": 0, "removed": 1 }]
}
```

If a sync is already running you get that same `sync_id`, not a second job.
After a `200` or a `bank.data.updated`, read the change feed with your stored cursor.
Read what a sync did later with [`get_sync_run`](https://docs.didit.me/standalone-apis/bank-sync-run-get).

## The price

Automatic syncs and live syncs are both included in the monthly price of the connection, see [pricing](https://docs.didit.me/getting-started/bank-verification-pricing.md).
A live sync never adds a charge.

## The bank's daily limit

A bank limits how often data can be fetched without the person present.
European rules let a bank limit unattended access to four reads a day per account.
That is a ceiling, not a promise: a bank may allow fewer or agree to more.

* Automatic and live syncs share one budget, and the automatic schedule never uses the last two reads of a day.
* `sync.live_syncs_left_today` on the connection says how many live syncs remain today, and `sync.budgets[]` shows each bucket: `scope` (`connection` or `account`), `resource`, `limit`, `remaining` and `resets_at`.
* While the person is present in Bank Link, for a renewal or a reconnect, reads are not limited.
* When the day's budget is used up, the call answers `429 refresh_limit_reached` with a `Retry-After` header (the seconds until the budget resets) and a `sync` object with `live_syncs_left_today` and `budgets`. Wait that long, and rely on the automatic sync meanwhile.
* Your API limits are separate: 600 reads and 300 writes per minute per application, with `X-RateLimit-*` headers.

## Know how fresh the data is

* `sync.last_synced_at` on the connection and on each account is when Didit last fetched from the bank, not when you last read it.
* Both transaction reads return `X-Bank-Last-Synced-At`.

## Errors you should handle

| Error | Meaning | Do |
| - | - | - |
| `429 refresh_limit_reached` | The bank's budget is used up. | Wait `Retry-After`, and rely on the automatic sync. |
| `409 connection_not_active` | The connection is not `active`. | Check its status. |
| `409 consent_expired` | The consent ended. | [Renew it](https://docs.didit.me/use-cases/renew-bank-consent.md). |

## Related

* [Continuous bank feed for accounting](https://docs.didit.me/use-cases/bank-data-for-accounting.md)
* [Bank webhooks](https://docs.didit.me/core-technology/bank-verification/webhooks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.