---
title: "Create a workflow"
method: POST
path: "/workflows"
tags: ["workflows"]
---

# Create a workflow

`POST /workflows`

Creates a workflow in the caller's org. Name must match ^[A-Za-z0-9_-]+$ and be unique within the org. Pass code to save the workflow's first code revision atomically with it; omit it to create an empty workflow and add code later. Returns the workflow_id (plus revision_id and revision when code was provided).

## Request body

- WorkflowCreateRequest — Request body for creating a new workflow.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `capture` boolean — Capture media this workflow's runs produce on the phone into the org's file library (default true). false disables capture for every run dispatched through the scheduler.
  - `code` string — Optional Python source for the workflow's first revision, saved atomically with the workflow when provided.
  - `name` string, required — Human-readable workflow name.
  - `ocr_engine` 'free' | 'premium' — OCR backend to use.
  - `platform` 'ios' | 'android' | 'both' — Target OS platform.
  - `recording` boolean — Record this workflow's runs (default true). false suppresses video recording and the rolling thumbnail entirely, for every run dispatched through the scheduler.
  - `telemetry` boolean — Persist telemetry spans for this workflow's runs (default true). false skips the durable trace store; the live telemetry stream still works while a run is active.

## Response `201`

Created

- WorkflowCreateResponse — Returned after successfully creating a workflow.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `revision` integer — Revision number of the first code revision (1), when code was provided.
  - `revision_id` string — Id of the first code revision, when code was provided.
  - `workflow_id` string, required — Identifier assigned to the new workflow.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/axilioai/apis/axilio-api.md) · [All operations](https://skmtc.net/axilioai/apis/axilio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/axilioai/axilio-api/versions/108ab4b41051/schema)
