Skip to content
GitmoapAPIBeta
Reviewmerge-requests
GET/user/merge-requests

List the merge requests authored by the calling user

list_my_merge_requests
  • merge_request:read
    A token needs the merge_request:read scope: View merge requestsGranted by mcp_agent, mcp_agent_write, read_api, read_repository, write_api, write_repository.Every operation this scope unlocks
  • Single-resource

    x-gitmoap-isolation: {"kind":"single_or_self_scoped"}

  • Paginated
    Pass the next_token a page returns to get the next one.

Every merge request you opened, across all repositories, most recently updated first, filtered by status or a search term. A service account authors none, so it gets an empty list. Page with next_token.

Parameters

Query
  • statusstringoptionalFilter by status: open, merged, closed
  • searchstringoptionalSearch the title and description by word or phrase, or the title by any part of it
  • limitinteger · int32optionalPage size (1-100)
  • next_tokenstringoptionalPagination cursor

Responses

200Authored merge requests listedapplication/json
  • itemsarray of MergeRequest
    • The MergeRequest schema
    • created_atstring
    • created_byPrincipalId (string · uuid)The person or agent who opened it.
    • is_draftboolean
    • merge_request_idMergeRequestId (integer · int64)
    • repository_idRepositoryId (string · uuid)
    • source_branchBranchName (string)
    • source_branch_deletedboolean
    • source_branch_headCommitHash (string)
    • statusMergeRequestStatusopenmergedclosed
    • target_branchBranchName (string)
    • target_branch_headCommitHash (string)
    • titleMrTitle (string)
    • updated_atstring
    • author_can_pushboolean or nulloptionalWhether the author can push to the repository — false for a drive-by contributor's merge request. Absent where it was not computed.
    • closed_atstring or nulloptional
    • closed_byPrincipalId (string · uuid) or nulloptional
    • descriptionMrDescription (string) or nulloptional
    • merge_commit_shaCommitHash (string) or nulloptional
    • merged_atstring or nulloptional
    • merged_byPrincipalId (string · uuid) or nulloptional
    • restack_requiredbooleanoptionalPrecise restack signal — set when this MR's downstack was squash-merged (a rebase is genuinely required to drop the duplicated diff). Distinct from the advisory commits_behind. Reset on the MR's next source-advancing write.
    • stack_summaryStackSummary or nulloptionalThe neighbouring merge requests in this stack. Returned when fetching a single merge request, not in listings.
      • The StackSummary schema
      • has_downstackboolean
      • has_upstackboolean
      • downstack_mr_idMergeRequestId (integer · int64) or nulloptional
      • upstack_mr_idsarray of MergeRequestId (integer · int64)optional
    • versioninteger · int64optional0–∞Optimistic-concurrency counter. Bumped on every write; writes condition on the read value.
  • next_tokenstring or nulloptional
200 exampleSynthesized example
{
"items": [
{
"created_at": "2026-10-11T11:07:20Z",
"created_by": "a3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"is_draft": false,
"merge_request_id": 42,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"source_branch": "refactor/brand-inline",
"source_branch_deleted": false,
"source_branch_head": "c9dfb27b7085c75bf192bf36ba117d2ce61628bd",
"status": "open",
"target_branch": "main",
"target_branch_head": "8defaf08a7fda0d1bc0f2e35f4304169ea28721f",
"title": "Label every synthesized example",
"updated_at": "2026-10-10T14:17:58Z"
},
{
"created_at": "2026-10-14T20:53:59Z",
"created_by": "b7e2d1c0-9f8e-4d7c-a6b5-c4d3e2f1a0b9",
"is_draft": false,
"merge_request_id": 42,
"repository_id": "5b0e7c2a-9d14-4e8b-a6f1-2c3d4e5f6a70",
"source_branch": "feature/region-legend",
"source_branch_deleted": false,
"source_branch_head": "9c3fc0dac34a89ea7ff20bc8bf0beb6b6f58c50e",
"status": "open",
"target_branch": "main",
"target_branch_head": "84e0cd6dec58012357831d6807b62928c8902cbd",
"title": "Stream pipeline status into the run header",
"updated_at": "2026-10-15T15:51:07Z"
}
],
"next_token": "next-token-f76e"
}
400The `status` query parameter is not a known merge-request statusapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-5438",
"message": "Draw the region map from operation density"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-7b1a",
"message": "Draw the region map from operation density"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-1a40",
"message": "Draw the region map from operation density"
}
}

CLI

gitmoap mr list-my

  • --limitnumberoptionalPage size (1-100)
  • --next-tokenstringoptionalPagination cursor
  • --searchstringoptionalSearch the title and description by word or phrase, or the title by any part of it
  • --statusstringoptionalFilter by status: open, merged, closed

Used in these guides