---
title: "Plan Public Workflow Template"
method: POST
path: "/v2/public/workflows/templates/plan"
tags: ["workflows"]
---

# Plan Public Workflow Template

`POST /v2/public/workflows/templates/plan`

## Request

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

Review a template without writing a workflow definition.

The request UUID binds immutable input and one plan digest. Reusing that UUID
with changed input conflicts. Existing workflows require their current full
definition digest. Only advertised shared templates can be planned.

## Query parameters

- `workspace_id` string, nullable

## Headers

- `X-Workspace-Code` string

## Request body

- PublicFlowTemplatePlanRequest
  - `request_id` string, uuid, required
  - `template_id` string, required
  - `template_version` integer, required
  - `parameters` object
  - `workflow_id` string, uuid, nullable
  - `expected_definition_digest` string, nullable

## Response `200`

Successful Response

- PlanPublicWorkflowTemplateApiV2PublicWorkflowsTemplatesPlanPost200Envelope
  - `success` true, required
  - `data` PublicFlowPlanData, required
    - `workspace_id` string, uuid, required
    - `request_id` string, uuid, required
    - `workflow_id` string, uuid, nullable
    - `plan_digest` string, required
    - `template_id` string, required
    - `template_version` integer, required
    - `operation` 'create' | 'update', required
    - `applicable` boolean, required
    - `parameters` object, required
    - `changes` PublicFlowFieldChange[]
      - `key` string, required
      - `before` union
        - string
        - integer
        - number
        - boolean
        - string[]
      - `after` union
        - string
        - integer
        - number
        - boolean
        - string[]
    - `conflicts` PublicFlowConflict[]
      - `key` string, required
      - `previous` PublicFlowFieldState, required
        - `present` boolean, required
        - `value` union
          - string
          - integer
          - number
          - boolean
          - string[]
      - `current` PublicFlowFieldState, required
        - `present` boolean, required
        - `value` union
          - string
          - integer
          - number
          - boolean
          - string[]
      - `desired` PublicFlowFieldState, required
        - `present` boolean, required
        - `value` union
          - string
          - integer
          - number
          - boolean
          - string[]
    - `preserved_fields` string[]
    - `blocker_codes` string[]
    - `required_capabilities` string[]
    - `construction` 'inactive'
  - `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/templates/plan/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)
