---
title: "Start a sync"
method: POST
path: "/api/v2/projects/{slug}/sync/"
tags: ["Sync"]
---

# Start a sync

`POST /api/v2/projects/{slug}/sync/`

## Request

- Base URL: `https://app.biel.ai`
- URL: `https://app.biel.ai/api/v2/projects/{slug}/sync/`
- Auth: API key in header `Authorization`

Re-crawl all project sources and update the search index. Returns immediately; the crawl runs in the background. Poll [`GET /api/v2/projects/{slug}/sync/`](/api/get-sync-status), or the `last_sync` field from [`GET /api/v2/projects/{slug}/`](/api/get-project), to track completion.

Calling this endpoint while a sync is already running cancels the in-progress run and starts a fresh one.

When only one page changed, use [`POST /api/v2/projects/{slug}/recrawl/`](/api/recrawl-url) instead. It replaces that page in the existing index and leaves the rest of the project untouched.

Rate limits may apply to this endpoint.

**Required permission:** `sync_create`

## Path parameters

- `slug` string, required

## Response `202`

Sync started. Poll the returned `uuid` via [`GET /api/v2/projects/{slug}/sync/{sync_uuid}/`](/api/get-sync-run).

- SyncSummary: Compact summary of a sync run, embedded in the project's `last_sync` field for lightweight polling.
  - `uuid` string, uuid, required: UUID of the sync run.
  - `status` 'running' | 'success' | 'error' | 'warning' | 'canceled', required: - `running`: crawl is in progress. - `success`: crawl finished without errors. - `warning`: crawl finished with non-fatal warnings (some URLs may have failed). - `error`: crawl failed. - `canceled`: a newer [`POST /api/v2/projects/{slug}/sync/`](/api/sync-project) call superseded this run.
  - `started_at` string, date-time, required: ISO-8601 timestamp of when the run started.
  - `finished_at` string, date-time, nullable: ISO-8601 timestamp of when the run finished, or `null` while `status` is `running`.
  - `total_sources` integer, required: Total number of sources processed in this run, including expanded entries (for example, individual files of a repository).

## Other responses

- `403`: Forbidden. Missing permissions.
- `404`: Resource not found.

---

[API](https://skmtc.dev/biel/apis/biel-ai-api.md) · [All operations](https://skmtc.dev/biel/apis/biel-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/biel/apis/biel-ai-api/revisions/ac7034d82696?raw)
