> ## Documentation Index
> Fetch the complete documentation index at: https://docs.moss.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Resync Web Source

> Re-crawl a website and refresh its index.

Trigger a re-crawl of a web source on demand. The site is crawled again in full; if nothing
changed, the index is left untouched, otherwise it is rebuilt from the fresh crawl (pages
that disappeared from the site are dropped from the index). Works for both scheduled and
manual sources.

Returns `202 Accepted` with a `jobId`; poll
[`getJobStatus`](../index-management/getJobStatus) until the job completes.

**Required fields**: `sourceId`

| Field      | Type   | Required | Notes                                                            |
| ---------- | ------ | -------- | ---------------------------------------------------------------- |
| `sourceId` | string | ✅        | Web source ID returned by `createWebSource` or `listWebSources`. |

**Example request**

```bash theme={null}
curl -X POST "https://service.usemoss.dev/v1/manage" \
  -H "Content-Type: application/json" \
  -H "x-service-version: v1" \
  -H "x-project-key: moss_access_key_xxxxx" \
  -d '{
    "action": "resyncWebSource",
    "projectId": "project_123",
    "sourceId": "7f2a9c04-3b1e-4c8a-9d2f-1e5b6a7c8d90"
  }'
```

**Responses**

<CodeGroup>
  ```json 202 - Accepted theme={null}
  {
    "id": "7f2a9c04-3b1e-4c8a-9d2f-1e5b6a7c8d90",
    "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "status": "crawling"
  }
  ```
</CodeGroup>

**Errors**

* `400` when `sourceId` is missing.
* `404` if the web source is not found.
* `409` when a crawl is already in progress for this web source, or a build is already in
  progress for its index.
* `503` when website crawling is temporarily unavailable.
