---
title: "Construct Public Workflow Flow"
method: POST
path: "/v2/public/workflows/{workflow_id}/flow/construct"
tags: ["workflows"]
---

# Construct Public Workflow Flow

`POST /v2/public/workflows/{workflow_id}/flow/construct`

## Request

- Base URL: `https://api.sanka.com`
- URL: `https://api.sanka.com/v2/public/workflows/{workflow_id}/flow/construct`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sankahq/apis/sanka-public-api/docs/v2/public/workflows/:workflow_id/flow/construct/post.ts> (a function with typed inputs; its response is checked against the schema)

Apply an approved update while preserving native workflow and node IDs.

Stale definitions, conflicting independent edits and unsupported active
updates are rejected. Retry the original plan and attempt after uncertainty.

## Path parameters

- `workflow_id` string, uuid, required

## Query parameters

- `workspace_id` string, nullable

## Headers

- `X-Workspace-Code` string

## Request body

- PublicFlowConstructRequest
  - `plan_digest` string, required
  - `attempt_id` string, uuid, required

## Response `200`

Successful Response

- ConstructPublicWorkflowFlowApiV2PublicWorkflowsWorkflowIdFlowConstructPost200Envelope
  - `success` true, required
  - `data` PublicFlowConstructData, required
    - `workspace_id` string, uuid, required
    - `workflow_id` string, uuid, required
    - `request_id` string, uuid, required
    - `plan_digest` string, required
    - `definition_digest` string, required
    - `status` 'constructed' | 'already_constructed', required
  - `meta` EnvelopeMeta, required
    - `ctx_id` string, required
    - `pagination` PaginationMeta
      - `page` integer, required
      - `page_size` integer, required
      - `total` integer, required
      - `next_cursor` string, nullable
    - `toast` ToastMessage
      - `variant` 'success' | 'error' | 'info' | 'warning', required
      - `code` string, required
      - `message` string, required
      - `i18n` ToastMessageI18n, required
        - `en` string, required
        - `ja` string, required

## Other responses

- `401`: Error response
- `403`: Error response
- `422`: Error response

## Changes

- **2026-09-15** `34eca5aa4001`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sankahq/apis/sanka-public-api/changes/v2/public/workflows/:workflow_id/flow/construct/post.md)

---

[API](https://skmtc.dev/sankahq/apis/sanka-public-api.md) - [All operations](https://skmtc.dev/sankahq/apis/sanka-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sankahq/apis/sanka-public-api/revisions/16f03a9e3ab9?raw)
