---
title: "Create"
method: POST
path: "/api/v1/schedules/upsert-schedule"
tags: ["Schedules"]
---

# Create

`POST /api/v1/schedules/upsert-schedule`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v1/schedules/upsert-schedule`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Creates a new scan schedule or updates an existing one

## Request body

- object
  - `id` string: Schedule ID (only for updates)
  - `organizationId` string, required: Organization to create/update schedule for
  - `crontab` string, required: Crontab expression defining when scans should run
  - `timezone` string: Timezone for the schedule
  - `repositoryIds` string[], required: IDs of repositories to scan on schedule

## Response `200`

Schedule created or updated successfully

- object
  - `id` string, required: ID of the created/updated schedule

---

[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)
