POST
/v1/scheduleCreate a schedule
Creates a cron-based recurring crawl. Netleaf's in-process scheduler polls every 60 seconds and enqueues a crawl job whenever nextRunAt is past. Validates the cron expression before saving.
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | required | Human-readable label |
| cronExpression | string | required | Standard 5-field cron expression (≥5-minute interval). e.g. '0 2 * * *' for 2 AM daily |
| url | string | required | URL to crawl on each run |
| maxPages | number | optionaldefault: 100 | Maximum pages to crawl per run (1-1000) |
| formats | string[] | optionaldefault: ["markdown"] | Content formats to extract per page |
| webhookUrl | string | optional | HTTPS URL to POST results to when each run completes |
Example
bash
curl -X POST http://localhost:3000/v1/schedule \
-H "Content-Type: application/json" \
-d '{"name":"Nightly docs","cronExpression":"0 2 * * *","url":"https://docs.example.com","maxPages":200}'Response
bash
{
"success": true,
"data": {
"id": "s1a2b3c4-...",
"name": "Nightly docs",
"cronExpression": "0 2 * * *",
"nextRunAt": "2026-06-14T02:00:00Z",
"isActive": true
}
}Try it
Live preview only works when the API is running on your machine.
Run docker compose up and the Try-It panel will become interactive. Until then, copy the curl example below.