---
title: "Sync Accounts"
method: POST
path: "/accounts/sync"
tags: ["accounts"]
---

# Sync Accounts

`POST /accounts/sync`

## Request

- Base URL: `https://dev.whispa.net` (the document declares no server; this is the origin it was published from)
- URL: `https://dev.whispa.net/accounts/sync`
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `auth/bearer/login`
  - API key in cookie `access_token`

Pull provider accounts into the working set (admin only).

``existing`` refreshes only the provider-owned accounts already visible in
the working set and runs in the background — poll
``GET /accounts/sync/status``. ``ids`` imports explicit row ids / account
numbers (for example a CSV batch) inline and returns the final counts.

## Request body

- AccountSyncRequest: Refresh the existing working set or import an explicit ref list.
  - `mode` 'existing' | 'ids', required
  - `external_ids` string[], nullable: Account refs for mode=ids — provider row ids or account numbers, both resolve.

## Response `202`

Successful Response

- AccountSyncRunRead
  - `id` string, uuid, required
  - `provider` string, required
  - `mode` string, required
  - `client_id` string, nullable
  - `status` string, required
  - `synced` integer, required
  - `total` integer, nullable
  - `processed` integer
  - `stalled` boolean
  - `not_found` string[]
  - `error` string, nullable
  - `started_at` string, date-time, required
  - `finished_at` string, date-time, nullable
  - `created_by` string, uuid, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/whispa/apis/whispa-api.md) - [All operations](https://skmtc.dev/whispa/apis/whispa-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whispa/apis/whispa-api/revisions/12c2e4aca43c?raw)
