---
title: "Update Routine"
method: PATCH
path: "/api/platform/v1/routines/{id}"
tags: ["workflows"]
---

# Update Routine

`PATCH /api/platform/v1/routines/{id}`

## Request

- Base URL: `https://docs.amdahl.ai`
- URL: `https://docs.amdahl.ai/api/platform/v1/routines/{id}`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Patch an existing Routine: rename it, change its prompt or cadence, re-pin the agent, adjust per-fire config, or enable/disable it. Use when tuning a standing scheduled ask without recreating it. Only the supplied fields change; a cadence change is re-validated first and takes effect on the next scheduler tick.

## Path parameters

- `id` string, required: The routine id.

## Request body

- object
  - `name` string: New human label.
  - `prompt` string: New Chat input for future fires.
  - `cron` string: New cron expression (validated before storing).
  - `timezone` string: New IANA timezone.
  - `agent` string, nullable: LEGACY single-agent pin, or null to clear back to the plain Master. Prefer config.agents; passing both rejects.
  - `config` object: Replacement per-fire config (replaces the whole object, including the agents roster).
    - `depth` 'quick' | 'standard' | 'deep'
    - `agents` union: Agents the routine employs: "all" for unrestricted delegation, one ref to run AS that agent (pin), or several refs to restrict delegation to that roster.
      - 'all'
      - string[]
    - `actions_allowed` string[]: Outbound actions each fired run may invoke. Absent = ALL cataloged actions (default ON); pass a list to narrow, [] to disable.
    - `external_search` boolean: Allow market fan-outs (external_search.execute in the kit). Default false.
    - `include_divergence` boolean: Fuse the divergence map on external_search.execute (else evidence-only). Default false.
  - `enabled` boolean: Enable or disable firing.

## Response `200`

OK

- object
  - `data` unknown

## Other responses

- `400`: Invalid input - failed schema validation
- `401`: Authentication required
- `403`: Forbidden - missing scope or role
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/amdahl/apis/amdahl-platform-api.md) · [All operations](https://skmtc.dev/amdahl/apis/amdahl-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amdahl/apis/amdahl-platform-api/revisions/d4eee33e2472?raw)
