DocsAPI ReferenceCreate a schedule
POST/v1/schedule

Create 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

NameTypeRequiredDescription
namestringrequiredHuman-readable label
cronExpressionstringrequiredStandard 5-field cron expression (≥5-minute interval). e.g. '0 2 * * *' for 2 AM daily
urlstringrequiredURL to crawl on each run
maxPagesnumberoptionaldefault: 100Maximum pages to crawl per run (1-1000)
formatsstring[]optionaldefault: ["markdown"]Content formats to extract per page
webhookUrlstringoptionalHTTPS 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.