---
title: "Sync Transactions"
method: POST
path: "/api/openbanking/sync/{user_id}"
tags: ["openbanking"]
---

# Sync Transactions

`POST /api/openbanking/sync/{user_id}`

## Request

- Base URL: `https://api.earmarkiq.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.earmarkiq.app/api/openbanking/sync/{user_id}`
- Auth: HTTP bearer

Sync all Finexer bank connections for a user:
- Trigger sync on each bank account
- Poll until idle (max 30s)
- Fetch and store all transactions

IMPORTANT: This endpoint must NEVER call finexer.create_customer() or
finexer.create_consent_link(). It only operates on existing BankConnection
records using their stored finexer_bank_account_id.

## Path parameters

- `user_id` string, uuid, required

## Response `200`

Successful Response

- AppApiOpenbankingSyncResponse
  - `synced_accounts` integer, required
  - `new_transactions` integer, required
  - `total_transactions` integer, required
  - `status` string
  - `message` string, nullable
  - `retry_after_seconds` integer, nullable
  - `last_synced_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/earmarkiq/apis/earmark-api.md) · [All operations](https://skmtc.dev/earmarkiq/apis/earmark-api/llms.txt) · [OpenAPI document](https://skmtc.dev/earmarkiq/apis/earmark-api/revisions/4a2c41907105?raw)
