---
title: "Upsert Flow"
method: PUT
path: "/api/v1/flows/{flow_id}"
tags: ["Flows"]
---

# Upsert Flow

`PUT /api/v1/flows/{flow_id}`

Create or update a flow with a specific ID (upsert).

Returns 201 for creation, 200 for update.  Returns 404 if owned by another user.

## Path parameters

- `flow_id` string, uuid, required

## Request body

- FlowCreate
  - `a2a_card_overrides` object, nullable — User overrides for the generated A2A agent card (skill description, examples, tags)
  - `a2a_enabled` boolean, nullable — Can be exposed as an A2A agent (only meaningful when flow_type=agent)
  - `access_type` 'PRIVATE' | 'PUBLIC'
  - `action_description` string, nullable — The description of the action associated with the flow
  - `action_name` string, nullable — The name of the action associated with the flow
  - `data` object, nullable
  - `description` string, nullable
  - `endpoint_name` string, nullable
  - `flow_type` 'workflow' | 'agent'
  - `folder_id` string, uuid, nullable
  - `fs_path` string, nullable
  - `gradient` string, nullable
  - `icon` string, nullable
  - `icon_bg_color` string, nullable
  - `id` string, uuid, nullable
  - `is_component` boolean, nullable
  - `locked` boolean, nullable
  - `mcp_enabled` boolean, nullable — Can be exposed in the MCP server
  - `name` string, required
  - `tags` string[], nullable
  - `updated_at` string, date-time, nullable
  - `user_id` string, uuid, nullable
  - `webhook` boolean, nullable — Can be used on the webhook endpoint
  - `workspace_id` string, uuid, nullable

## Response `200`

Successful Response

- FlowRead
  - `a2a_card_overrides` object, nullable — User overrides for the generated A2A agent card (skill description, examples, tags)
  - `a2a_enabled` boolean, nullable — Can be exposed as an A2A agent (only meaningful when flow_type=agent)
  - `access_type` 'PRIVATE' | 'PUBLIC'
  - `action_description` string, nullable — The description of the action associated with the flow
  - `action_name` string, nullable — The name of the action associated with the flow
  - `data` object, nullable
  - `description` string, nullable
  - `endpoint_name` string, nullable
  - `flow_type` 'workflow' | 'agent'
  - `folder_id` string, uuid, nullable, required
  - `gradient` string, nullable
  - `icon` string, nullable
  - `icon_bg_color` string, nullable
  - `id` string, uuid, required
  - `is_component` boolean, nullable
  - `locked` boolean, nullable
  - `mcp_enabled` boolean, nullable — Can be exposed in the MCP server
  - `name` string, required
  - `name_key` string, nullable — Stable i18n key derived from the original English name
  - `tags` string[], nullable — The tags of the flow
  - `updated_at` string, date-time, nullable
  - `user_id` string, uuid, nullable, required
  - `webhook` boolean, nullable — Can be used on the webhook endpoint
  - `workspace_id` string, uuid, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-21** `22962dc5e81b` — 6 info
  - added the new optional request property `a2a_card_overrides`
  - added the new optional request property `a2a_enabled`
  - added the new optional request property `flow_type`
  - added the optional property `a2a_card_overrides` to the response with the `200` status
  - …2 more
- **2026-06-08** `a5c4fa6a88f7` — 3 info
  - added the new optional request property `workspace_id`
  - added the optional property `name_key` to the response with the `200` status
  - added the optional property `workspace_id` to the response with the `200` status
- **2026-04-13** `acd160326a88` — 1 info
  - endpoint added
- **2025-10-16** `9bd3e81318d7` — 1 breaking
  - api removed without deprecation

[Change history](https://skmtc.dev/langflow-ai/apis/langflow/changes/api/v1/flows/:flow_id/put.md)

---

[API](https://skmtc.dev/langflow-ai/apis/langflow.md) · [All operations](https://skmtc.dev/langflow-ai/apis/langflow/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/langflow-ai/langflow/revisions/22962dc5e81b/schema)
