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

# Create a workflow

`POST /v1/workflows`

Create a draft workflow with a blank trigger and exit node.

## Request body

- CreateWorkflowRequest
  - `name` string, required — The name of the workflow.
  - `description` string — The description of the workflow.
  - `mailingListId` string, nullable — The ID of a mailing list the workflow sends to. After creation, the mailing list can be changed with the `/v1/workflows/{workflowId}/mailing-list` endpoint.

## Response `200`

Workflow created.

- SimplifiedWorkflow
  - `id` string, required — The ID of the workflow.
  - `workflowRevisionId` string, nullable, required — The current workflow revision token. Pass the latest value as `expectedRevisionId` on the next workflow mutation. Will be `null` for workflows without a revision token yet.
  - `status` 'Draft' | 'Sending' | 'Paused' | 'PausedAndQueueing', required
  - `name` string — The name of the workflow.
  - `description` string — The description of the workflow.
  - `mailingListId` string, nullable, required — The ID of the mailing list the workflow sends to.
  - `rootNodeId` string, required — The ID of the root node in the workflow graph.
  - `nodes` object, required — A map of node IDs to simplified node objects. Each node includes `typeName` and `nextNodeIds`, plus type-specific fields when present. To get the full node object, use the `GET /v1/workflows/{workflowId}/nodes/{nodeId}` endpoint.

## Other responses

- `400` — Invalid request body.
- `401` — Invalid API key.
- `405` — Wrong HTTP request method.
- `500` — Workflow creation is unavailable for this team.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/revisions/9cc087257f0d/schema)
