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

# Workflow Management

> List, create, update, and delete workflows via the Workflows API.

## Use case

Create, version, and manage reusable enrichment pipelines programmatically. Use these endpoints to list existing workflows, inspect block definitions, create new pipelines from code, update configurations, or remove workflows you no longer need.

<Card title="API Reference" icon="code" href="/api-reference/workflow/list-workflows">
  See the full request/response schema and parameters in the API Reference.
</Card>

## Pricing

See [Credits & Pricing Guide](/guides/credits-and-pricing) for credit costs.

## Errors

For error responses (400, 403, 404, etc.), see [Handling Errors](/api-reference/errors).

<Note>For a full reference of available block types and their use cases, see [Workflow Blocks](/api-reference/workflows/workflow-blocks).</Note>

## Workflow definition

A workflow definition is a directed graph of `blocks` connected by `edges`:

* **`blocks`** — each block has a `sequence_number`, `block_type` (see [Workflow Blocks](/api-reference/workflows/workflow-blocks)), `block_name`, optional `block_id`, and a `specs` object.
* **`edges`** — each edge has a `from_block_id`, a `to_block_id`, and an optional `condition`.

This shape is used in both Create Workflow and Update Workflow requests.

***

## List workflows

Retrieve all workflows in your organization.

```http theme={null}
GET https://api.sixtyfour.ai/workflows
```

Returns a lightweight list of workflows without block definitions.

<Note>Use `GET /workflows/{workflow_id}` to retrieve a workflow with its full block graph.</Note>

***

## Get workflow

Retrieve a specific workflow including its complete block graph.

```http theme={null}
GET https://api.sixtyfour.ai/workflows/{workflow_id}
```

***

## Create workflow

Create a new workflow with a block graph definition.

```http theme={null}
POST https://api.sixtyfour.ai/workflows/create_workflow
```

Required body fields: `workflow_name`, `workflow_description`, and `workflow_definition`. Pass an optional `id` to use a custom workflow ID; otherwise one is auto-generated.

### Example request

```json theme={null}
{
  "workflow_name": "Contact Validation",
  "workflow_description": "Validates email addresses and phone numbers",
  "workflow_definition": {
    "blocks": [
      {
        "sequence_number": 1,
        "block_type": "webhook",
        "block_name": "webhook",
        "block_id": "input",
        "specs": {}
      },
      {
        "sequence_number": 2,
        "block_type": "validate_email",
        "block_name": "validate_email",
        "block_id": "validate",
        "specs": {
          "email_field": "email"
        }
      }
    ],
    "edges": [
      {
        "from_block_id": "input",
        "to_block_id": "validate"
      }
    ]
  },
  "id": "custom_workflow_id"
}
```

<Tip>All workflows are validated before creation. Block compatibility is checked automatically.</Tip>

***

## Update workflow

Update an existing workflow's name, description, or block definition.

```http theme={null}
POST https://api.sixtyfour.ai/workflows/update_workflow
```

Pass `workflow_id` as a query parameter. All body fields (`workflow_name`, `workflow_description`, `workflow_definition`) are optional — only include what you want to change. The `workflow_definition` shape is the same as Create Workflow above.

<Note>Performs upsert: creates the workflow if it doesn't exist. Workflow definition is validated before saving.</Note>

***

## Delete workflow

Permanently delete a workflow.

```http theme={null}
POST https://api.sixtyfour.ai/workflows/delete_workflow
```

Pass `workflow_id` as a query parameter.

<Note>Permanently removes the workflow definition. Historical workflow runs are preserved.</Note>
