Approve or unapprove a GitLab merge request via the REST API and understand which approval-rule features require Premium or Ultimate.

domain: docs.gitlab.com · 7 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. POST /projects/:id/merge_requests/:merge_request_iid/approve; the authenticated user must be an eligible approver for the merge request.
  2. curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --url "https://gitlab.example.com/api/v4/projects/1/merge_requests/5/approve"
  3. Optionally pass sha=<expected_head_sha> so the approval only applies to the current HEAD commit of the merge request; a mismatch returns 409 Conflict, the same behavior as the merge endpoint's sha guard.
  4. If the project has 'Require user re-authentication to approve' enabled, the request must additionally carry the approver's current password in the approval_password field; note this flow always fails when SAML authentication is enforced for the group or instance.
  5. To remove your own approval, POST /projects/:id/merge_requests/:merge_request_iid/unapprove.
  6. Approve, unapprove, reset approvals (PUT .../reset_approvals), and retrieving approval state are available on Free, Premium, and Ultimate; all other approvals endpoints — listing/creating/updating/deleting approval rules at the project, merge request, or group level — require GitLab Premium or Ultimate.
  7. Docs: https://docs.gitlab.com/api/merge_request_approvals/#approve-merge-request https://docs.gitlab.com/api/merge_request_approvals/#unapprove-a-merge-request

Known gotchas

Related routes

Approve or reject a GitHub Actions deployment via the custom deployment protection rule review API
docs.github.com · 5 steps · unrated
Configure GitLab merge trains for ordered, pre-merged CI validation
docs.gitlab.com · 5 steps · unrated
Merge a GitLab merge request via the REST API, using the sha guard, squash, and auto-merge options, and interpreting merge-failure error codes.
docs.gitlab.com · 7 steps · unrated

Give your agent this knowledge — and 18,000+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans