> This page is for Unified.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# /sync-status/resync

POST https://api.merge.dev/api/accounting/v1/sync-status/resync

Force re-sync of all models. This endpoint is available for monthly, quarterly, and highest sync frequency customers on the Professional or Enterprise plans. Doing so will consume a sync credit for the relevant linked account. Force re-syncs can also be triggered manually in the Merge Dashboard and is available for all customers.

Reference: https://docs.merge.dev/merge-unified/accounting/data-management/force-resync/sync-status-resync-create

## Authentication

- `Authorization` header (bearer token, required) — Token-based authentication with required prefix "Bearer"

## Servers

- `https://api.merge.dev/api` (Production, default)
- `https://api-eu.merge.dev/api` (ProductionEU)
- `https://api-ap.merge.dev/api` (ProductionAPSE1)

## Request

### Headers

- `X-Account-Token` (string, required) — Token identifying the end user.

## Response

### 200

- `list of SyncStatus`

## Types

### SyncStatus

# The SyncStatus Object ### Description The `SyncStatus` object is used to represent the syncing state of an account ### Usage Example View the `SyncStatus` for an account to see how recently its models were synced.

- `model_name` (string, required)
- `model_id` (string, required)
- `status` (enum, required)
  - Allowed values: `SYNCING`, `DONE`, `FAILED`, `DISABLED`, `PAUSED`, `PARTIALLY_SYNCED`
- `sync_status_reason` (enum, required, nullable) — Why a model is healthy but not actively progressing while its `status` stays `SYNCING`. Null when the model is progressing normally. `RATE_LIMITED` means the model is paused behind the data provider's rate limits. `WAITING_ON_OTHER_MODELS` means the model is on hold until other models finish syncing.
  - Allowed values: `RATE_LIMITED`, `WAITING_ON_OTHER_MODELS`
- `is_initial_sync` (boolean, required)
- `last_sync_start` (datetime, optional)
- `next_sync_start` (datetime, optional)
- `last_sync_result` (enum, optional)
  - Allowed values: `SYNCING`, `DONE`, `FAILED`, `DISABLED`, `PAUSED`, `PARTIALLY_SYNCED`
- `last_sync_finished` (datetime, optional)
- `data_fresh_as_of` (datetime, optional, nullable) — The point in time that this model's data is complete through. This is the start time of the most recent sync that completed successfully for the model. The data is current at least through this time and may be fresher. Null until the first sync completes.
- `historical_data_since` (datetime, optional, nullable) — The earliest point this model has complete historical data for, based on each record's modified date in the third-party platform. Records modified before this time have not been fully synced. A model synced over its full history reaches back to 1900-01-01, unless there's a selective sync filter. Null until the first sync completes.
- `selective_sync_configurations_usage` (enum, optional)
  - Allowed values: `IN_NEXT_SYNC`, `IN_LAST_SYNC`

## Examples

**Response**

```json
[
  {
    "model_name": "Invoice",
    "model_id": "accounting.Invoices",
    "status": "SYNCING",
    "sync_status_reason": "WAITING_ON_OTHER_MODELS",
    "is_initial_sync": true,
    "last_sync_start": "2021-03-30T19:44:18.695973Z",
    "next_sync_start": "2021-03-30T20:44:18.662942Z",
    "last_sync_result": "DONE",
    "last_sync_finished": "2021-03-30T19:55:18.695973Z",
    "data_fresh_as_of": "2021-03-30T19:44:18.695973Z",
    "historical_data_since": "1900-01-01T00:00:00Z",
    "selective_sync_configurations_usage": "IN_NEXT_SYNC"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.merge.dev/api/accounting/v1/sync-status/resync"

headers = {
    "X-Account-Token": "X-Account-Token",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.merge.dev/api/accounting/v1/sync-status/resync';
const options = {
  method: 'POST',
  headers: {'X-Account-Token': 'X-Account-Token', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.merge.dev/api/accounting/v1/sync-status/resync"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-Account-Token", "X-Account-Token")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.merge.dev/api/accounting/v1/sync-status/resync")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Account-Token"] = 'X-Account-Token'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.merge.dev/api/accounting/v1/sync-status/resync")
  .header("X-Account-Token", "X-Account-Token")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.merge.dev/api/accounting/v1/sync-status/resync', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'X-Account-Token' => 'X-Account-Token',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.merge.dev/api/accounting/v1/sync-status/resync");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Account-Token", "X-Account-Token");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Account-Token": "X-Account-Token",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.merge.dev/api/accounting/v1/sync-status/resync")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```