---
metadata:
  - name: generator
    content: Diplodoc Platform v5.47.3
alternate:
  - https://yandex.com.tr/support/tracker/en/api-ref/entities/update-entity.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/support/tracker/en/llms.txt

# Updating an entity

Use this request to update information about an entity: a [goal](https://yandex.com.tr/support/tracker/en/goals/goals-start.md), [project](https://yandex.com.tr/support/tracker/en/manager/project-new.md), or [project portfolio](https://yandex.com.tr/support/tracker/en/manager/portfolio.md).

<div class="request_example method_patch yfm-clipboard">
    <p>PATCH</p>
    <pre><code>https://api.tracker.yandex.net/v3/entities/&lt;entity_type>/&lt;entity_ID></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/_assets/style/methods.md -->

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

## Query format {#query}

Before making a request, [get permission to access the API](https://yandex.com.tr/support/tracker/en/api-ref/access.md).

To update an entity, use an HTTP `PATCH` request. In the request body, specify the parameters in JSON format.

```json translate=no
PATCH /v3/entities/<entity_type>/<entity_ID>
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>

{
   "fields":
   {
      "summary": "<new_name>",
      "teamAccess": true,
      "parentEntity": {
          "primary": "<parent_entity_ID>"
      }
   },
   "comment":"<comment>",
   "links":
   [
      {
         "relationship": "<link>",
         "entity": "<linked_entity_ID>"
      }
   ]
}
```

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

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

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

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

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


* <!-- source: en/_includes/api/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 Cloud Organization.

  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/_includes/api/org-id.md -->


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

<!-- source: en/_includes/api/resource-entity.md -->
{% cut "Resource" %}

| Parameter | Description | Data type |
-------- | -------- | ----------
| \<entity_type> | Entity type:<ul><li>project</li><li>portfolio</li><li>goal</li></ul> | String |
| \<entity_ID> | Entity ID. To get the ID, see the [entity list](search-entities.md). You can use the `id` or `shortId` parameter as the ID. | String |

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

{% cut "Request parameters" %}

**Additional parameters**

| Parameter | Description | Data type |
-------- | -------- | ----------
| [fields](about-entities.md#query-params) | Additional entity fields to include in the response | String |
| expand | Additional information to include in the response:<ul><li>`attachments`: Attached files</li></ul> | String |

{% endcut %}

{% cut "Request body parameters" %}

**Additional parameters**

| Parameter | Description | Data type |
-------- | -------- | ----------
| fields | Object with entity settings For more information, see [Additional entity parameters](about-entities.md#query-params). | Map object |
| comment | Comment | String |
| links | Array of objects with settings of links to other entities | Array of objects |

`fields` **object fields**

<!-- source: en/_includes/api/entity-fields.md -->
#|
|| Parameter | Description | Data type ||
|| summary | Name (required field) | String ||
|| queues | Queue (required for the project if the `teamAccess` field isn't specified) | String ||
|| teamAccess | Access (required for the project if the `queues` field isn't specified) | Logical ||
|| description | Description | String ||
|| markupType | Text markup type. If you use [YFM markup](https://yandex.com.tr/support/tracker/en/user/syntax-yfm.md) in a comment or entity description, specify the `md` value | String ||
|| author | Author (user ID) | String ||
|| lead | Lead (user ID) | String ||
|| teamUsers | Participants (array of user IDs) | String array ||
|| clients | Customers (array of user IDs) | String array ||
|| followers | Followers (array of user IDs) | String array ||
|| start | Start date in `YYYY-MM-DDThh:mm:ss.sss±hhmm` format | Date ||
|| end | Deadline in `YYYY-MM-DDThh:mm:ss.sss±hhmm` format | Date ||
|| tags | Tags | String array ||
|| [parentEntity](#parent) | Parent entity data. For a project or portfolio: "Included in the portfolio" field | Object ||
|| entityStatus |
Status.

{% cut "Acceptable status values" %}

<!-- source: en/_includes/api/entity-status.md -->
For projects or portfolios:
* `draft`: New.
* `draft2`: Draft.
* `in_progress`: In progress.
* `according_to_plan`: As planned.
* `postponed`: Postponed.
* `at_risk`: At risk.
* `blocked`: Blocked.
* `launched`: Finished.
* `cancelled`: Canceled.

For goals:
* `draft`: New.
* `according_to_plan`: As planned.
* `at_risk`: At risk.
* `blocked`: Blocked.
* `achieved`: Completed.
* `partially_achieved`: Partially completed.
* `not_achieved`: Not completed.
* `exceeded`: Exceeded.
* `cancelled`: Canceled.
<!-- endsource: en/_includes/api/entity-status.md -->

{% endcut %}
| String ||
|#
<!-- endsource: en/_includes/api/entity-fields.md -->

`links` **array object fields**

#|
|| Parameter | Description | Data type ||
|| relationship |
{% include [links](../../_includes/api/entity-links.md) %} |
String
||
|| entity | ID of the linked entity. | String ||
|#

**parentEntity** `object fields` {#parent}

<!-- source: en/_includes/api/entity-fields.md -->
| Parameter | Description | Data type |
-------- | -------- | ----------
| primary | ID of the main portfolio (for projects and portfolios) or parent goal (for goals) | String |
| secondary | For projects and portfolios: IDs of additional portfolios<br>Goals don't support the `secondary` parameter. | Array of strings |

{% note info "" %}

If the API `v2` is specified in the request address, the `parentEntity` parameter can contain only the ID of the main parent entity.

For example: `"parentEntity": "66e2fa183*****"`

{% endnote %}
<!-- endsource: en/_includes/api/entity-fields.md -->

{% endcut %}

> Example 1: Renaming a project and leaving a comment
>
> - An HTTP PATCH method is used.
> - The project is renamed to **Test 2**.
> - A **Project renamed** record is added to project comments.
> - The response will display attachments.
>
> ```json translate=no
> PATCH /v3/entities/project/655f8cc52*****?expand=attachments HTTP/1.1
> Host: api.tracker.yandex.net
> Authorization: OAuth <OAuth_token>
> X-Org-ID or X-Cloud-Org-ID: <organization_ID>
>
> {
>     "fields":
>     {
>        "summary":"Test 2"
>     },
>     "comment":"Project renamed"
> }
> ```

> Example 2: Changing the project's main portfolio and adding an additional portfolio
>
> - An HTTP PATCH method is used.
> - The portfolio with ID `66e2fa183*****` is specified as the main one.
> - The portfolio with ID `670e702fd*****` is added to the list of additional portfolios.
> - The response will display parent entities.
>
> ```json translate=no
> PATCH /v3/entities/project/655f8cc52*****?fields=parentEntity HTTP/1.1
> Host: api.tracker.yandex.net
> Authorization: OAuth <OAuth_token>
> X-Org-ID or X-Cloud-Org-ID: <organization_ID>
>
> {
>    "fields": {
>       "parentEntity": {
>          "primary": "66e2fa183*****",
>           "secondary": {
>             "add": ["670e702fd*****"]
>           }
>        }
>     }
> }
> ```


## Response format {#answer}

{% list tabs %}

- Request executed successfully

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

   The response body contains information about the updated entity in JSON format.

   ```json translate=no
   {
      "self": "https://api.tracker.yandex.net/v3/entities/project/655f328da834c763********",
      "id": "655f328da834c763********",
      "version": 3,
      "shortId": 2,
      "entityType": "project",
      "createdBy": { "self": "https://api.tracker.yandex.net/v3/users/11********", "id": "11********", "display": "User Name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
      "createdAt": "2023-11-23T11:07:57.298+0000",
      "updatedAt": "2023-11-23T15:46:26.391+0000",
      "attachments": [
         {
            "self": "https://api.tracker.yandex.net/v3/attachments/8",
            "id": "8",
            "name": "file1.docx",
            "content": "https://api.tracker.yandex.net/v3/attachments/8/file1.docx",
            "createdBy": { "self": "https://api.tracker.yandex.net/v3/users/11********", "id": "11********", "display": "User Name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
            "createdAt": "2023-11-23T15:46:20.617+0000",
            "mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "size": 18585
         },
         {
            "self": "https://api.tracker.yandex.net/v3/attachments/9",
            "id": "9",
            "name": "file2.pdf",
            "content": "https://api.tracker.yandex.net/v3/attachments/9/file2.pdf",
            "createdBy": { "self": "https://api.tracker.yandex.net/v3/users/11********", "id": "11********", "display": "User Name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
            "createdAt": "2023-11-23T15:46:25.932+0000",
            "mimetype": "application/pdf",
            "size": 175656
         }
      ],
      "fields":
         {
            "teamAccess": null
         }

   }
   ```

   {% cut "Response parameters" %}

   | Parameter | Description | Data type |
   -------- | -------- | ----------
   | self | Address of the API resource with information about the project | String |
   | id | Entity ID. | String |
   | version | Entity version. Each change of the parameters increases the version number. <br>Entity edits will be disabled if the version number reaches the threshold value of `10100` (for robots) or `11100` (for users) | Number |
   | shortId | Goal, project, or portfolio ID in Yandex Tracker | Number |
   | entityType | Entity type | String |
   | createdBy | Block with information about the entity creator | Map object |
   | createdAt | Entity creation date in `YYYY-MM-DDThh:mm:ss.sss±hhmm` format | String |
   | updatedAt | Date when the entity was last updated, in `YYYY-MM-DDThh:mm:ss.sss±hhmm` format | String |
   | attachments | Array of objects with information about the attachment | Array of objects |
   | [fields](about-entities.md) | Block with additional entity fields | Map object |

   `createdBy` **object fields**

   <!-- source: en/_includes/api/user.md -->
   | Parameter | Description | Data type |
   ----- | ----- | -----
   | self | Address of the API resource with information about the user | String |
   | id | User ID. | String |
   | display | Displayed user name | String |
   | passportUid | Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. | Number |
   | cloudUid | Unique user ID in Yandex Cloud Organization | String |
   <!-- endsource: en/_includes/api/user.md -->

   {% endcut %}

- Request failed

    If the request is processed incorrectly, the API returns a response with an error code:

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

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

    <!-- source: en/_includes/api/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/_includes/api/answer-error-403.md -->

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

   <!-- source: en/_includes/api/answer-error-423.md -->
   423
   :   Object edits disabled. The `version` parameter value limit (the maximum number of object updates) might have been exceeded. The maximum version value is `10100` for robots and `11100` for users.
   <!-- endsource: en/_includes/api/answer-error-423.md -->

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


{% endlist %}

{% included (../../_includes/api/entity-links.md) %}
Link type. For projects and portfolios:
* `depends on`: The current entity depends on the linked one.
* `is dependent by`: The current entity blocks the linked one.
* `works towards`: Project link to a goal.

For goals:
* `parent entity`: Parent goal.
* `child entity`: Subgoal.
* `depends on`: The current goal depends on the linked one.
* `is dependent by`: The current goal blocks the linked one.
* `is supported by`: Link to a project.

{% endincluded %}