---
title: "Update an existing flow"
method: PATCH
path: "/flows/{id}"
tags: ["flows"]
---

# Update an existing flow

`PATCH /flows/{id}`

The id is used to match the existing Flow that will be updated. Requires the 'flows.write' permission.

## Path parameters

- `id` string, string, required

## Request body

- MutableFlow
  - `name` string, required
  - `description` string
  - `tenant` string
  - `graph` FlowGraph, required
    - `nodes` object[] — An array of all components involved in this flow
      - `id` string, required — ID of this node, which will be referenced by edges
      - `componentId` string — The component repository id of the component (e.g. adapter/transformer) to be used in this step.
      - `credentials_id` string — A secret service id of a secret containing credentials for this node.
      - `function` string — The function that the component will be executing.
      - `name` string — Descriptive name of this node
      - `description` string
      - `fields` object — Optional arguments passed on to the component
    - `edges` object[] — An array of edges linking nodes together, determining the order in which nodes are activated
      - `id` string
      - `config` object
        - `condition` string
        - `mapper` object
      - `source` string, required — The source node of this edge, referring to the id field of a node
      - `target` string, required — The target node of this edge, referring to the id field of a node
  - `type` 'ordinary' | 'realtime', required — Flow type
  - `cron` string — A cron string describing the interval at which this flow is run. If unset, the flow uses webhooks instead
  - `owners` Owner[]
    - `id` string, required — External id of the owner
    - `type` string, required — Type to discriminate between user or tenant

## Response `200`

The updated Flow.

- object
  - `data` Flow
    - `name` string, required
    - `description` string
    - `tenant` string
    - `graph` FlowGraph, required
      - `nodes` object[] — An array of all components involved in this flow
        - `id` string, required — ID of this node, which will be referenced by edges
        - `componentId` string — The component repository id of the component (e.g. adapter/transformer) to be used in this step.
        - `credentials_id` string — A secret service id of a secret containing credentials for this node.
        - `function` string — The function that the component will be executing.
        - `name` string — Descriptive name of this node
        - `description` string
        - `fields` object — Optional arguments passed on to the component
      - `edges` object[] — An array of edges linking nodes together, determining the order in which nodes are activated
        - `id` string
        - `config` object
          - `condition` string
          - `mapper` object
        - `source` string, required — The source node of this edge, referring to the id field of a node
        - `target` string, required — The target node of this edge, referring to the id field of a node
    - `type` 'ordinary' | 'realtime', required — Flow type
    - `cron` string — A cron string describing the interval at which this flow is run. If unset, the flow uses webhooks instead
    - `owners` Owner[]
      - `id` string, required — External id of the owner
      - `type` string, required — Type to discriminate between user or tenant
    - `id` string, required
    - `status` 'active' | 'inactive' | 'starting' | 'stopping' — Flow status, set automatically in response to start/stop commands
    - `createdAt` string, date-time, required — Timestamp of flow creation
    - `updatedAt` string, date-time, required — Timestamp of most recent flow update
  - `meta` object

## Other responses

- `404` — Flow not found
- `409` — Flow is currently not inactive. Only stopped, inactive flows may be updated.

---

[API](https://skmtc.net/openintegrationhub/apis/flow-repository.md) · [All operations](https://skmtc.net/openintegrationhub/apis/flow-repository/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openintegrationhub/flow-repository/versions/898fa794c6b8/schema)
