---
title: "Patch a schedule"
method: PATCH
path: "/api/schedules/{id}"
tags: ["Schedules"]
---

# Patch a schedule

`PATCH /api/schedules/{id}`

Partially updates a schedule by shallow-merging provided fields over the existing row.

## Path parameters

- `id` string, required

## Request body

- object
  - `key` string — Non-unique asset directory namespace (for example shared/ or personal/<user-id>/drafts/). Runtime write boundaries normalize and validate the canonical form.
  - `name` string
  - `description` string
  - `cronExpression` string, nullable
  - `intervalMs` integer, nullable
  - `taskTemplate` string
  - `taskType` string
  - `tags` string[]
  - `priority` integer
  - `targetAgentId` string, nullable
  - `enabled` boolean
  - `timezone` string
  - `model` string, nullable
  - `modelTier` 'smol' | 'regular' | 'smart' | 'ultra' | 'null', nullable
  - `nextRunAt` string, nullable
  - `targetType` 'agent-task' | 'workflow' | 'script'
  - `workflowId` string, uuid, nullable
  - `scriptName` string, nullable
  - `scriptArgs` object, nullable

## Response `200`

Schedule patched

## Other responses

- `400` — Validation error
- `404` — Schedule not found
- `409` — Duplicate name

## Changes

- **2026-07-28** `cf533d6b49b0` — 1 breaking
  - the `targetAgentId` request property format changed from `uuid` to no format
- **2026-07-11** `f1022d5edb0d` — 1 info
  - added the new optional request property `key`
- **2026-07-08** `13bd92bf5f04` — 1 info
  - endpoint added
- **2026-07-02** `0c910612f9ac` — 1 breaking
  - api removed without deprecation

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/schedules/:id/patch.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/92a1dcbd2fc7/schema)
