---
type: api
title: Update a workflow
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-put-workflows-workflow-id
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana-serverless/operation/operation-put-workflows-workflow-id
products:
  - Kibana
---

# Update a workflow

- Server: `https://{kibana_url}`

## Paths

- `PUT` `/api/workflows/workflow/{id}`
- `PUT` `/s/{space_id}/api/workflows/workflow/{id}`

#### Path parameters

- `id` (string · max length: 255) — required
  Workflow ID

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Partially update an existing workflow. You can update individual fields such as name, description, enabled state, tags, or the YAML definition without providing all fields.

## Required authorization

- Privileges: `workflowsManagement:update`

## Authentication

- Api key: `Authorization: <value>`
  You must create an API key and use the encoded value in the request header. To learn about creating keys, go to [API keys](https://www.elastic.co/docs/current/serverless/api-keys).

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Request body

`application/json`

- `description` (string) — optional
- `enabled` (boolean) — optional
- `name` (string) — optional
- `tags` (string[]) — optional
- `yaml` (string) — optional

## Response

Indicates a successful response

`application/json`

## Code examples

#### Console

```console
PUT kbn://api/workflows/workflow/{id}
{
  "enabled": true,
  "tags": ["production"]
}
```

#### curl

```curl
curl \
  -X PUT "${KIBANA_URL}/api/workflows/workflow/{id}" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "tags": ["production"]
  }'
```

## Response examples

#### Update workflow response

Example response returning the updated workflow

```json
{
  "enabled": false,
  "id": "workflow-a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "lastUpdatedAt": "2026-03-23T13:38:59.568Z",
  "lastUpdatedBy": "elastic",
  "valid": true,
  "validationErrors": []
}
```

