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

# Create a live workflow

`POST /workflows`

## Request

- Base URL: `https://api.indexone.io`
- URL: `https://api.indexone.io/workflows`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Creates a live index: validates the workflow, persists it as `stage: "pending"`, and runs the backtest and live registration in the background. Returns immediately so the call is never held against the gateway's 29-second ceiling.

Poll `GET /workflows/{workflow_id}` and watch `stage`: `pending` becomes `live` once history is written and the index is registered for continuous calculation, or `failed` with a `failure_reason` if validation, execution or the empty-index check rejected it. Failed records are kept, not deleted, so the reason is readable.

Pass `websocket_id` to stream progress instead of polling, the same way the console does.

This replaces the current go-live path, which is `POST /simulate` with `stage: "live"` buried in `index_parameters` — a call whose name says simulation and whose effect is a production index.

## Request body

- object
  - `name` string, required
  - `start_time` string, required: Datetime the index history begins at, `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`.
  - `exchange_calendar` string: `xcals` calendar code driving trading days.
  - `team_id` string: Owning team. Would default to the caller's primary team.
  - `operations` object[], required: The DAG. Every flow must start with a trigger operation, must include `create_index_holdings`, and must persist its result. Operations reference upstream outputs with `{"$ref": "<op_id>.output#column"}` and must also list that operation in `input`.
    - `id` string, required
    - `operation` string, required: An operation name from `GET /schema`.
    - `parameters` object
    - `input` object[]
      - `$ref` string

## Response `202`

Accepted. The workflow exists as pending; the deploy runs in the background.

- object
  - `id` string
  - `backtest_id` string
  - `stage` 'pending'
  - `created_at` string

## Other responses

- `403`: Missing or invalid credentials.
- `422`: The workflow failed validation. The body lists the issues.

---

[API](https://skmtc.dev/indexone/apis/index-one-rest-api.md) · [All operations](https://skmtc.dev/indexone/apis/index-one-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/indexone/apis/index-one-rest-api/revisions/df5a92216a9c?raw)
