Lesstep
GitLab · merge requests · discussions API · Checked October 24, 2026

GitLab: why the comment or the thread was refused

Comments on a merge request go through GitLab's discussions API: a new thread (POST /projects/:id/merge_requests/:iid/discussions, with position for lines of the diff), a reply (…/discussions/:discussion_id/notes), resolving or reopening a thread (PUT …/discussions/:discussion_id with resolved), and applying a suggested change (PUT /projects/:id/suggestions/:id/apply). All of this is from GitLab's source (lib/api/discussions.rb, lib/api/helpers/notes_helpers.rb, lib/api/suggestions.rb, and the note and suggestion models and policies) and its documentation, read on October 24, 2026.

A new comment

A token without the api scope is refused with 403 too, but that answer says insufficient_scope; see which scope to add.

A reply

Resolving or reopening a thread: 403 with nothing more

{"message":"403 Forbidden"} has two causes in the source, and the answer is the same for both:

A thread ID that does not exist answers {"message":"404 Discussion Not Found"}.

Applying a suggestion

Where it stands

curl -H "PRIVATE-TOKEN: your-token" "https://gitlab.com/api/v4/projects/group%2Fproject/merge_requests/42/discussions"

Each thread has individual_note (true for a standard comment), and each of its notes has resolvable, resolved and system (one of GitLab's own records). The merge request itself (…/merge_requests/42) has discussion_locked and diff_refs, the three commits of its latest version. Use your own server's address instead of gitlab.com.

What to do

GitLab merge requests in IntelliJ IDEA

Merge Request Inbox for GitLab, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, comments on a merge request or on lines of its diff (a range of lines, or the range's last line when GitLab refuses the range), replies, resolves and reopens threads, and applies suggested changes. It offers Resolve only on threads GitLab says can be resolved, offers Apply only while GitLab would apply the suggestion, and leaves GitLab's own records out. When GitLab refuses, it says so: for 403, that your role in the project or its settings may not let your account do it, with GitLab's words; other refusals in GitLab's words. Reading is free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).

GITLAB is a trademark of GitLab Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by GitLab Inc. or JetBrains.

More: GitLab approval refused (401, 409) · GitLab merge refused (405, 409, 422) · GitLab "insufficient_scope" · GitLab 401 "invalid_token" · GitLab 404 "Project Not Found" · GitLab merge request not created (409, 422, 400) · GitLab rebase refused or failed (403, 409) · GitLab merge request list refused (400, 404) · GitLab merge request changes cut short ("1000+", too_large) · GitLab 429 "Retry later" (rate limits) · GitLab "compare_timeout": true (diff limits) · GitLab merge request plugins for IntelliJ IDEA, compared · 日本語