---
title: "Update a workflow"
method: PUT
path: "/workflows/{id}"
tags: ["workflows"]
---

# Update a workflow

`PUT /workflows/{id}`

## Request

- Base URL: `https://api.onplana.com/api`
- URL: `https://api.onplana.com/api/workflows/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

## Path parameters

- `id` string, required

## Headers

- `X-Organization-Id` string, required

## Request body

- object: Partial update.

## Response `200`

Updated

- Workflow
  - `id` string, uuid, required
  - `name` string, required
  - `description` string, nullable
  - `organizationId` string, uuid, required
  - `projectId` string, uuid, nullable: null = org-wide; set = scoped to one project.
  - `isActive` boolean, required
  - `trigger` object, required: Event that fires this workflow.
    - `event` string, required: e.g. "task.created", "project.status.changed", "intake.submitted"
  - `graph` object, required: Directed graph of conditions, actions, approval steps, and delays. See the Workflow Builder UI for the canonical shape.
  - `schedule` object, nullable: Cron-style schedule for time-triggered workflows.
  - `runCount` integer
  - `maxRuns` integer, nullable
  - `lastRunAt` string, date-time, nullable
  - `createdById` string, uuid
  - `createdAt` string, date-time, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized - missing or invalid JWT
- `402`: Plan gate. automations (Pro and above). Changing the trigger TO a document trigger, or adding a SET_DOCUMENT_STATUS step, also needs documentApproval, Business and above; re-sending the stored trigger and graph never does. Answered before the server switch's 400
- `403`: Forbidden - insufficient role
- `404`: Not found

---

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