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

# Update Workflow

> Update a workflow's name, trigger, steps, or status. Automatically creates a new version.

## Authentication

Requires a JWT token or API key in the `Authorization` header.

```bash theme={"dark"}
Authorization: Bearer YOUR_TOKEN
```

## Request

<ParamField path="id" type="string" required>
  The workflow ID to update.
</ParamField>

<ParamField body="name" type="string">
  New workflow name.
</ParamField>

<ParamField body="description" type="string">
  Updated description.
</ParamField>

<ParamField body="status" type="string">
  New status: `active`, `paused`, or `draft`.
</ParamField>

<ParamField body="trigger" type="object">
  Updated trigger configuration.
</ParamField>

<ParamField body="steps" type="array">
  Updated step definitions.
</ParamField>

### Example request

```bash theme={"dark"}
curl -X PUT "https://encrata.com/api/workflows/wf_abc123" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated pipeline",
    "status": "paused"
  }'
```

## Response

Returns the updated workflow. A new immutable version is created automatically before the update.

```json theme={"dark"}
{
  "id": "wf_abc123",
  "name": "Updated pipeline",
  "status": "paused",
  "version": 4,
  "updated_at": "2026-06-01T12:00:00Z"
}
```
