Skip to content
GitmoapAPIBeta
Organizegroups
GET/groups

List groups

list_groups
  • group:read
    A token needs the group:read scope: View groups and namespace usageGranted by mcp_agent, mcp_agent_write, read_api, write_api.Every operation this scope unlocks
  • Filtered across resources

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

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

Without a parent, lists top-level groups; with parent_group_id or parent_group_path (not both), lists that group's subgroups. Newest first, and only the groups the caller can see — public ones without signing in — so a page can hold fewer than limit groups while more remain (at most 100 per page).

Parameters

Query
  • parent_group_idstringoptionalFilter by parent group ID (mutually exclusive with parent_group_path)
  • parent_group_pathstringoptionalFilter by parent group path (mutually exclusive with parent_group_id)
  • limitinteger · int32optionalMaximum number of items to return
  • next_tokenstringoptionalPagination token

Responses

200Groups listedapplication/json
  • itemsarray of RepositoryGroupView
    • The RepositoryGroupView schema
    • created_atstring
    • created_byUserId (string · uuid)
    • full_pathFullPath (string)
    • group_idGroupId (string · uuid)
    • group_nameEntityName (string)
    • updated_atstring
    • visibilityVisibilitypublicinternalprivate
    • ancestor_group_idsarray of GroupId (string · uuid)optional
    • avatarstring or nulloptional
    • descriptionstring or nulloptional
    • display_namestring or nulloptional
    • parent_group_idGroupId (string · uuid) or nulloptional
    • verified_domainsarray of Domain (string)optionalThe domains the organization has proven it controls, each through a DNS record. Only an organization — a top-level group — has any; omitted when it has none.
  • next_tokenstring or nulloptional
200 exampleSynthesized example
{
"items": [
{
"created_at": "2026-10-16T09:24:50Z",
"created_by": "a3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"full_path": "acme/payments-api",
"group_id": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69",
"group_name": "payments-api",
"updated_at": "2026-10-15T08:44:06Z",
"visibility": "public"
},
{
"created_at": "2026-10-14T21:08:43Z",
"created_by": "c9d8e7f6-a5b4-4c3d-9e2f-1a0b9c8d7e6f",
"full_path": "acme/payments-api",
"group_id": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69",
"group_name": "payments-api",
"updated_at": "2026-10-13T18:57:24Z",
"visibility": "public"
}
],
"next_token": "next-token-75ac"
}
400Invalid request (both parent_group_id and parent_group_path provided)application/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-fb4f",
"message": "Pin a page's payload to the build that rendered it"
}
}
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-6ca9",
"message": "Inline scalar newtypes but keep their brand"
}
}
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-9872",
"message": "Inline scalar newtypes but keep their brand"
}
}
404The parent group named by `parent_group_path` does not existapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • 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.
404 exampleSynthesized example
{
"error": {
"code": "code-7e42",
"message": "Inline scalar newtypes but keep their brand"
}
}

CLI

gitmoap groups list

  • --limitnumberoptionalMaximum number of items to return
  • --next-tokenstringoptionalPagination token
  • --parent-group-idstringoptionalFilter by parent group ID (mutually exclusive with parent_group_path)
  • --parent-group-pathstringoptionalFilter by parent group path (mutually exclusive with parent_group_id)

Used in these guides