# Update Workflow

Rename a workflow, enable or disable it with isActive, or replace its tags. Send at least one field; only the fields you send change.

`PUT https://connect.mindcloud.co/v2/workflows/:workflowId`

Permissions: `workflow:edit`.

## Parameters

### Path

- `workflowId` (string, required): The workflow's id, from List Workflows.

### Headers

- `X-Company-Id` (string): Optional. The id of the organization to act in. Leave it out to act in the API key's own organization. A key can also act in its child organizations, and, with "Use this key across all of your organizations" on, in every organization its creator can open in the app. List them with GET /v2/companies. Every response's X-Company-Id header names the organization it acted in. See [Organizations](https://mindcloud.co/docs/api/rest/introduction/organizations).

### Body

- `name` (string): A new name.
- `isActive` (boolean): true to enable the workflow, false to disable it.
- `tags` (array): The full new set of tag ids from the workflow tag catalog. Replaces the current set.

## Example request

```bash
curl --request PUT \
  --url 'https://connect.mindcloud.co/v2/workflows/Wq3kZ8pLx2Nb' \
  --header 'Authorization: Bearer $MINDCLOUD_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Order sync v2",
  "isActive": true,
  "tags": [
    "Tg2mV7xQ4kNs"
  ]
}'
```

## Response fields

- `id` (string): Unique id of the workflow.
- `name` (string): The name your team gave the workflow.
- `type` (string): The workflow's type.
- `isActive` (boolean): True while the workflow is enabled and able to run.
- `isTemplate` (boolean): True if this is a template rather than a live workflow.
- `size` (string): The workflow's runner size: xs, sm, md, lg, xl, or xxl. Empty when sized automatically.
- `tags` (array of string): Ids of the tags on the workflow. The tag catalog is managed in the app.
- `createdOn` (date): When the workflow was created.
- `createdBy` (string): Who created it.
- `updatedOn` (date): When it was last changed.
- `updatedBy` (string): Who last changed it.
