2020-10-24 23:57:45 +05:30
---
stage: Verify
2023-05-27 22:25:52 +05:30
group: Pipeline Execution
2022-11-25 23:54:43 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-10-24 23:57:45 +05:30
---
2023-06-20 00:43:36 +05:30
<!-- - start_remove The following content will be removed on remove_date: '2024 - 05 - 22' -->
# Visual Review discussions API (deprecated) **(PREMIUM)**
2019-12-26 22:10:19 +05:30
2021-03-11 19:13:27 +05:30
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18710) in GitLab 12.5.
> - [Moved](https://about.gitlab.com/blog/2021/01/26/new-gitlab-product-subscription-model/) to GitLab Premium in 13.9.
2019-12-26 22:10:19 +05:30
2023-06-20 00:43:36 +05:30
WARNING:
This feature was [deprecated ](https://gitlab.com/gitlab-org/gitlab/-/issues/387751 ) in GitLab 15.8
and is planned for removal in 17.0. This change is a breaking change.
2022-04-04 11:22:00 +05:30
Visual Review discussions are notes on merge requests sent as
2023-06-20 00:43:36 +05:30
feedback from [Visual Reviews ](../ci/review_apps/index.md#visual-reviews-deprecated ).
2019-12-26 22:10:19 +05:30
## Create new merge request thread
Creates a new thread to a single project merge request. This is similar to creating
a note but other comments (replies) can be added to it later.
2020-04-08 14:13:33 +05:30
```plaintext
2019-12-26 22:10:19 +05:30
POST /projects/:id/merge_requests/:merge_request_iid/visual_review_discussions
```
Parameters:
| Attribute | Type | Required | Description |
| ------------------------- | -------------- | -------- | ----------- |
2023-04-23 21:23:45 +05:30
| `id` | integer/string | yes | The ID or [URL-encoded path of the project ](rest/index.md#namespaced-path-encoding ) |
2019-12-26 22:10:19 +05:30
| `merge_request_iid` | integer | yes | The IID of a merge request |
| `body` | string | yes | The content of the thread |
| `position` | hash | no | Position when creating a diff note |
| `position[base_sha]` | string | yes | Base commit SHA in the source branch |
| `position[start_sha]` | string | yes | SHA referencing commit in target branch |
| `position[head_sha]` | string | yes | SHA referencing HEAD of this merge request |
| `position[position_type]` | string | yes | Type of the position reference. Either `text` or `image` . |
| `position[new_path]` | string | no | File path after change |
| `position[new_line]` | integer | no | Line number after change (Only stored for `text` diff notes) |
| `position[old_path]` | string | no | File path before change |
| `position[old_line]` | integer | no | Line number before change (Only stored for `text` diff notes) |
| `position[width]` | integer | no | Width of the image (Only stored for `image` diff notes) |
| `position[height]` | integer | no | Height of the image (Only stored for `image` diff notes) |
| `position[x]` | integer | no | X coordinate (Only stored for `image` diff notes) |
| `position[y]` | integer | no | Y coordinate (Only stored for `image` diff notes) |
2020-03-13 15:44:24 +05:30
```shell
2020-06-23 00:09:42 +05:30
curl --request POST --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/projects/5/merge_requests/11/visual_review_discussions?body=comment"
2019-12-26 22:10:19 +05:30
```
2023-06-20 00:43:36 +05:30
<!-- - end_remove -->