---
metadata:
  - name: generator
    content: Diplodoc Platform v5.57.3
  - property: og:type
    content: article
  - property: article:section
    content: API reference
  - property: og:title
    content: Editing a workflow
  - property: article:tag
    content: Technical instructions
alternate:
  - https://yandex.ru/support/tracker/en/api/queues/workflows/patch-workflow.md
  - https://yandex.ru/support/tracker/ru/api/queues/workflows/patch-workflow.md
  - href: en/api/queues/workflows/patch-workflow.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/tracker/en/llms.txt


# Editing a workflow

The request lets you edit an existing workflow: its name, initial action, steps, type, and resolution settings for issue types.

<div class="request_example yfm-code-floating-container method_patch">
    <p>PATCH</p>
    <pre><code>https://api.tracker.yandex.net/v3/workflows/&lt;id>?version=&lt;version></code></pre>
    <button class="yfm-clipboard-button"><svg width="16" height="16" viewBox="0 0 24 24" class="yfm-clipboard-icon" data-animation="15">
    <path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path>
    <path stroke="currentColor" fill="transparent" strokewidth="1.5" d="M9.5 13l3 3l5 -5" visibility="hidden">
        <animate id="visibileAnimation-15" attributeName="visibility" from="hidden" to="visible" dur="0.2s" fill="freeze" begin=""></animate>
        <animate id="hideAnimation-15" attributeName="visibility" from="visible" to="hidden" dur="1s" begin="visibileAnimation-15.end+1" fill="freeze"></animate>
    </path>
</svg>
</button>
</div>

<!-- source: en/api/_assets/style/methods.md -->

<!-- endsource: en/api/_assets/style/methods.md -->

## Request format {#query}

Before making the request, [get API access](https://yandex.ru/support/tracker/en/api/access.md).

To edit a workflow, use an HTTP request with the `PATCH` method. Specify only the parameters you want to change in the request body. Pass the current workflow version in the `version` query parameter or the `If-Match` header.

```json translate=no
PATCH /v3/workflows/<id>?version=<version>
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
Content-Type: application/json
X-Org-ID or X-Cloud-Org-ID: <organization_ID>

{
    "name": "Updated workflow",
    "type": "VISUAL",
    "initialAction": {
        "id": "open",
        "name": { "ru": "Открыть", "en": "Open" },
        "target": "open"
    },
    "steps": [
        {
            "status": "open",
            "actions": [
                {
                    "id": "inProgress",
                    "name": { "ru": "Взять в работу", "en": "Start progress" },
                    "target": "inProgress"
                }
            ]
        },
        {
            "status": "inProgress",
            "actions": [
                {
                    "id": "close",
                    "name": { "ru": "Закрыть", "en": "Close" },
                    "target": "closed"
                }
            ]
        },
        {
            "status": "closed",
            "actions": []
        }
    ]
}
```

<!-- source: en/api/_includes/headings.md -->
{% cut "Headers" %}

* `Host`: address of the node that provides the API.

* <!-- source: en/api/_includes/authorization.md -->
  `Authorization`: Authorization token about these formats:

    - `OAuth <OAuth_token>`: For authorization using the OAuth 2.0 protocol. [Learn more](https://yandex.ru/support/tracker/en/api/access.md#about_OAuth)

    - `Bearer <IAM_token>`: For authorization using an IAM token, if a Yandex Identity Hub organization is linked to Tracker. [Learn more](https://yandex.ru/support/tracker/en/api/access.md#iam-token)
  <!-- endsource: en/api/_includes/authorization.md -->


* <!-- source: en/api/_includes/org-id.md -->
  `X-Org-ID` or `X-Cloud-Org-ID`: Organization ID.

  - Use the `X-Org-ID` header if a Tracker organization is linked to Yandex 360 for Business.

  - Use the `X-Cloud-Org-ID` header if a Tracker organization is linked to Yandex Identity Hub.

  To get the organization ID, go to **Administration** → [**Organizations**](https://tracker.yandex.com/admin/orgs) and copy the value from the **ID** field. {#find-id}
  <!-- endsource: en/api/_includes/org-id.md -->


{% endcut %}
<!-- endsource: en/api/_includes/headings.md -->

{% cut "Resource" %}

Parameter | Description | Data type
----- | ----- | -----
\<id\> | Workflow ID. | String
\<version\> | Workflow version. Used to prevent conflicts during concurrent changes. You can find out the current version using the [request to get a workflow](get-workflow.md). You can use the `If-Match` header instead of the query parameter. | Number

{% endcut %}

{% cut "Request body parameters" %}

Parameter | Description | Data type | Required
----- | ----- | ----- | -----
name | New workflow name. | String | No
type | Workflow type. The `visual` type is currently available. Use the `VISUAL` value in the request. The API returns `visual` in the response. The field may be missing for workflows created earlier. | String | No
[initialAction](post-workflow.md#action-fields) | New initial action. The object structure is described under [Creating a workflow](post-workflow.md#action-fields). | Object | No
[steps](post-workflow.md#step-fields) | Updated array of workflow steps. The object structure is described under [Creating a workflow](post-workflow.md#step-fields). | Array of objects | No
issueTypeResolutions | Array of resolution settings for issue types. | Array of objects | No

{% endcut %}

> Example: Edit workflow `W21` by setting a new name and updating the steps with transitions to testing and completion (version `3`)
>
> ```json
> PATCH /v3/workflows/W21?version=3
> Host: api.tracker.yandex.net
> Authorization: OAuth y0__xAbc******
> Content-Type: application/json
> X-Org-ID: 1234******
>
> {
>     "name": "QA workflow",
>     "initialAction": {
>         "id": "new",
>         "name": { "ru": "Создать", "en": "Create" },
>         "target": "new"
>     },
>     "steps": [
>         {
>             "status": "new",
>             "actions": [
>                 {
>                     "id": "needInfo",
>                     "name": { "ru": "Отправить на тестирование", "en": "Send to testing" },
>                     "target": "testing"
>                 }
>             ]
>         },
>         {
>             "status": "testing",
>             "actions": [
>                 {
>                     "id": "resolved",
>                     "name": { "ru": "Завершить", "en": "Resolve" },
>                     "target": "resolved"
>                 }
>             ]
>         },
>         {
>             "status": "resolved",
>             "actions": []
>         }
>     ]
> }
> ```

## Response format {#answer}

{% list tabs %}

- Request executed successfully

  <!-- source: en/api/_includes/answer-200.md -->
  If the request is successful, the API returns a response with code `200 OK`.
  <!-- endsource: en/api/_includes/answer-200.md -->

  The response body contains information about the edited workflow in JSON format. The `version` field value is incremented after every change.

  The API does not return optional fields that have no value, such as `queue`, `type`, `createdBy`, and `updatedBy`.

    ```json translate=no
    {
        "self": "https://api.tracker.yandex.net/v3/workflows/W21",
        "id": "W21",
        "name": "Updated workflow",
        "version": 2,
        "steps": [
            {
                "status": {
                    "self": "https://api.tracker.yandex.net/v3/statuses/1",
                    "id": "1",
                    "key": "open",
                    "display": "Open"
                },
                "actions": [
                    {
                        "id": "inProgress",
                        "name": "Start progress",
                        "target": {
                            "self": "https://api.tracker.yandex.net/v3/statuses/3",
                            "id": "3",
                            "key": "inProgress",
                            "display": "In progress"
                        }
                    }
                ]
            },
            {
                "status": {
                    "self": "https://api.tracker.yandex.net/v3/statuses/3",
                    "id": "3",
                    "key": "inProgress",
                    "display": "In progress"
                },
                "actions": [
                    {
                        "id": "close",
                        "name": "Close",
                        "target": {
                            "self": "https://api.tracker.yandex.net/v3/statuses/8",
                            "id": "8",
                            "key": "closed",
                            "display": "Closed"
                        }
                    }
                ]
            },
            {
                "status": {
                    "self": "https://api.tracker.yandex.net/v3/statuses/8",
                    "id": "8",
                    "key": "closed",
                    "display": "Closed"
                }
            }
        ],
        "initialAction": {
            "id": "open",
            "name": "Open",
            "target": {
                "self": "https://api.tracker.yandex.net/v3/statuses/1",
                "id": "1",
                "key": "open",
                "display": "Open"
            }
        },
        "queue": {
            "self": "https://api.tracker.yandex.net/v3/queues/DESIGN",
            "id": "4",
            "key": "DESIGN",
            "display": "DESIGN"
        },
        "created": "2026-08-11T14:37:06.356+0000",
        "updated": "2026-08-11T15:10:00.000+0000",
        "createdBy": {
            "self": "https://api.tracker.yandex.net/v3/users/11********",
            "id": "11********",
            "display": "User Name",
            "cloudUid": "ajeppa7dgp53********",
            "passportUid": 1100000000
        },
        "updatedBy": {
            "self": "https://api.tracker.yandex.net/v3/users/11********",
            "id": "11********",
            "display": "User Name",
            "cloudUid": "ajeppa7dgp53********",
            "passportUid": 1100000000
        },
        "deleted": false,
        "type": "visual"
    }
    ```

    {% cut "Response parameters" %}

    Parameter | Description | Data type
    ----- | ----- | -----
    self | Workflow link. | String
    id | Workflow ID. | String
    name | Workflow name. | String
    version | Workflow version. Each change increases the version number. | Number
    [steps](#steps-response) | Array of workflow steps. | Array of objects
    [initialAction](#action-response) | Initial action. | Object
    [queue](#queue-response) | Queue the workflow is linked to. | Object
    created | Creation date and time. | String
    updated | Date and time of the last update. | String
    [createdBy](#user-response) | Workflow author. | Object
    [updatedBy](#user-response) | User who last updated the workflow. | Object
    deleted | Indicates whether the workflow has been deleted. | Boolean
    type | Workflow type. The only current value is `visual`. The field may be missing for workflows created earlier. | String

    **Fields of objects in the** `steps` **array** {#steps-response}

    Parameter | Description | Data type
    ----- | ----- | -----
    [status](#status-response) | Workflow step status. | Object
    [actions](#action-response) | Array of actions (transitions) available from this status. | Array of objects

    **Fields of the** `status` **object** {#status-response}

    Parameter | Description | Data type
    ----- | ----- | -----
    self | Status link. | String
    id | Status ID. | String
    key | Status key. | String
    display | Status display name. | String

    **Fields of the** `action` **and** `initialAction` **objects** {#action-response}

    Parameter | Description | Data type
    ----- | ----- | -----
    id | Action ID. | String
    name | Action name. | String
    [target](#target-response) | Target status that the action moves the issue to. | Object

    **Fields of the** `target` **object** {#target-response}

    Parameter | Description | Data type
    ----- | ----- | -----
    self | Status link. | String
    id | Status ID. | String
    key | Status key. | String
    display | Status display name. | String

    **Fields of the** `queue` **object** {#queue-response}

    Parameter | Description | Data type
    ----- | ----- | -----
    self | Queue link. | String
    id | Queue ID. | String
    key | Queue key. | String
    display | Queue display name. | String

    **Fields of the user object** (`createdBy`, `updatedBy`) {#user-response}

    Parameter | Description | Data type
    ----- | ----- | -----
    self | User link. | String
    id | User ID. | String
    display | User display name. | String
    cloudUid | Unique user ID in Yandex Cloud. | String
    passportUid | Unique user account ID in Yandex Passport. | Number

    {% endcut %}

- Request failed

    If the request could not be processed successfully, the response message contains information about the errors:

    <!-- source: en/api/_includes/answer-error-400.md -->
    400
    :   One or more request parameters have an invalid value.
    <!-- endsource: en/api/_includes/answer-error-400.md -->

    <!-- source: en/api/_includes/answer-error-401.md -->
    401
    :   The user is not authorized. Make sure that actions described in the [API access](https://yandex.ru/support/tracker/en/api/access.md) section are performed.
    <!-- endsource: en/api/_includes/answer-error-401.md -->

    <!-- source: en/api/_includes/answer-error-403.md -->
    403
    :   You are not authorized to perform this action. You can check what rights you have in the Tracker interface. The same rights are required to perform an action via the API and interface.
    <!-- endsource: en/api/_includes/answer-error-403.md -->

    <!-- source: en/api/_includes/answer-error-404.md -->
    404
    :   The requested object was not found. You may have specified an invalid object ID or key.
    <!-- endsource: en/api/_includes/answer-error-404.md -->

    <!-- source: en/api/_includes/answer-error-412.md -->
    412
    :   A conflict occurred while editing the object. The error may be due to an invalid update version.
    <!-- endsource: en/api/_includes/answer-error-412.md -->

    <!-- source: en/api/_includes/answer-error-422.md -->
    422
    :   JSON validation error, the request is rejected.
    <!-- endsource: en/api/_includes/answer-error-422.md -->

    <!-- source: en/api/_includes/answer-error-428.md -->
    428
    :   Access to the resource is denied. Make sure all required conditions for the request are specified.
    <!-- endsource: en/api/_includes/answer-error-428.md -->

{% endlist %}
