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

Replace a wiki page's content

update_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"}

Writes the new content, and a new title if you send one, as one commit. 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. Content is limited to 1 MiB. 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
  • contentstring
  • expected_head_shaCommitHash (string)The head the edit was composed against. Required, and there is no mode that omits it. An unconditional overwrite has a window in which two saves observe the same head and one is lost with nothing reporting it.
  • messagestring or nulloptional
  • titleWikiPageTitle (string) or nulloptional
Request body exampleSynthesized example
{
"content": "content-08ad",
"expected_head_sha": "5ba7e21dfc8ce71e954efd04c188af3235921e5a"
}

Responses

200The page as storedapplication/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-09T08:32:13Z",
"doc_id": "1985bafc-d8a9-4fe5-b135-bda6c6f2dffe",
"format": "markdown",
"path": "path-36e7",
"title": "Inline scalar newtypes but keep their brand",
"updated_at": "2026-10-14T01:30:21Z",
"wiki_id": "db3d7a1e-763f-44f3-a860-d33f2a57b3db",
"wiki_page_id": "7faaa613-7be6-4b2e-9bd1-2412aa17833f",
"created_by": {
"email": "tomas@acme.example",
"id": "id-39d0",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/71fa65ee"
}
}
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-5b1d",
"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-69b0",
"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-edee",
"message": "Label every synthesized example"
}
}
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-3b5c",
"message": "Stream pipeline status into the run header"
}
}
409Somebody else edited this wiki since the head you composed against; re-read and mergeapplication/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-d259",
"message": "Draw the region map from operation density"
}
}

CLI

gitmoap wiki update-group-wiki-page

  • --group-ididGroup ID (id or group path)
  • --pathidURL-encoded wiki page path
  • --contentstring
  • --expected-head-shastringThe head the edit was composed against. **Required, and there is no mode that omits it.** An unconditional overwrite has a window in which two saves observe the same head and one is lost with nothing reporting it.
  • --messagestringoptional
  • --titlestringoptional