Source: https://dinakar-rewind.docs.pageloop.ai/api-reference/admin/adminsynccodingbackfill

# Backfill one coding source in bounded chunks

POST `https://api.rewind.rest/v1/admin/sync/coding/backfill`

Runs one bounded backfill chunk for the given coding source, walking history backward. Re-run with the returned next\_cursor until it is null.

## Authorization

#### Authorization (header, string, required)

API key. Read keys (rw\_live\_...) access GET endpoints. Admin keys (rw\_admin\_...) access all endpoints.

## Body

#### source (body, enum (string), required) — allowed: wakatime, rescuetime, github

Which coding source to backfill.

#### cursor (body, string)

Opaque resume token from the previous response. Omit to start a fresh backfill.

## Response

#### 200

Backfill chunk completed

#### status (enum (string), required) — allowed: completed

#### items\_synced (integer, required)

#### next\_cursor (string, required)

Resume token for the next chunk, or null when complete.

#### timestamp (string, required)

#### 400

Bad request

#### error (string, required)

#### status (integer, required)

#### 401

Unauthorized

#### error (string, required)

#### status (integer, required)

#### 500

Internal server error

#### error (string, required)

#### status (integer, required)

#### Request

```bash cURL
curl -X POST 'https://api.rewind.rest/v1/admin/sync/coding/backfill' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"source": "github", "cursor": "string"}'
```

```javascript JavaScript
const res = await fetch('https://api.rewind.rest/v1/admin/sync/coding/backfill', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"source": "github", "cursor": "string"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.rewind.rest/v1/admin/sync/coding/backfill',
    headers={'Authorization': 'Bearer <token>'},
    json={"source": "github", "cursor": "string"}
)
data = res.json()
```

#### Response

```json 200
{
  "status": "completed",
  "items_synced": 42,
  "next_cursor": "2026-05-31",
  "timestamp": "date-time"
}
```

```json 400
{
  "error": "Not found",
  "status": 404
}
```

```json 401
{
  "error": "Not found",
  "status": 404
}
```

```json 500
{
  "error": "Not found",
  "status": 404
}
```
