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

# Schedules

> Recurring scan schedules: create, trigger, pause, and delete.

A schedule runs a scan on a rhythm. Schedules live in their own resource so
you can pause, edit, or trigger them without touching the scan history.

## List and read

* `GET /api/schedules` — paginated list. `?q=` searches, and `?scanType=`
  filters by type.
* `GET /api/schedules/{id}` — one schedule.

## Create by triggering

`POST /api/schedules` triggers a scheduled scan now:

```json theme={"theme":{"light":"github-light","dark":"one-dark-pro"}}
{ "scheduleId": "sch_..." }
```

The endpoint validates that the schedule exists and can run. It returns
`400` for a disabled schedule and `404` for an unknown id.

## Edit and pause

* `PUT /api/schedules/{id}` — partial update. Change the cron expression,
  the interval, or the scan type.
* `PATCH /api/schedules/{id}/toggle` — pause or resume. A paused schedule
  keeps its config and skips its runs.
* `DELETE /api/schedules/{id}` — delete the schedule. Past scan rows stay.

Scans created with `scheduleType: "recurring"` manage their own schedule
row. You can also reach that row through `PATCH /api/scans/{id}/toggle`.
