> ## 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.

# Update Web Source

> Change the refresh schedule of a web source.

Update a web source's refresh cadence. `daily` and `weekly` schedule automatic re-crawls;
`manual` clears the schedule so the source is only re-crawled via
[`resyncWebSource`](./resyncWebSource). Cadence changes take effect immediately and reset
the clock: the next scheduled run becomes now plus the new interval.

Scheduled refreshes run on a rolling interval from the last completed run (there is no
time-of-day control).

**Required fields**: `sourceId`, `refreshCadence`

| Field            | Type   | Required | Notes                                                            |
| ---------------- | ------ | -------- | ---------------------------------------------------------------- |
| `sourceId`       | string | ✅        | Web source ID returned by `createWebSource` or `listWebSources`. |
| `refreshCadence` | string | ✅        | One of `daily`, `weekly`, `manual`.                              |

**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": "updateWebSource",
    "projectId": "project_123",
    "sourceId": "7f2a9c04-3b1e-4c8a-9d2f-1e5b6a7c8d90",
    "refreshCadence": "daily"
  }'
```

**Responses**

<CodeGroup>
  ```json 200 - OK theme={null}
  {
    "id": "7f2a9c04-3b1e-4c8a-9d2f-1e5b6a7c8d90",
    "indexName": "docs-site",
    "rootUrl": "https://docs.yoursite.com",
    "maxPages": 500,
    "maxDocuments": 50000,
    "maxDepth": 3,
    "respectRobots": true,
    "parseDocuments": true,
    "refreshCadence": "daily",
    "nextRefreshAt": "2026-09-02T10:15:00.000+00:00",
    "lastCrawledAt": "2026-09-01T10:12:41.000+00:00",
    "lastPageCount": 214,
    "lastDocCount": 1893,
    "status": "idle",
    "lastErrorCode": null,
    "createdAt": "2026-09-01T10:00:00.000+00:00"
  }
  ```
</CodeGroup>

**Errors**

* `400` when `sourceId` is missing or `refreshCadence` is not `daily`, `weekly`, or `manual`.
* `404` if the web source is not found.
