# Workflows endpoints

> Published workflow templates: list, read, create from a portable template JSON, read the per-workflow field schema. Every operation with parameters, body, responses, errors and examples.

Source: https://developers.processcart.com/reference/workflows

Published workflow templates: list, read, create from a portable template JSON, read the per-workflow field schema.

Base URL `https://app.processcart.com/api/v1`. Every operation below is also in the [OpenAPI document](https://developers.processcart.com/openapi.json) and the [interactive reference](https://developers.processcart.com/reference).

| Operation | Method and path | Scope |
| --- | --- | --- |
| [List workflows](#listWorkflows) | <code class="pc-docs-wrap">GET /v1<wbr>/workflows</code> | Scope `workflows:read` |
| [Create a workflow from a template](#createWorkflow) | <code class="pc-docs-wrap">POST /v1<wbr>/workflows</code> | Scope `workflows:write` |
| [Get a workflow](#getWorkflow) | <code class="pc-docs-wrap">GET /v1<wbr>/workflows<wbr>/{id}</code> | Scope `workflows:read` |
| [Update a workflow's name, description, folder, Key Date field or status](#updateWorkflow) | <code class="pc-docs-wrap">PATCH /v1<wbr>/workflows<wbr>/{id}</code> | Scope `workflows:write` |
| [Get the JSON Schema for a workflow's run bodies](#getWorkflowSchema) | <code class="pc-docs-wrap">GET /v1<wbr>/workflows<wbr>/{id}<wbr>/schema</code> | Scope `workflows:read` |
| [Export a workflow as a portable template](#getWorkflowTemplate) | <code class="pc-docs-wrap">GET /v1<wbr>/workflows<wbr>/{id}<wbr>/template</code> | Scope `workflows:read` |

## GET /v1/workflows
**List workflows.** Scope `workflows:read` · the key's allowlist narrows the rows (never a 403 — rows outside it are absent) · paginated (`{ data, nextCursor, hasMore }`). Operation id `listWorkflows` · [open in the API reference](https://developers.processcart.com/reference#tag/workflows/GET/v1/workflows).

Lists the workflows the key may see (its allowlist is applied; trashed workflows are absent), by name. Each item is the library header: folder, status, the published version, a task count and whether a public kickoff form is live. `updatedSince` turns the list into an incremental sync ordered by `updatedAt` ascending (inclusive).

**Query parameters** (an unknown parameter is a 422 `validation_failed` with `errors[].code = "unknown_parameter"`)

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `updatedSince` | string (date-time) | no | Incremental sync: only items whose `updatedAt` is at or after this instant (inclusive), ordered by `updatedAt` ascending; an explicit conflicting `sort` / `order` is a 422. Overlap by a minute and dedupe: a Run by `(id, revision)`, any other item (workflow, view, webhook, schedule, automation rule) by `(id, updatedAt)` — a higher `revision` or a later `updatedAt` replaces the copy you hold, an equal one is unchanged. |
| `limit` | integer | no |  |
| `cursor` | string | no | The `nextCursor` of the previous page. Opaque, and bound to the query that produced it — a cursor from a different filter or sort is a 422. |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | OK. | [ListWorkflowsResponse](https://developers.processcart.com/reference/schemas#listworkflowsresponse) |
| 401 | No usable credential. `unauthorized` — Authentication required; `invalid_api_key` — Invalid API key; `key_revoked` — API key revoked. | [Problem](https://developers.processcart.com/errors) |
| 403 | `insufficient_scope` — Insufficient scope. | [Problem](https://developers.processcart.com/errors) |
| 405 | The verb is not supported on this path. `method_not_allowed` — Method not allowed. | [Problem](https://developers.processcart.com/errors) |
| 422 | `validation_failed` — Validation failed. | [Problem](https://developers.processcart.com/errors) |
| 429 | `rate_limited` — Too many requests. | [Problem](https://developers.processcart.com/errors) |
| 500 | `internal_error` — Internal error. | [Problem](https://developers.processcart.com/errors) |
| 503 | `unavailable` — Service unavailable. | [Problem](https://developers.processcart.com/errors) |

**Errors** (every code this operation can answer; see [Errors](https://developers.processcart.com/errors))

- 401 [`invalid_api_key`](https://developers.processcart.com/errors#invalid_api_key) — Invalid API key
- 401 [`key_revoked`](https://developers.processcart.com/errors#key_revoked) — API key revoked
- 401 [`unauthorized`](https://developers.processcart.com/errors#unauthorized) — Authentication required
- 403 [`insufficient_scope`](https://developers.processcart.com/errors#insufficient_scope) — Insufficient scope
- 405 [`method_not_allowed`](https://developers.processcart.com/errors#method_not_allowed) — Method not allowed
- 422 [`validation_failed`](https://developers.processcart.com/errors#validation_failed) — Validation failed
- 429 [`rate_limited`](https://developers.processcart.com/errors#rate_limited) — Too many requests
- 500 [`internal_error`](https://developers.processcart.com/errors#internal_error) — Internal error
- 503 [`unavailable`](https://developers.processcart.com/errors#unavailable) — Service unavailable

**Example response** (200)

```json
{
  "data": [
    {
      "id": "791e68d6-2bd9-4c47-a7a7-17eeefddd5e0",
      "name": "Draft only",
      "description": null,
      "status": "active",
      "icon": null,
      "color": null,
      "folder": null,
      "keyDateFieldKey": "ship_date",
      "kickoffFormEnabled": false,
      "publishedVersion": null,
      "taskCount": 4,
      "createdAt": "2026-10-10T17:43:36.934Z",
      "updatedAt": "2026-10-10T17:43:39.132Z"
    },
    {
      "id": "ee70a035-0602-43a6-a8bd-959116312fce",
      "name": "Filed",
      "description": null,
      "status": "active",
      "icon": null,
      "color": null,
      "folder": {
        "id": "bd17f69c-dc2d-4465-81e5-3893b4b95e60",
        "name": "Sales"
      },
      "keyDateFieldKey": "ship_date",
      "kickoffFormEnabled": false,
      "publishedVersion": {
        "id": "fe5cf349-4c95-43b9-abfe-37d375c5c308",
        "number": 1,
        "publishedAt": "2026-10-10T17:43:40.650Z"
      },
      "taskCount": 4,
      "createdAt": "2026-10-10T17:43:40.308Z",
      "updatedAt": "2026-10-10T17:43:40.672Z"
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
```


## POST /v1/workflows
**Create a workflow from a template.** Scope `workflows:write` · accepts `Idempotency-Key`. Operation id `createWorkflow` · [open in the API reference](https://developers.processcart.com/reference#tag/workflows/POST/v1/workflows).

Creates a workflow from a portable template (the same JSON `GET /v1/workflows/{id}/template` returns) and publishes it, so it is runnable at once. Group assignments are matched by name (case-insensitive); person assignees never travel. Everything is validated BEFORE anything is written: a template problem or a publish-gate error is a 422 with every message listed and no workflow is created. `publish: false` leaves a draft. A key restricted to certain workflows cannot create one; a key restricted to folders must file the new workflow into one of them (`folderId`).

**Request headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Makes the request safe to retry: a second request with the same key and a byte-identical body (and the same `Expected-Revision`) replays the stored response (`Idempotent-Replayed: true`); a different body with the same key is refused (422 `idempotency_key_reused`) and no second resource is created. Keys are stored per workspace for 24 hours and replayed only to the API key that made the request (or the key one rotation away from it); another API key sending the same value is refused (422 `idempotency_key_reused`), so prefix keys per integration. 409, 429 and 5xx answers are never stored. |

**Request body** — `application/json`, [CreateWorkflowBody](https://developers.processcart.com/reference/schemas#createworkflowbody)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `template` | [WorkflowTemplate](https://developers.processcart.com/reference/schemas#workflowtemplate) | yes |  |
| `name` | string | no |  |
| `description` | string \\| null | no |  |
| `folderId` | [Uuid](https://developers.processcart.com/reference/schemas#uuid) \\| null | no |  |
| `publish` | boolean | no |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| 201 | Created. `Location` names the new resource. | [CreateWorkflowResponse](https://developers.processcart.com/reference/schemas#createworkflowresponse) |
| 401 | No usable credential. `unauthorized` — Authentication required; `invalid_api_key` — Invalid API key; `key_revoked` — API key revoked. | [Problem](https://developers.processcart.com/errors) |
| 403 | `insufficient_scope` — Insufficient scope; `not_allowed_for_key` — Not allowed for this key; `read_only_key` — Read-only key. | [Problem](https://developers.processcart.com/errors) |
| 405 | The verb is not supported on this path. `method_not_allowed` — Method not allowed. | [Problem](https://developers.processcart.com/errors) |
| 409 | `idempotency_in_progress` — Request in progress. | [Problem](https://developers.processcart.com/errors) |
| 413 | `payload_too_large` — Payload too large. | [Problem](https://developers.processcart.com/errors) |
| 415 | `unsupported_media_type` — Unsupported media type. | [Problem](https://developers.processcart.com/errors) |
| 422 | `idempotency_key_reused` — Idempotency key reused; `validation_failed` — Validation failed. | [Problem](https://developers.processcart.com/errors) |
| 429 | `rate_limited` — Too many requests. | [Problem](https://developers.processcart.com/errors) |
| 500 | `internal_error` — Internal error. | [Problem](https://developers.processcart.com/errors) |
| 503 | `unavailable` — Service unavailable. | [Problem](https://developers.processcart.com/errors) |

**Errors** (every code this operation can answer; see [Errors](https://developers.processcart.com/errors))

- 401 [`invalid_api_key`](https://developers.processcart.com/errors#invalid_api_key) — Invalid API key
- 401 [`key_revoked`](https://developers.processcart.com/errors#key_revoked) — API key revoked
- 401 [`unauthorized`](https://developers.processcart.com/errors#unauthorized) — Authentication required
- 403 [`insufficient_scope`](https://developers.processcart.com/errors#insufficient_scope) — Insufficient scope
- 403 [`not_allowed_for_key`](https://developers.processcart.com/errors#not_allowed_for_key) — Not allowed for this key
- 403 [`read_only_key`](https://developers.processcart.com/errors#read_only_key) — Read-only key
- 405 [`method_not_allowed`](https://developers.processcart.com/errors#method_not_allowed) — Method not allowed
- 409 [`idempotency_in_progress`](https://developers.processcart.com/errors#idempotency_in_progress) — Request in progress
- 413 [`payload_too_large`](https://developers.processcart.com/errors#payload_too_large) — Payload too large
- 415 [`unsupported_media_type`](https://developers.processcart.com/errors#unsupported_media_type) — Unsupported media type
- 422 [`idempotency_key_reused`](https://developers.processcart.com/errors#idempotency_key_reused) — Idempotency key reused
- 422 [`validation_failed`](https://developers.processcart.com/errors#validation_failed) — Validation failed
- 429 [`rate_limited`](https://developers.processcart.com/errors#rate_limited) — Too many requests
- 500 [`internal_error`](https://developers.processcart.com/errors#internal_error) — Internal error
- 503 [`unavailable`](https://developers.processcart.com/errors#unavailable) — Service unavailable

**Example request**

```json
{
  "template": {
    "formatVersion": 1,
    "engineVersion": 1,
    "exportedAt": "2026-10-10T17:43:34.523Z",
    "source": "example-workspace",
    "workflow": {
      "name": "Order fulfillment",
      "keyDateFieldKey": "ship_date",
      "sections": [
        {
          "key": "intake",
          "title": "Intake",
          "defaultVisibility": "visible",
          "tasks": [
            {
              "key": "details",
              "title": "Details",
              "instructions": null,
              "defaultVisibility": "visible",
              "isStop": false,
              "kind": "standard",
              "fields": [
                {
                  "key": "customer",
                  "type": "text",
                  "label": "Customer",
                  "help": null,
                  "required": true,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "none"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": true,
                  "kickoffPosition": 0
                },
                {
                  "key": "order_code",
                  "type": "text",
                  "label": "Order code",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "custom",
                    "regex": "^[A-Z]{2}-\\d{4}$",
                    "errorMessage": "Use AB-1234."
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "memo",
                  "type": "textarea",
                  "label": "Memo",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "quantity",
                  "type": "number",
                  "label": "Quantity",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "number",
                    "decimals": 0,
                    "thousands": true
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "amount",
                  "type": "number",
                  "label": "Amount",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "currency"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": true,
                  "kickoffPosition": 1
                },
                {
                  "key": "fee",
                  "type": "number",
                  "label": "Fee",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "max": 500,
                    "type": "currency"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "rate",
                  "type": "number",
                  "label": "Rate",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "percent"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "rate_text",
                  "type": "text",
                  "label": "Rate (text)",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "percent"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "ship_date",
                  "type": "date",
                  "label": "Ship date",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "date"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "start_time",
                  "type": "time",
                  "label": "Start time",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "time",
                    "hour12": true
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "gift_wrap",
                  "type": "dropdown",
                  "label": "Gift wrap",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": {
                    "choices": [
                      "Yes",
                      "No"
                    ]
                  },
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "tags",
                  "type": "multi_choice",
                  "label": "Tags",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": {
                    "choices": [
                      "A",
                      "B",
                      "C"
                    ]
                  },
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "agree",
                  "type": "checkbox",
                  "label": "Agree",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "contact_email",
                  "type": "email",
                  "label": "Contact email",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "email"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "website",
                  "type": "url",
                  "label": "Website",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "url"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "phone",
                  "type": "phone",
                  "label": "Phone",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "phone"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "owner",
                  "type": "members",
                  "label": "Owner",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "steps",
                  "type": "subtasks",
                  "label": "Steps",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": {
                    "items": [
                      {
                        "key": "photos",
                        "label": "Photos"
                      },
                      {
                        "key": "invoice",
                        "label": "Invoice"
                      }
                    ],
                    "allRequired": false
                  },
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "contract",
                  "type": "file",
                  "label": "Contract",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": {
                    "multiple": true
                  },
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "double_amount",
                  "type": "formula",
                  "label": "Double amount",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": {
                    "type": "currency"
                  },
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": {
                    "expr": "{{amount}} * 2",
                    "mode": "spreadsheet"
                  },
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "source",
                  "type": "hidden",
                  "label": "Source",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "hidden",
                  "options": null,
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": null,
                  "inKickoff": false,
                  "kickoffPosition": null
                },
                {
                  "key": "note",
                  "type": "display_text",
                  "label": "Note",
                  "help": null,
                  "required": false,
                  "defaultVisibility": "visible",
                  "options": null,
                  "formatConfig": null,
                  "validation": null,
                  "defaultValue": null,
                  "onFocusPopulate": null,
                  "formula": null,
                  "content": {
                    "type": "doc",
                    "content": [
                      {
                        "type": "paragraph",
                        "content": [
                          {
                            "text": "Review the details.",
                            "type": "text"
                          }
                        ]
                      }
                    ]
                  },
                  "inKickoff": false,
                  "kickoffPosition": null
                }
              ]
            },
            {
              "key": "review",
              "title": "Review",
              "instructions": null,
              "defaultVisibility": "visible",
              "isStop": false,
              "kind": "approval",
              "approvalConfig": {
                "summaryFieldKeys": [
                  "amount"
                ],
                "rejectReopensTaskKeys": [
                  "details"
                ]
              },
              "fields": []
            },
            {
              "key": "stop",
              "title": "Sign-off",
              "instructions": null,
              "defaultVisibility": "visible",
              "isStop": true,
              "kind": "standard",
              "fields": []
            },
            {
              "key": "wrapup",
              "title": "Wrap up",
              "instructions": null,
              "defaultVisibility": "visible",
              "isStop": false,
              "kind": "standard",
              "fields": []
            }
          ]
        }
      ],
      "rules": []
    }
  },
  "name": "Zeta intake",
  "description": "From the API."
}
```

**Example response** (201)

```json
{
  "id": "8b8b4bb9-e062-4a5b-ba75-a3564da9e606",
  "name": "Zeta intake",
  "description": "From the API.",
  "status": "active",
  "icon": null,
  "color": null,
  "folder": null,
  "keyDateFieldKey": "ship_date",
  "kickoffFormEnabled": false,
  "publishedVersion": {
    "id": "2f84d122-4c0f-4be5-910d-43a117e05c4a",
    "number": 1,
    "publishedAt": "2026-10-10T17:43:35.785Z"
  },
  "taskCount": 4,
  "createdAt": "2026-10-10T17:43:35.602Z",
  "updatedAt": "2026-10-10T17:43:35.866Z",
  "sections": [
    {
      "key": "intake",
      "title": "Intake",
      "defaultVisibility": "visible",
      "tasks": [
        {
          "key": "details",
          "title": "Details",
          "kind": "standard",
          "isStop": false,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": [
            {
              "key": "customer",
              "type": "text",
              "label": "Customer",
              "help": null,
              "required": true,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "none"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": true,
              "kickoffPosition": 0,
              "readOnly": false
            },
            {
              "key": "order_code",
              "type": "text",
              "label": "Order code",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "custom",
                "regex": "^[A-Z]{2}-\\d{4}$",
                "errorMessage": "Use AB-1234."
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "memo",
              "type": "textarea",
              "label": "Memo",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "quantity",
              "type": "number",
              "label": "Quantity",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "number",
                "decimals": 0,
                "thousands": true
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "amount",
              "type": "number",
              "label": "Amount",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "currency"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": true,
              "kickoffPosition": 1,
              "readOnly": false
            },
            {
              "key": "fee",
              "type": "number",
              "label": "Fee",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "max": 500,
                "type": "currency"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "rate",
              "type": "number",
              "label": "Rate",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "percent"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "rate_text",
              "type": "text",
              "label": "Rate (text)",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "percent"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "ship_date",
              "type": "date",
              "label": "Ship date",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "date"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "start_time",
              "type": "time",
              "label": "Start time",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "time",
                "hour12": true
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "gift_wrap",
              "type": "dropdown",
              "label": "Gift wrap",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "choices": [
                  "Yes",
                  "No"
                ]
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "tags",
              "type": "multi_choice",
              "label": "Tags",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "choices": [
                  "A",
                  "B",
                  "C"
                ]
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "agree",
              "type": "checkbox",
              "label": "Agree",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "contact_email",
              "type": "email",
              "label": "Contact email",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "email"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "website",
              "type": "url",
              "label": "Website",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "url"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "phone",
              "type": "phone",
              "label": "Phone",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "phone"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "owner",
              "type": "members",
              "label": "Owner",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "steps",
              "type": "subtasks",
              "label": "Steps",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "items": [
                  {
                    "key": "photos",
                    "label": "Photos"
                  },
                  {
                    "key": "invoice",
                    "label": "Invoice"
                  }
                ],
                "allRequired": false
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "contract",
              "type": "file",
              "label": "Contract",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "multiple": true
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": true
            },
            {
              "key": "double_amount",
              "type": "formula",
              "label": "Double amount",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "currency"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": {
                "expr": "{{amount}} * 2",
                "mode": "spreadsheet"
              },
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": true
            },
            {
              "key": "source",
              "type": "hidden",
              "label": "Source",
              "help": null,
              "required": false,
              "defaultVisibility": "hidden",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "note",
              "type": "display_text",
              "label": "Note",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": true
            }
          ]
        },
        {
          "key": "review",
          "title": "Review",
          "kind": "approval",
          "isStop": false,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": []
        },
        {
          "key": "stop",
          "title": "Sign-off",
          "kind": "standard",
          "isStop": true,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": []
        },
        {
          "key": "wrapup",
          "title": "Wrap up",
          "kind": "standard",
          "isStop": false,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": []
        }
      ]
    }
  ],
  "rules": [],
  "import": {
    "errors": [],
    "warnings": [],
    "counts": {
      "sections": 1,
      "tasks": 4,
      "fields": 22,
      "rules": 0
    },
    "clearedAssignments": 0,
    "flaggedEmails": []
  },
  "publishWarnings": [
    "\"Source\" (source) has no formula yet."
  ]
}
```


## GET /v1/workflows/{id}
**Get a workflow.** Scope `workflows:read` · checked against the key's workflow / folder allowlist (403 `not_allowed_for_key` outside it). Operation id `getWorkflow` · [open in the API reference](https://developers.processcart.com/reference#tag/workflows/GET/v1/workflows/{id}).

The workflow's header plus its PUBLISHED version's sections, tasks, fields and rules — enough to know every task key and field key a run will carry. An unpublished workflow answers with `publishedVersion: null` and no sections; a workflow in Trash is a 404.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | OK. | [WorkflowDetail](https://developers.processcart.com/reference/schemas#workflowdetail) |
| 401 | No usable credential. `unauthorized` — Authentication required; `invalid_api_key` — Invalid API key; `key_revoked` — API key revoked. | [Problem](https://developers.processcart.com/errors) |
| 403 | `insufficient_scope` — Insufficient scope; `not_allowed_for_key` — Not allowed for this key. | [Problem](https://developers.processcart.com/errors) |
| 404 | `not_found` — Not found. | [Problem](https://developers.processcart.com/errors) |
| 405 | The verb is not supported on this path. `method_not_allowed` — Method not allowed. | [Problem](https://developers.processcart.com/errors) |
| 422 | `validation_failed` — Validation failed. | [Problem](https://developers.processcart.com/errors) |
| 429 | `rate_limited` — Too many requests. | [Problem](https://developers.processcart.com/errors) |
| 500 | `internal_error` — Internal error. | [Problem](https://developers.processcart.com/errors) |
| 503 | `unavailable` — Service unavailable. | [Problem](https://developers.processcart.com/errors) |

**Errors** (every code this operation can answer; see [Errors](https://developers.processcart.com/errors))

- 401 [`invalid_api_key`](https://developers.processcart.com/errors#invalid_api_key) — Invalid API key
- 401 [`key_revoked`](https://developers.processcart.com/errors#key_revoked) — API key revoked
- 401 [`unauthorized`](https://developers.processcart.com/errors#unauthorized) — Authentication required
- 403 [`insufficient_scope`](https://developers.processcart.com/errors#insufficient_scope) — Insufficient scope
- 403 [`not_allowed_for_key`](https://developers.processcart.com/errors#not_allowed_for_key) — Not allowed for this key
- 404 [`not_found`](https://developers.processcart.com/errors#not_found) — Not found
- 405 [`method_not_allowed`](https://developers.processcart.com/errors#method_not_allowed) — Method not allowed
- 422 [`validation_failed`](https://developers.processcart.com/errors#validation_failed) — Validation failed
- 429 [`rate_limited`](https://developers.processcart.com/errors#rate_limited) — Too many requests
- 500 [`internal_error`](https://developers.processcart.com/errors#internal_error) — Internal error
- 503 [`unavailable`](https://developers.processcart.com/errors#unavailable) — Service unavailable

**Example response** (200)

```json
{
  "id": "86504e07-177b-45a5-aad7-843ca07111b9",
  "name": "Order fulfillment",
  "description": "Every field type.",
  "status": "active",
  "icon": null,
  "color": null,
  "folder": {
    "id": "bd17f69c-dc2d-4465-81e5-3893b4b95e60",
    "name": "Sales"
  },
  "keyDateFieldKey": "ship_date",
  "kickoffFormEnabled": false,
  "publishedVersion": {
    "id": "c32e30ba-e3ff-4df8-88f6-cd5a15bd0e8b",
    "number": 1,
    "publishedAt": "2026-10-10T17:43:32.943Z"
  },
  "taskCount": 4,
  "createdAt": "2026-10-10T17:43:33.192Z",
  "updatedAt": "2026-10-10T17:43:33.303Z",
  "sections": [
    {
      "key": "intake",
      "title": "Intake",
      "defaultVisibility": "visible",
      "tasks": [
        {
          "key": "details",
          "title": "Details",
          "kind": "standard",
          "isStop": false,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": [
            {
              "key": "customer",
              "type": "text",
              "label": "Customer",
              "help": null,
              "required": true,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "none"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": true,
              "kickoffPosition": 0,
              "readOnly": false
            },
            {
              "key": "order_code",
              "type": "text",
              "label": "Order code",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "custom",
                "regex": "^[A-Z]{2}-\\d{4}$",
                "errorMessage": "Use AB-1234."
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "memo",
              "type": "textarea",
              "label": "Memo",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "quantity",
              "type": "number",
              "label": "Quantity",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "number",
                "decimals": 0,
                "thousands": true
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "amount",
              "type": "number",
              "label": "Amount",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "currency"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": true,
              "kickoffPosition": 1,
              "readOnly": false
            },
            {
              "key": "fee",
              "type": "number",
              "label": "Fee",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "max": 500,
                "type": "currency"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "rate",
              "type": "number",
              "label": "Rate",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "percent"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "rate_text",
              "type": "text",
              "label": "Rate (text)",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "percent"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "ship_date",
              "type": "date",
              "label": "Ship date",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "date"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "start_time",
              "type": "time",
              "label": "Start time",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "time",
                "hour12": true
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "gift_wrap",
              "type": "dropdown",
              "label": "Gift wrap",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "choices": [
                  "Yes",
                  "No"
                ]
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "tags",
              "type": "multi_choice",
              "label": "Tags",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "choices": [
                  "A",
                  "B",
                  "C"
                ]
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "agree",
              "type": "checkbox",
              "label": "Agree",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "contact_email",
              "type": "email",
              "label": "Contact email",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "email"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "website",
              "type": "url",
              "label": "Website",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "url"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "phone",
              "type": "phone",
              "label": "Phone",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "phone"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "owner",
              "type": "members",
              "label": "Owner",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "steps",
              "type": "subtasks",
              "label": "Steps",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "items": [
                  {
                    "key": "photos",
                    "label": "Photos"
                  },
                  {
                    "key": "invoice",
                    "label": "Invoice"
                  }
                ],
                "allRequired": false
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "contract",
              "type": "file",
              "label": "Contract",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": {
                "multiple": true
              },
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": true
            },
            {
              "key": "double_amount",
              "type": "formula",
              "label": "Double amount",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": {
                "type": "currency"
              },
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": {
                "expr": "{{amount}} * 2",
                "mode": "spreadsheet"
              },
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": true
            },
            {
              "key": "source",
              "type": "hidden",
              "label": "Source",
              "help": null,
              "required": false,
              "defaultVisibility": "hidden",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": false
            },
            {
              "key": "note",
              "type": "display_text",
              "label": "Note",
              "help": null,
              "required": false,
              "defaultVisibility": "visible",
              "options": null,
              "formatConfig": null,
              "validation": null,
              "defaultValue": null,
              "onFocusPopulate": null,
              "formula": null,
              "inKickoff": false,
              "kickoffPosition": null,
              "readOnly": true
            }
          ]
        },
        {
          "key": "review",
          "title": "Review",
          "kind": "approval",
          "isStop": false,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": {
            "assignees": [
              {
                "kind": "user",
                "userId": "b956f9b0-baa5-48f8-8004-9a80daa37d8a"
              }
            ]
          },
          "guestConfig": null,
          "fields": []
        },
        {
          "key": "stop",
          "title": "Sign-off",
          "kind": "standard",
          "isStop": true,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": []
        },
        {
          "key": "wrapup",
          "title": "Wrap up",
          "kind": "standard",
          "isStop": false,
          "defaultVisibility": "visible",
          "dueRule": null,
          "assignment": null,
          "guestConfig": null,
          "fields": []
        }
      ]
    }
  ],
  "rules": []
}
```


## PATCH /v1/workflows/{id}
**Update a workflow's name, description, folder, Key Date field or status.** Scope `workflows:write` · checked against the key's workflow / folder allowlist (403 `not_allowed_for_key` outside it) · accepts `Idempotency-Key`. Operation id `updateWorkflow` · [open in the API reference](https://developers.processcart.com/reference#tag/workflows/PATCH/v1/workflows/{id}).

Changes workflow-level settings (never the published tree — that is the builder's job). `keyDateFieldKey` must name a date-typed field of the published version (of the draft while the workflow has never been published) and re-derives every live run's Key Date. `status: "archived"` hides the workflow from the Run menu. A key restricted to folders may only move the workflow within those folders.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes |  |

**Request headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Makes the request safe to retry: a second request with the same key and a byte-identical body (and the same `Expected-Revision`) replays the stored response (`Idempotent-Replayed: true`); a different body with the same key is refused (422 `idempotency_key_reused`) and no second resource is created. Keys are stored per workspace for 24 hours and replayed only to the API key that made the request (or the key one rotation away from it); another API key sending the same value is refused (422 `idempotency_key_reused`), so prefix keys per integration. 409, 429 and 5xx answers are never stored. |

**Request body** — `application/json`, [UpdateWorkflowBody](https://developers.processcart.com/reference/schemas#updateworkflowbody)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | no |  |
| `description` | string \\| null | no |  |
| `folderId` | [Uuid](https://developers.processcart.com/reference/schemas#uuid) \\| null | no |  |
| `keyDateFieldKey` | [FieldKey](https://developers.processcart.com/reference/schemas#fieldkey) \\| null | no |  |
| `status` | `"active"` \\| `"archived"` | no |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | OK. | [WorkflowSummary](https://developers.processcart.com/reference/schemas#workflowsummary) |
| 401 | No usable credential. `unauthorized` — Authentication required; `invalid_api_key` — Invalid API key; `key_revoked` — API key revoked. | [Problem](https://developers.processcart.com/errors) |
| 403 | `insufficient_scope` — Insufficient scope; `not_allowed_for_key` — Not allowed for this key; `read_only_key` — Read-only key. | [Problem](https://developers.processcart.com/errors) |
| 404 | `not_found` — Not found. | [Problem](https://developers.processcart.com/errors) |
| 405 | The verb is not supported on this path. `method_not_allowed` — Method not allowed. | [Problem](https://developers.processcart.com/errors) |
| 409 | `idempotency_in_progress` — Request in progress. | [Problem](https://developers.processcart.com/errors) |
| 413 | `payload_too_large` — Payload too large. | [Problem](https://developers.processcart.com/errors) |
| 415 | `unsupported_media_type` — Unsupported media type. | [Problem](https://developers.processcart.com/errors) |
| 422 | `idempotency_key_reused` — Idempotency key reused; `validation_failed` — Validation failed. | [Problem](https://developers.processcart.com/errors) |
| 429 | `rate_limited` — Too many requests. | [Problem](https://developers.processcart.com/errors) |
| 500 | `internal_error` — Internal error. | [Problem](https://developers.processcart.com/errors) |
| 503 | `unavailable` — Service unavailable. | [Problem](https://developers.processcart.com/errors) |

**Errors** (every code this operation can answer; see [Errors](https://developers.processcart.com/errors))

- 401 [`invalid_api_key`](https://developers.processcart.com/errors#invalid_api_key) — Invalid API key
- 401 [`key_revoked`](https://developers.processcart.com/errors#key_revoked) — API key revoked
- 401 [`unauthorized`](https://developers.processcart.com/errors#unauthorized) — Authentication required
- 403 [`insufficient_scope`](https://developers.processcart.com/errors#insufficient_scope) — Insufficient scope
- 403 [`not_allowed_for_key`](https://developers.processcart.com/errors#not_allowed_for_key) — Not allowed for this key
- 403 [`read_only_key`](https://developers.processcart.com/errors#read_only_key) — Read-only key
- 404 [`not_found`](https://developers.processcart.com/errors#not_found) — Not found
- 405 [`method_not_allowed`](https://developers.processcart.com/errors#method_not_allowed) — Method not allowed
- 409 [`idempotency_in_progress`](https://developers.processcart.com/errors#idempotency_in_progress) — Request in progress
- 413 [`payload_too_large`](https://developers.processcart.com/errors#payload_too_large) — Payload too large
- 415 [`unsupported_media_type`](https://developers.processcart.com/errors#unsupported_media_type) — Unsupported media type
- 422 [`idempotency_key_reused`](https://developers.processcart.com/errors#idempotency_key_reused) — Idempotency key reused
- 422 [`validation_failed`](https://developers.processcart.com/errors#validation_failed) — Validation failed
- 429 [`rate_limited`](https://developers.processcart.com/errors#rate_limited) — Too many requests
- 500 [`internal_error`](https://developers.processcart.com/errors#internal_error) — Internal error
- 503 [`unavailable`](https://developers.processcart.com/errors#unavailable) — Service unavailable

**Example request**

```json
{
  "name": "Zeta intake (renamed)",
  "status": "archived",
  "folderId": "bd17f69c-dc2d-4465-81e5-3893b4b95e60"
}
```

**Example response** (200)

```json
{
  "id": "8b8b4bb9-e062-4a5b-ba75-a3564da9e606",
  "name": "Zeta intake (renamed)",
  "description": null,
  "status": "archived",
  "icon": null,
  "color": null,
  "folder": {
    "id": "bd17f69c-dc2d-4465-81e5-3893b4b95e60",
    "name": "Sales"
  },
  "keyDateFieldKey": null,
  "kickoffFormEnabled": false,
  "publishedVersion": {
    "id": "2f84d122-4c0f-4be5-910d-43a117e05c4a",
    "number": 1,
    "publishedAt": "2026-10-10T17:43:35.785Z"
  },
  "taskCount": 4,
  "createdAt": "2026-10-10T17:43:35.602Z",
  "updatedAt": "2026-10-10T17:43:46.881Z"
}
```


## GET /v1/workflows/{id}/schema
**Get the JSON Schema for a workflow's run bodies.** Scope `workflows:read` · checked against the key's workflow / folder allowlist (403 `not_allowed_for_key` outside it). Operation id `getWorkflowSchema` · [open in the API reference](https://developers.processcart.com/reference#tag/workflows/GET/v1/workflows/{id}/schema).

Two JSON Schema (2020-12) documents generated from the published version: `start` describes the `POST /v1/runs` body (every writable field, with `required` naming the kickoff fields no rule can hide) and `fields` the `PATCH /v1/runs/{id}/fields` body. Each property carries the field's type and format (`x-processcart-type`, `x-processcart-format`), its choices as `enum`, bounds, and the task and section it belongs to. Hidden fields are writable but never shown. Unpublished workflows have no schema (409).

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | OK. | [GetWorkflowSchemaResponse](https://developers.processcart.com/reference/schemas#getworkflowschemaresponse) |
| 401 | No usable credential. `unauthorized` — Authentication required; `invalid_api_key` — Invalid API key; `key_revoked` — API key revoked. | [Problem](https://developers.processcart.com/errors) |
| 403 | `insufficient_scope` — Insufficient scope; `not_allowed_for_key` — Not allowed for this key. | [Problem](https://developers.processcart.com/errors) |
| 404 | `not_found` — Not found. | [Problem](https://developers.processcart.com/errors) |
| 405 | The verb is not supported on this path. `method_not_allowed` — Method not allowed. | [Problem](https://developers.processcart.com/errors) |
| 409 | `workflow_not_published` — Workflow not published. | [Problem](https://developers.processcart.com/errors) |
| 422 | `validation_failed` — Validation failed. | [Problem](https://developers.processcart.com/errors) |
| 429 | `rate_limited` — Too many requests. | [Problem](https://developers.processcart.com/errors) |
| 500 | `internal_error` — Internal error. | [Problem](https://developers.processcart.com/errors) |
| 503 | `unavailable` — Service unavailable. | [Problem](https://developers.processcart.com/errors) |

**Errors** (every code this operation can answer; see [Errors](https://developers.processcart.com/errors))

- 401 [`invalid_api_key`](https://developers.processcart.com/errors#invalid_api_key) — Invalid API key
- 401 [`key_revoked`](https://developers.processcart.com/errors#key_revoked) — API key revoked
- 401 [`unauthorized`](https://developers.processcart.com/errors#unauthorized) — Authentication required
- 403 [`insufficient_scope`](https://developers.processcart.com/errors#insufficient_scope) — Insufficient scope
- 403 [`not_allowed_for_key`](https://developers.processcart.com/errors#not_allowed_for_key) — Not allowed for this key
- 404 [`not_found`](https://developers.processcart.com/errors#not_found) — Not found
- 405 [`method_not_allowed`](https://developers.processcart.com/errors#method_not_allowed) — Method not allowed
- 409 [`workflow_not_published`](https://developers.processcart.com/errors#workflow_not_published) — Workflow not published
- 422 [`validation_failed`](https://developers.processcart.com/errors#validation_failed) — Validation failed
- 429 [`rate_limited`](https://developers.processcart.com/errors#rate_limited) — Too many requests
- 500 [`internal_error`](https://developers.processcart.com/errors#internal_error) — Internal error
- 503 [`unavailable`](https://developers.processcart.com/errors#unavailable) — Service unavailable

**Example response** (200)

```json
{
  "workflowId": "86504e07-177b-45a5-aad7-843ca07111b9",
  "versionId": "c32e30ba-e3ff-4df8-88f6-cd5a15bd0e8b",
  "versionNumber": 1,
  "start": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Start a run",
    "type": "object",
    "properties": {
      "workflowId": {
        "type": "string",
        "format": "uuid"
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 300
      },
      "fields": {
        "type": "object",
        "properties": {
          "customer": {
            "title": "Customer",
            "type": "string",
            "x-processcart-type": "text",
            "x-processcart-format": "none",
            "x-task": "details",
            "x-section": "intake",
            "description": "null (or an empty string) clears the field."
          },
          "order_code": {
            "title": "Order code",
            "type": [
              "string",
              "null"
            ],
            "pattern": "^[A-Z]{2}-\\d{4}$",
            "x-processcart-type": "text",
            "x-processcart-format": "custom",
            "x-task": "details",
            "x-section": "intake",
            "description": "Use AB-1234. null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "memo": {
            "title": "Memo",
            "type": [
              "string",
              "null"
            ],
            "x-processcart-type": "textarea",
            "x-task": "details",
            "x-section": "intake",
            "description": "null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "quantity": {
            "title": "Quantity",
            "type": [
              "number",
              "string",
              "null"
            ],
            "x-processcart-type": "number",
            "x-processcart-format": "number",
            "x-task": "details",
            "x-section": "intake",
            "description": "A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "amount": {
            "title": "Amount",
            "type": [
              "number",
              "string",
              "null"
            ],
            "x-processcart-type": "number",
            "x-processcart-format": "currency",
            "x-task": "details",
            "x-section": "intake",
            "description": "Whole currency units (1700.5 = $1,700.50). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field."
          },
          "fee": {
            "title": "Fee",
            "type": [
              "number",
              "string",
              "null"
            ],
            "maximum": 500,
            "x-processcart-type": "number",
            "x-processcart-format": "currency",
            "x-task": "details",
            "x-section": "intake",
            "description": "Whole currency units (1700.5 = $1,700.50). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "rate": {
            "title": "Rate",
            "type": [
              "number",
              "string",
              "null"
            ],
            "x-processcart-type": "number",
            "x-processcart-format": "percent",
            "x-task": "details",
            "x-section": "intake",
            "description": "A fraction: 0.125 means 12.5 % (bounds are fractions too). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "rate_text": {
            "title": "Rate (text)",
            "type": [
              "number",
              "string",
              "null"
            ],
            "x-processcart-type": "text",
            "x-processcart-format": "percent",
            "x-task": "details",
            "x-section": "intake",
            "description": "A fraction: 0.125 means 12.5 % (bounds are fractions too). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "ship_date": {
            "title": "Ship date",
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "x-processcart-type": "date",
            "x-processcart-format": "date",
            "x-task": "details",
            "x-section": "intake",
            "description": "Any common date spelling is accepted and normalized to YYYY-MM-DD. null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "start_time": {
            "title": "Start time",
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\d{2}:\\d{2}$",
            "x-processcart-type": "time",
            "x-processcart-format": "time",
            "x-task": "details",
            "x-section": "intake",
            "description": "\"2:30 PM\" is accepted and normalized to 24-hour HH:mm. null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "gift_wrap": {
            "title": "Gift wrap",
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Yes",
              "No",
              null
            ],
            "x-processcart-type": "dropdown",
            "x-task": "details",
            "x-section": "intake",
            "description": "null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "tags": {
            "title": "Tags",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C"
              ]
            },
            "uniqueItems": true,
            "x-processcart-type": "multi_choice",
            "x-task": "details",
            "x-section": "intake",
            "description": "null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "agree": {
            "title": "Agree",
            "type": "boolean",
            "x-processcart-type": "checkbox",
            "x-task": "details",
            "x-section": "intake",
            "description": "false clears; a never-set checkbox reads false. Not a kickoff field; may still be set at start."
          },
          "contact_email": {
            "title": "Contact email",
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "x-processcart-type": "email",
            "x-processcart-format": "email",
            "x-task": "details",
            "x-section": "intake",
            "description": "Lowercased on write. null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "website": {
            "title": "Website",
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "x-processcart-type": "url",
            "x-processcart-format": "url",
            "x-task": "details",
            "x-section": "intake",
            "description": "http(s) only; normalized by the URL parser (a missing scheme is added). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "phone": {
            "title": "Phone",
            "type": [
              "string",
              "null"
            ],
            "pattern": "^\\+\\d{8,15}$",
            "x-processcart-type": "phone",
            "x-processcart-format": "phone",
            "x-task": "details",
            "x-section": "intake",
            "description": "E.164 (US numbers are normalized from any common spelling). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "owner": {
            "title": "Owner",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "uniqueItems": true,
            "x-processcart-type": "members",
            "x-task": "details",
            "x-section": "intake",
            "description": "User ids of current members (GET /v1/users). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "steps": {
            "title": "Steps",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "enum": [
                "photos",
                "invoice"
              ]
            },
            "uniqueItems": true,
            "x-processcart-type": "subtasks",
            "x-task": "details",
            "x-section": "intake",
            "description": "Items: photos = Photos; invoice = Invoice. null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          },
          "source": {
            "title": "Source",
            "type": [
              "string",
              "number",
              "boolean",
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "readOnly": false,
            "x-processcart-type": "hidden",
            "x-task": "details",
            "x-section": "intake",
            "description": "A hidden run variable: not shown in the app, not secret. Writable through the API (no formula computes it). null (or an empty string) clears the field. Not a kickoff field; may still be set at start."
          }
        },
        "additionalProperties": false,
        "propertyNames": {
          "pattern": "^[a-z][a-z0-9_]*$",
          "maxLength": 80
        },
        "required": [
          "customer"
        ]
      },
      "priority": {
        "type": "string",
        "enum": [
          "none",
          "low",
          "medium",
          "high",
          "urgent"
        ]
      },
      "labels": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "maxItems": 50,
        "description": "Status-label ids from the org's label set."
      },
      "dueAt": {
        "type": [
          "string",
          "null"
        ],
        "description": "An ISO 8601 instant, or a YYYY-MM-DD date (end of that day in the org's time zone)."
      }
    },
    "required": [
      "workflowId",
      "name",
      "fields"
    ],
    "additionalProperties": false
  },
  "fields": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Set field values",
    "type": "object",
    "properties": {
      "customer": {
        "title": "Customer",
        "type": [
          "string",
          "null"
        ],
        "x-processcart-type": "text",
        "x-processcart-format": "none",
        "x-task": "details",
        "x-section": "intake",
        "description": "null (or an empty string) clears the field."
      },
      "order_code": {
        "title": "Order code",
        "type": [
          "string",
          "null"
        ],
        "pattern": "^[A-Z]{2}-\\d{4}$",
        "x-processcart-type": "text",
        "x-processcart-format": "custom",
        "x-task": "details",
        "x-section": "intake",
        "description": "Use AB-1234. null (or an empty string) clears the field."
      },
      "memo": {
        "title": "Memo",
        "type": [
          "string",
          "null"
        ],
        "x-processcart-type": "textarea",
        "x-task": "details",
        "x-section": "intake",
        "description": "null (or an empty string) clears the field."
      },
      "quantity": {
        "title": "Quantity",
        "type": [
          "number",
          "string",
          "null"
        ],
        "x-processcart-type": "number",
        "x-processcart-format": "number",
        "x-task": "details",
        "x-section": "intake",
        "description": "A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field."
      },
      "amount": {
        "title": "Amount",
        "type": [
          "number",
          "string",
          "null"
        ],
        "x-processcart-type": "number",
        "x-processcart-format": "currency",
        "x-task": "details",
        "x-section": "intake",
        "description": "Whole currency units (1700.5 = $1,700.50). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field."
      },
      "fee": {
        "title": "Fee",
        "type": [
          "number",
          "string",
          "null"
        ],
        "maximum": 500,
        "x-processcart-type": "number",
        "x-processcart-format": "currency",
        "x-task": "details",
        "x-section": "intake",
        "description": "Whole currency units (1700.5 = $1,700.50). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field."
      },
      "rate": {
        "title": "Rate",
        "type": [
          "number",
          "string",
          "null"
        ],
        "x-processcart-type": "number",
        "x-processcart-format": "percent",
        "x-task": "details",
        "x-section": "intake",
        "description": "A fraction: 0.125 means 12.5 % (bounds are fractions too). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field."
      },
      "rate_text": {
        "title": "Rate (text)",
        "type": [
          "number",
          "string",
          "null"
        ],
        "x-processcart-type": "text",
        "x-processcart-format": "percent",
        "x-task": "details",
        "x-section": "intake",
        "description": "A fraction: 0.125 means 12.5 % (bounds are fractions too). A JSON number is the canonical value; a string is parsed by the field's format (a comma is a thousands separator). null (or an empty string) clears the field."
      },
      "ship_date": {
        "title": "Ship date",
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
        "x-processcart-type": "date",
        "x-processcart-format": "date",
        "x-task": "details",
        "x-section": "intake",
        "description": "Any common date spelling is accepted and normalized to YYYY-MM-DD. null (or an empty string) clears the field."
      },
      "start_time": {
        "title": "Start time",
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\d{2}:\\d{2}$",
        "x-processcart-type": "time",
        "x-processcart-format": "time",
        "x-task": "details",
        "x-section": "intake",
        "description": "\"2:30 PM\" is accepted and normalized to 24-hour HH:mm. null (or an empty string) clears the field."
      },
      "gift_wrap": {
        "title": "Gift wrap",
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "Yes",
          "No",
          null
        ],
        "x-processcart-type": "dropdown",
        "x-task": "details",
        "x-section": "intake",
        "description": "null (or an empty string) clears the field."
      },
      "tags": {
        "title": "Tags",
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": "string",
          "enum": [
            "A",
            "B",
            "C"
          ]
        },
        "uniqueItems": true,
        "x-processcart-type": "multi_choice",
        "x-task": "details",
        "x-section": "intake",
        "description": "null (or an empty string) clears the field."
      },
      "agree": {
        "title": "Agree",
        "type": "boolean",
        "x-processcart-type": "checkbox",
        "x-task": "details",
        "x-section": "intake",
        "description": "false clears; a never-set checkbox reads false."
      },
      "contact_email": {
        "title": "Contact email",
        "type": [
          "string",
          "null"
        ],
        "format": "email",
        "x-processcart-type": "email",
        "x-processcart-format": "email",
        "x-task": "details",
        "x-section": "intake",
        "description": "Lowercased on write. null (or an empty string) clears the field."
      },
      "website": {
        "title": "Website",
        "type": [
          "string",
          "null"
        ],
        "format": "uri",
        "x-processcart-type": "url",
        "x-processcart-format": "url",
        "x-task": "details",
        "x-section": "intake",
        "description": "http(s) only; normalized by the URL parser (a missing scheme is added). null (or an empty string) clears the field."
      },
      "phone": {
        "title": "Phone",
        "type": [
          "string",
          "null"
        ],
        "pattern": "^\\+\\d{8,15}$",
        "x-processcart-type": "phone",
        "x-processcart-format": "phone",
        "x-task": "details",
        "x-section": "intake",
        "description": "E.164 (US numbers are normalized from any common spelling). null (or an empty string) clears the field."
      },
      "owner": {
        "title": "Owner",
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": "string",
          "format": "uuid"
        },
        "uniqueItems": true,
        "x-processcart-type": "members",
        "x-task": "details",
        "x-section": "intake",
        "description": "User ids of current members (GET /v1/users). null (or an empty string) clears the field."
      },
      "steps": {
        "title": "Steps",
        "type": [
          "array",
          "null"
        ],
        "items": {
          "type": "string",
          "enum": [
            "photos",
            "invoice"
          ]
        },
        "uniqueItems": true,
        "x-processcart-type": "subtasks",
        "x-task": "details",
        "x-section": "intake",
        "description": "Items: photos = Photos; invoice = Invoice. null (or an empty string) clears the field."
      },
      "source": {
        "title": "Source",
        "type": [
          "string",
          "number",
          "boolean",
          "array",
          "null"
        ],
        "items": {
          "type": "string"
        },
        "readOnly": false,
        "x-processcart-type": "hidden",
        "x-task": "details",
        "x-section": "intake",
        "description": "A hidden run variable: not shown in the app, not secret. Writable through the API (no formula computes it). null (or an empty string) clears the field."
      }
    },
    "additionalProperties": false,
    "propertyNames": {
      "pattern": "^[a-z][a-z0-9_]*$",
      "maxLength": 80
    },
    "minProperties": 1,
    "maxProperties": 200
  }
}
```


## GET /v1/workflows/{id}/template
**Export a workflow as a portable template.** Scope `workflows:read` · checked against the key's workflow / folder allowlist (403 `not_allowed_for_key` outside it). Operation id `getWorkflowTemplate` · [open in the API reference](https://developers.processcart.com/reference#tag/workflows/GET/v1/workflows/{id}/template).

The published version as a portable template JSON: sections, tasks, fields, rules, due rules and assignments by group / role name — no ids, no people, no workspace settings. Feed it to `POST /v1/workflows` here or in another workspace, or keep it in version control. `exportedAt` is stamped now; `source` is the workspace slug.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes |  |

**Responses**

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | OK. | [WorkflowTemplate](https://developers.processcart.com/reference/schemas#workflowtemplate) |
| 401 | No usable credential. `unauthorized` — Authentication required; `invalid_api_key` — Invalid API key; `key_revoked` — API key revoked. | [Problem](https://developers.processcart.com/errors) |
| 403 | `insufficient_scope` — Insufficient scope; `not_allowed_for_key` — Not allowed for this key. | [Problem](https://developers.processcart.com/errors) |
| 404 | `not_found` — Not found. | [Problem](https://developers.processcart.com/errors) |
| 405 | The verb is not supported on this path. `method_not_allowed` — Method not allowed. | [Problem](https://developers.processcart.com/errors) |
| 409 | `workflow_not_published` — Workflow not published. | [Problem](https://developers.processcart.com/errors) |
| 422 | `validation_failed` — Validation failed. | [Problem](https://developers.processcart.com/errors) |
| 429 | `rate_limited` — Too many requests. | [Problem](https://developers.processcart.com/errors) |
| 500 | `internal_error` — Internal error. | [Problem](https://developers.processcart.com/errors) |
| 503 | `unavailable` — Service unavailable. | [Problem](https://developers.processcart.com/errors) |

**Errors** (every code this operation can answer; see [Errors](https://developers.processcart.com/errors))

- 401 [`invalid_api_key`](https://developers.processcart.com/errors#invalid_api_key) — Invalid API key
- 401 [`key_revoked`](https://developers.processcart.com/errors#key_revoked) — API key revoked
- 401 [`unauthorized`](https://developers.processcart.com/errors#unauthorized) — Authentication required
- 403 [`insufficient_scope`](https://developers.processcart.com/errors#insufficient_scope) — Insufficient scope
- 403 [`not_allowed_for_key`](https://developers.processcart.com/errors#not_allowed_for_key) — Not allowed for this key
- 404 [`not_found`](https://developers.processcart.com/errors#not_found) — Not found
- 405 [`method_not_allowed`](https://developers.processcart.com/errors#method_not_allowed) — Method not allowed
- 409 [`workflow_not_published`](https://developers.processcart.com/errors#workflow_not_published) — Workflow not published
- 422 [`validation_failed`](https://developers.processcart.com/errors#validation_failed) — Validation failed
- 429 [`rate_limited`](https://developers.processcart.com/errors#rate_limited) — Too many requests
- 500 [`internal_error`](https://developers.processcart.com/errors#internal_error) — Internal error
- 503 [`unavailable`](https://developers.processcart.com/errors#unavailable) — Service unavailable

**Example response** (200)

```json
{
  "formatVersion": 1,
  "engineVersion": 1,
  "exportedAt": "2026-10-10T17:43:34.949Z",
  "source": "example-workspace",
  "workflow": {
    "name": "Order fulfillment",
    "keyDateFieldKey": "ship_date",
    "sections": [
      {
        "key": "intake",
        "title": "Intake",
        "defaultVisibility": "visible",
        "tasks": [
          {
            "key": "details",
            "title": "Details",
            "instructions": null,
            "defaultVisibility": "visible",
            "isStop": false,
            "kind": "standard",
            "fields": [
              {
                "key": "customer",
                "type": "text",
                "label": "Customer",
                "help": null,
                "required": true,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "none"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": true,
                "kickoffPosition": 0
              },
              {
                "key": "order_code",
                "type": "text",
                "label": "Order code",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "custom",
                  "regex": "^[A-Z]{2}-\\d{4}$",
                  "errorMessage": "Use AB-1234."
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "memo",
                "type": "textarea",
                "label": "Memo",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "quantity",
                "type": "number",
                "label": "Quantity",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "number",
                  "decimals": 0,
                  "thousands": true
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "amount",
                "type": "number",
                "label": "Amount",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "currency"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": true,
                "kickoffPosition": 1
              },
              {
                "key": "fee",
                "type": "number",
                "label": "Fee",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "max": 500,
                  "type": "currency"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "rate",
                "type": "number",
                "label": "Rate",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "percent"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "rate_text",
                "type": "text",
                "label": "Rate (text)",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "percent"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "ship_date",
                "type": "date",
                "label": "Ship date",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "date"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "start_time",
                "type": "time",
                "label": "Start time",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "time",
                  "hour12": true
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "gift_wrap",
                "type": "dropdown",
                "label": "Gift wrap",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": {
                  "choices": [
                    "Yes",
                    "No"
                  ]
                },
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "tags",
                "type": "multi_choice",
                "label": "Tags",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": {
                  "choices": [
                    "A",
                    "B",
                    "C"
                  ]
                },
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "agree",
                "type": "checkbox",
                "label": "Agree",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "contact_email",
                "type": "email",
                "label": "Contact email",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "email"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "website",
                "type": "url",
                "label": "Website",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "url"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "phone",
                "type": "phone",
                "label": "Phone",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "phone"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "owner",
                "type": "members",
                "label": "Owner",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "steps",
                "type": "subtasks",
                "label": "Steps",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": {
                  "items": [
                    {
                      "key": "photos",
                      "label": "Photos"
                    },
                    {
                      "key": "invoice",
                      "label": "Invoice"
                    }
                  ],
                  "allRequired": false
                },
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "contract",
                "type": "file",
                "label": "Contract",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": {
                  "multiple": true
                },
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "double_amount",
                "type": "formula",
                "label": "Double amount",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": {
                  "type": "currency"
                },
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": {
                  "expr": "{{amount}} * 2",
                  "mode": "spreadsheet"
                },
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "source",
                "type": "hidden",
                "label": "Source",
                "help": null,
                "required": false,
                "defaultVisibility": "hidden",
                "options": null,
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": null,
                "inKickoff": false,
                "kickoffPosition": null
              },
              {
                "key": "note",
                "type": "display_text",
                "label": "Note",
                "help": null,
                "required": false,
                "defaultVisibility": "visible",
                "options": null,
                "formatConfig": null,
                "validation": null,
                "defaultValue": null,
                "onFocusPopulate": null,
                "formula": null,
                "content": {
                  "type": "doc",
                  "content": [
                    {
                      "type": "paragraph",
                      "content": [
                        {
                          "text": "Review the details.",
                          "type": "text"
                        }
                      ]
                    }
                  ]
                },
                "inKickoff": false,
                "kickoffPosition": null
              }
            ]
          },
          {
            "key": "review",
            "title": "Review",
            "instructions": null,
            "defaultVisibility": "visible",
            "isStop": false,
            "kind": "approval",
            "approvalConfig": {
              "summaryFieldKeys": [
                "amount"
              ],
              "rejectReopensTaskKeys": [
                "details"
              ]
            },
            "fields": []
          },
          {
            "key": "stop",
            "title": "Sign-off",
            "instructions": null,
            "defaultVisibility": "visible",
            "isStop": true,
            "kind": "standard",
            "fields": []
          },
          {
            "key": "wrapup",
            "title": "Wrap up",
            "instructions": null,
            "defaultVisibility": "visible",
            "isStop": false,
            "kind": "standard",
            "fields": []
          }
        ]
      }
    ],
    "rules": []
  }
}
```
