# Update a scan schedule

`PUT /app/scan-schedules/{id}`

Changes when it runs, or turns it on or off; its name and next run are recomputed.

Scope: `scans:write`.

## Parameters

- `id` (path, integer, required)

## Request body

- `name` (string): Ignored: the name is derived from when the schedule runs.
- `frequency` (string)
- `dayOfWeek` (integer | null)
- `dayOfMonth` (integer | null)
- `time` (string)
- `enabled` (boolean)
- `intervalDays` (integer | null)
- `windowStartHour` (integer | null)
- `windowEndHour` (integer | null)
- `windowDays` (integer[])

## Example

```bash
curl -X PUT "https://api.fortwatch.ai/app/scan-schedules/42" \
  -H "Authorization: Bearer $FORTWATCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Production",
  "frequency": "string",
  "dayOfWeek": 1,
  "dayOfMonth": 1,
  "time": "string",
  "enabled": true,
  "intervalDays": 1,
  "windowStartHour": 1,
  "windowEndHour": 1,
  "windowDays": [
    1
  ]
}'
```

## Response 200

The request succeeded.

- `id` (number, required)
- `assetId` (number, required)
- `name` (string, required)
- `frequency` (string, required)
- `dayOfWeek` (number | null, required)
- `dayOfMonth` (number | null, required)
- `time` (string, required)
- `intervalDays` (number | null, required)
- `windowStartHour` (number | null, required)
- `windowEndHour` (number | null, required)
- `windowDays` (number[], required)
- `enabled` (boolean, required)
- `lastRunAt` (string (date-time) | null, required)
- `nextRunAt` (string (date-time) | null, required)
- `createdAt` (string (date-time), required)
- `updatedAt` (string (date-time), required)
- `asset` (object, required)
  - `id` (number, required)
  - `projectId` (number, required)
  - `name` (string | null, required)
  - `type` (string, required)
  - `value` (string, required)
  - `status` (string, required)
  - `canonicalUrl` (string | null, required)
  - `resolvedIp` (string | null, required)
  - `cdnProvider` (string | null, required)
  - `bucketProvider` (string | null, required)
  - `lastCheckedAt` (string (date-time) | null, required)
  - `failReason` (string | null, required)
  - `skippedRedirectHost` (string | null, required)
  - `disabledScannerTypes` (string[], required)
  - `portScanMode` (string, required)
  - `nucleiMinSeverity` (string, required)
  - `ownershipVerifiedAt` (string (date-time) | null, required)
  - `ownershipToken` (string, required)
  - `ownershipMethod` (string | null, required)
  - `createdAt` (string (date-time), required)
  - `updatedAt` (string (date-time), required)
  - `project` (object, required)
    - `id` (number, required)
    - `name` (string, required)

```json
{
  "id": 42,
  "assetId": 42,
  "name": "Production",
  "frequency": "string",
  "dayOfWeek": 1,
  "dayOfMonth": 1,
  "time": "string",
  "intervalDays": 1,
  "windowStartHour": 1,
  "windowEndHour": 1,
  "windowDays": [
    1
  ],
  "enabled": true,
  "lastRunAt": "2026-10-16T12:00:00.000Z",
  "nextRunAt": "2026-10-16T12:00:00.000Z",
  "createdAt": "2026-10-16T12:00:00.000Z",
  "updatedAt": "2026-10-16T12:00:00.000Z",
  "asset": {
    "id": 42,
    "projectId": 42,
    "name": "Production",
    "type": "string",
    "value": "app.example.com",
    "status": "string",
    "canonicalUrl": "string",
    "resolvedIp": "string",
    "cdnProvider": "string",
    "bucketProvider": "string",
    "lastCheckedAt": "2026-10-16T12:00:00.000Z",
    "failReason": "string",
    "skippedRedirectHost": "string",
    "disabledScannerTypes": [
      "string"
    ],
    "portScanMode": "string",
    "nucleiMinSeverity": "string",
    "ownershipVerifiedAt": "2026-10-16T12:00:00.000Z",
    "ownershipToken": "string",
    "ownershipMethod": "string",
    "createdAt": "2026-10-16T12:00:00.000Z",
    "updatedAt": "2026-10-16T12:00:00.000Z",
    "project": {
      "id": 42,
      "name": "Production"
    }
  }
}
```

## Errors

- 400: The request is not valid: a field is missing or has the wrong shape (the message names it).
- 401: No valid credentials: the API key or access token is missing, revoked or expired (INVALID_API_KEY, INVALID_TOKEN).
- 403: Not allowed: the key or token lacks this scope (SCOPE_REQUIRED), the route is dashboard-only (SESSION_REQUIRED), or a plan limit applies.
- 404: Not found in your workspace.
- 429: Too many requests (RATE_LIMITED): wait the seconds Retry-After gives.
