REST API reference
All endpoints are under /api/v1/. Requests and responses are JSON.
See API keys for how to get a token.
Authentication
Send an API key in the Authorization header:
Authorization: Bearer ghk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Requests without a valid key return 401. Keys inherit the owning user's
permissions — anything the user can do through the web UI, the key can do via the API.
Endpoints
GET /api/v1/me
Verify the token and return the authenticated user.
curl -H "Authorization: Bearer $GITHUME_TOKEN" \
https://your-host/api/v1/me
{"id": 1, "username": "alice", "email": null}
GET /api/v1/repos
List repositories.
{"repos": [{"owner": "alice", "name": "notes", "description": null}]}
GET /api/v1/repos/{owner}/{name}
Metadata for a single repo, including default branch and wiki root.
{"owner": "alice", "name": "notes", "default_branch": "master", "wiki_root": "docs/wiki", "description": null}
GET /api/v1/repos/{owner}/{name}/wiki
List wiki page slugs under the repo's wiki root.
{"slugs": ["home", "design"], "wiki_root": "docs/wiki", "branch": "master"}
GET /api/v1/repos/{owner}/{name}/wiki/{slug}
Fetch raw markdown content of a single wiki page.
{"slug": "home", "content": "# Home\n\nWelcome", "branch": "master"}
PUT /api/v1/repos/{owner}/{name}/wiki/{slug}
Create or update a wiki page. Commits to the default branch.
curl -X PUT -H "Authorization: Bearer $GITHUME_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "# Home\n\nHello world", "commit_message": "bot: refresh home"}' \
https://your-host/api/v1/repos/alice/notes/wiki/home
{"slug": "home", "created": false, "updated": true}
DELETE /api/v1/repos/{owner}/{name}/wiki/{slug}
Remove a wiki page. Returns 404 if it doesn't exist.
{"slug": "old-draft", "deleted": true}
Errors
401— missing or invalid key403— user inactive404— repo or page not found400— bad slug or missing fields
All errors return {"detail": "..."} in JSON.