> 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

GET https://api.merge.dev/api/knowledgebase/v1/sync-status

Get sync status for the current sync and the most recently finished sync. `last_sync_start` represents the most recent time any sync began. `last_sync_finished` represents the most recent time any sync completed. These timestamps may correspond to different sync instances which may result in a sync start time being later than a separate sync completed time. To ensure you are retrieving the latest available data reference the `last_sync_finished` timestamp where `last_sync_result` is `DONE`. Possible values for `status` and `last_sync_result` are `DISABLED`, `DONE`, `FAILED`, `PARTIALLY_SYNCED`, `PAUSED`, `SYNCING`. Learn more about sync status in our [Help Center](https://help.merge.dev/en/articles/8184193-merge-sync-statuses).

Reference: https://docs.merge.dev/merge-unified/knowledge-base/data-management/sync-status/list

## 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)
- `https://api-ap.merge.dev/api/knowledgebase/v1` (ProductionAPSE1)

## Request

### Query parameters

- `cursor` (string, optional) — The pagination cursor value.
- `page_size` (integer, optional) — Number of results to return per page. The maximum limit is 100.

### Headers

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

## Response

### 200

- `next` (string, optional, nullable)
- `previous` (string, optional, nullable)
- `results` (list of SyncStatus, optional)

## 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) — * `SYNCING` - SYNCING * `DONE` - DONE * `FAILED` - FAILED * `DISABLED` - DISABLED * `PAUSED` - PAUSED * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
  - Allowed values: `SYNCING`, `DONE`, `FAILED`, `DISABLED`, `PAUSED`, `PARTIALLY_SYNCED`
- `is_initial_sync` (boolean, required)
- `last_sync_start` (datetime, optional)
- `next_sync_start` (datetime, optional)
- `last_sync_result` (enum, optional) — * `SYNCING` - SYNCING * `DONE` - DONE * `FAILED` - FAILED * `DISABLED` - DISABLED * `PAUSED` - PAUSED * `PARTIALLY_SYNCED` - PARTIALLY_SYNCED
  - Allowed values: `SYNCING`, `DONE`, `FAILED`, `DISABLED`, `PAUSED`, `PARTIALLY_SYNCED`
- `last_sync_finished` (datetime, optional)
- `selective_sync_configurations_usage` (enum, optional) — * `IN_NEXT_SYNC` - IN_NEXT_SYNC * `IN_LAST_SYNC` - IN_LAST_SYNC
  - Allowed values: `IN_NEXT_SYNC`, `IN_LAST_SYNC`

## Examples

**Response**

```json
{
  "next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
  "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
  "results": [
    {
      "model_name": "Article",
      "model_id": "knowledgebase.KnowledgeBaseArticle",
      "status": "SYNCING",
      "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",
      "selective_sync_configurations_usage": "IN_NEXT_SYNC"
    }
  ]
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.merge.dev/api/knowledgebase/v1/sync-status';
const options = {
  method: 'GET',
  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/knowledgebase/v1/sync-status"

	req, _ := http.NewRequest("GET", 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/knowledgebase/v1/sync-status")

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

request = Net::HTTP::Get.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.get("https://api.merge.dev/api/knowledgebase/v1/sync-status")
  .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('GET', 'https://api.merge.dev/api/knowledgebase/v1/sync-status', [
  '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/knowledgebase/v1/sync-status");
var request = new RestRequest(Method.GET);
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/knowledgebase/v1/sync-status")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```