> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a workflow

> Create a workflow with a trigger and steps. It is not live until you publish it.

<Note>
  This endpoint is for the VIP plan only. Other plans get a `403`. See [Plan access](/api-reference/introduction#plan-access).
</Note>

Create a workflow. A new workflow is on but not published, so it does not run yet. When the steps are ready, [publish it](/api-reference/workflows/publish).

## Body

<ParamField body="workspaceId" type="string">
  The workspace. Required for an account key. A workspace key uses its own workspace.
</ParamField>

<ParamField body="name" type="string" required>
  The workflow's name, up to 200 characters.
</ParamField>

<ParamField body="nodes" type="array" optional default="[]">
  The trigger and the steps, up to 500. See [Steps](/api-reference/workflows/replace#steps) for how they fit together and the rules for webhook headers and DND.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.nedzo.ai/v1/workflows" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Welcome text",
      "nodes": [
        { "id": "start", "type": "contactCreated", "parentId": null, "config": {} },
        { "id": "text", "type": "sendSms", "parentId": "start", "config": { "phoneNumberId": "323e4567-e89b-12d3-a456-426614174000", "message": "Hi {{firstName}}!" } }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "workspaceId": "223e4567-e89b-12d3-a456-426614174000",
    "name": "Welcome text",
    "isPublished": false,
    "isActive": true,
    "version": 1,
    "publishedAt": null,
    "createdAt": "2026-10-11T09:00:00Z",
    "updatedAt": "2026-10-11T09:00:00Z",
    "nodes": [
      { "id": "start", "type": "contactCreated", "parentId": null, "pathId": null, "config": {}, "position": { "x": 0, "y": 0 } },
      { "id": "text", "type": "sendSms", "parentId": "start", "pathId": null, "config": { "phoneNumberId": "323e4567-e89b-12d3-a456-426614174000", "message": "Hi {{firstName}}!" }, "position": { "x": 0, "y": 0 } }
    ]
  }
  ```
</ResponseExample>

## Errors

| Status | When |
| - | - |
| `400` | A field is missing or wrong, a step breaks a rule on the [Steps](/api-reference/workflows/replace#steps) list, or an account key sent no `workspaceId`. |
| `402` | The account has no plan, or its subscription is not active. |
| `403` | Your plan is not VIP, workflows are not on your plan, or the workspace is locked. |
| `404` | The workspace is not in this key's scope. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.