Skip to content
GitmoapAPIBeta
Knowledgewiki
POST/groups/{group_id}/wiki/pages/{path}/move

Move or rename a wiki page

move_group_wiki_page
  • wiki:write
    A token needs the wiki:write scope: Create, edit, move and delete wiki pagesGranted by write_api.Every operation this scope unlocks
  • Audited · mutation

    x-gitmoap-audit: {"kind":"audited","arg":"mutation"}

Moves the page to new_path in one commit, and retitles it if you send a title. The old address keeps resolving to the page, and its revision history follows it. Refused when a page already exists at the new path or the new path starts with templates/ or attachments/. Send the head commit you last read the wiki at as expected_head_sha: if anyone has changed the wiki since, the request is refused with 409 and nothing is written, so re-read and try again. A wiki that reads its pages from the repository is changed by committing there, not through this API. Developers and above.

Parameters

Path
  • group_idGroupId (string · uuid)Group ID
  • pathWikiPagePath (string)URL-encoded wiki page path

Request body

application/json
  • expected_head_shaCommitHash (string)
  • new_pathWikiPagePath (string)Where the page is moving to. Named new_path rather than path because the URL already carries the page's current one, and one name for two addresses is a coin toss for whoever reads the request.
  • messagestring or nulloptional
  • titleWikiPageTitle (string) or nulloptional
Request body exampleSynthesized example
{
"expected_head_sha": "54ba7aeb085581544194101c39ba7b4a1e095432",
"new_path": "new-path-116f"
}

Responses

200The page at its new address. The old one keeps resolvingapplication/json
  • created_atstring
  • doc_idstringStable identity. Unchanged by a rename, which is what lets every backlink survive one.
  • formatWikiFormatmarkdownasciidocrstorgtextilemediawikiThe markup a page is written in, decided by its file extension.
  • pathWikiPagePath (string)
  • titleWikiPageTitle (string)
  • updated_atstring
  • wiki_idWikiId (string · uuid)
  • wiki_page_idWikiPageId (string · uuid)
  • created_byActorSummary or nulloptional
200 exampleSynthesized example
{
"created_at": "2026-10-16T10:58:16Z",
"doc_id": "e2b30a14-477e-4cc5-b6ce-45db740cb381",
"format": "markdown",
"path": "path-9604",
"title": "Inline scalar newtypes but keep their brand",
"updated_at": "2026-10-17T00:57:59Z",
"wiki_id": "1c2caaa7-161d-496b-9f67-75b688be3673",
"wiki_page_id": "4eaff655-4391-4414-80ce-4230d68566dd",
"created_by": {
"email": "lin@acme.example",
"id": "id-a0a4",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/ea261503"
}
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/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-529e",
"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-d1ae",
"message": "Label every synthesized example"
}
}
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-6537",
"message": "Pin a page's payload to the build that rendered it"
}
}
404No page at this pathapplication/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-17aa",
"message": "Stream pipeline status into the run header"
}
}
409A page already exists at the new path, or the head has movedapplication/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says how
  • LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
  • 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.
409 exampleSynthesized example
{
"error": {
"code": "code-78a6",
"message": "Label every synthesized example"
}
}

CLI

gitmoap wiki move-group-wiki-page

  • --group-ididGroup ID (id or group path)
  • --pathidURL-encoded wiki page path
  • --expected-head-shastring
  • --messagestringoptional
  • --new-pathstringWhere the page is moving to. Named `new_path` rather than `path` because the URL already carries the page's current one, and one name for two addresses is a coin toss for whoever reads the request.
  • --titlestringoptional