Skip to content
GitmoapAPIBeta
Knowledgewiki
PATCH/repositories/{repo_id}/wiki

Enable, disable, or repoint a repository's wiki

update_repo_wiki
  • wiki:manage
    A token needs the wiki:manage scope: Enable or disable a wiki and change where it reads fromGranted by write_api.Every operation this scope unlocks
  • Audited · mutation

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

The first call creates the wiki; settings you leave out take their defaults — enabled, with pages kept in the wiki's own repository and home as the home page. Later calls change only the fields you send. Instead of its own repository, the wiki can read its pages from a directory on the repository's default branch, inside its specs, docs or legal directory; such a wiki is edited by committing to the repository. Maintainers and above.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository ID

Request body

application/json
  • default_pageWikiPagePath (string) or nulloptional
  • enabledboolean or nulloptional
  • sourceWikiSourcededicatedin_repoor nulloptionalWhere a wiki's pages come from.
  • source_pathRepoPath (string) or nulloptional
Request body exampleSynthesized example
{}

Responses

200The wiki as storedapplication/json
  • created_atstring
  • default_pageWikiPagePath (string)The page served at the wiki's root.
  • enabledbooleanWhether the wiki is on. A disabled wiki is `false` here, never a `404`: whether a wiki exists is not a secret, and only its contents are.
  • page_countinteger · int32How many pages the wiki has.
  • scope_idstring
  • scope_typeScopeTypegrouprepository
  • sourceWikiSourcededicatedin_repoWhere a wiki's pages come from.
  • updated_atstring
  • wiki_idWikiId (string · uuid)
  • clone_urlstring or nulloptionalWhere this wiki can be cloned from. Absent when the wiki has no clone URL of its own, as for a wiki that reads its pages from a repository.
  • created_byActorSummary or nulloptional
  • head_shaCommitHash (string) or nulloptionalThe commit the index was last built from. Absent until the first sync.
  • indexed_atstring or nulloptional
  • source_pathRepoPath (string) or nulloptionalThe directory a in_repo wiki reads from. Absent for a dedicated one.
200 exampleSynthesized example
{
"created_at": "2026-10-10T04:58:27Z",
"default_page": "default-page-e512",
"enabled": true,
"page_count": 1,
"scope_id": "56f1024c-6475-455f-bfe8-ab0bf8156d6c",
"scope_type": "group",
"source": "dedicated",
"updated_at": "2026-10-11T15:03:21Z",
"wiki_id": "b8189d5e-8039-4286-a343-8a61102a5ce8",
"clone_url": "https://gitmoap.example/acme/8fe65fe5",
"created_by": {
"email": "lin@acme.example",
"id": "id-18ae",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/35add132"
},
"head_sha": "a08620f3a38474ed92d6d321c1aa11a1c5fe427e",
"indexed_at": "2026-10-16T12:54:20Z",
"source_path": "source-path-14e9"
}
400An in-repo wiki must name the directory it reads fromapplication/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-2303",
"message": "Stream pipeline status into the run header"
}
}
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-c8b2",
"message": "Pin a page's payload to the build that rendered it"
}
}
403Maintainer is required to change a wiki's settingsapplication/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-ac1a",
"message": "Draw the region map from operation density"
}
}
404No such scope, or it is not visible to the callerapplication/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-1fb6",
"message": "Draw the region map from operation density"
}
}
409The request conflicts with the resource's current state; `reason` says howapplication/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-8538",
"message": "Pin a page's payload to the build that rendered it"
}
}

CLI

gitmoap wiki update-repo-wiki

  • --repo-ididRepository ID (id or owner/repo path)
  • --default-pagestringoptional
  • --enabledflagoptional
  • --sourcededicated | in_repooptional
  • --source-pathstringoptional