---
title: "Delete Scan Schedule"
method: POST
path: "/api/v2/scans/deleteSchedule"
tags: ["Scans"]
---

# Delete Scan Schedule

`POST /api/v2/scans/deleteSchedule`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/scans/deleteSchedule`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Delete automated scan schedules for the specified repositories.

## Request body

- ScanScheduleDeleteRequest: Input for deleting automated scan schedules. Pass scheduleId to delete a specific schedule, or just repositoryIds to delete all schedules for those repositories.
  - `organizationId` string: Organization ID that owns the repositories. If omitted, resolved from the authenticated user.
  - `repositoryIds` string[], required: IDs of the repositories whose scan schedules should be deleted.
  - `scheduleId` string: Specific schedule ID to delete. When provided, only this schedule is deleted (must belong to one of the specified repositories). When omitted, all schedules for the specified repositories are deleted.

## Response `200`

Schedules deleted successfully

- ScanScheduleDeleteResponse
  - `ok` boolean, required: Whether the operation succeeded
  - `deletedCount` number, required: Number of schedules that were deleted

## Other responses

- `401`: Error Response
- `404`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
