API Reference
Read and write wiki content via REST API or connect agents via MCP.
Base URL
https://atlas4.ai/api
All wiki endpoints accept both UUID and slug for the wiki ID.
Authentication
Authenticate using a Bearer token in the Authorization header. Generate keys from the "Connect Agent" dialog in any wiki.
Authorization: Bearer ak_YOUR_API_KEY
/api/wikis/:wikiId/manifestreadFull wiki structure in one call — all paths, titles, descriptions, and timestamps.
Response
[
{ "path": "topics/", "type": "folder" },
{ "path": "topics/auth.md", "type": "file", "title": "Authentication", "description": "OAuth2 implementation", "updatedAt": "2026-05-19T14:30:00Z" },
{ "path": "index.md", "type": "file", "title": "Wiki Index", "updatedAt": "2026-05-19T15:00:00Z" }
]/api/wikis/:wikiId/filesreadList immediate children of a folder.
| Param | Type | Description |
|---|---|---|
| folder | string | Folder to list (default: root). Trailing slash optional. |
| recursive | "true" | Return flat list of ALL files under folder. |
Response
[
{ "path": "topics/", "type": "folder" },
{ "path": "index.md", "type": "file", "processing": false }
]/api/wikis/:wikiId/raw/:pathreadRead a page as raw markdown. Start with index.md to understand wiki structure.
Response
Content-Type: text/markdown
--- title: "Authentication System" description: "OAuth2 with PKCE flow" --- ## Overview The authentication system uses OAuth2 with PKCE...
/api/wikis/:wikiId/raw-batchreadRead up to 20 pages in one request.
Request Body
{
"paths": ["index.md", "topics/auth.md", "decisions/sso.md"]
}Response
[
{ "path": "index.md", "content": "---\ntitle: \"Index\"..." },
{ "path": "topics/auth.md", "content": "---\ntitle: \"Auth\"..." },
{ "path": "decisions/sso.md", "content": null }
]Pages that don't exist return content: null.
/api/wikis/:wikiId/searchreadFull-text search. Multi-word queries use AND logic. Wrap in quotes for exact phrase.
| Param | Type | Description |
|---|---|---|
| q | string | Required. Search query. |
| folder | string | Scope to folder path. |
| grouped | "true" | Group results by file with pagination. |
| limit | number | Max files (default 20). With grouped only. |
| offset | number | Pagination offset. With grouped only. |
Response (flat, default)
[
{ "path": "topics/auth.md", "lineNumber": 15, "line": "OAuth2 with PKCE flow" }
]Response (grouped=true)
{
"results": [
{ "path": "topics/auth.md", "matches": [{ "lineNumber": 15, "line": "..." }] }
],
"total": 12,
"hasMore": true
}/api/wikis/:wikiId/meta/:pathreadPage frontmatter without the full body. Useful for freshness checks.
Response
{
"title": "Authentication System",
"description": "OAuth2 implementation",
"updatedAt": "2026-05-19T14:30:00.000Z",
"actorType": "ingestion"
}/api/wikis/:wikiId/files/:pathwriteCreate or update a wiki page.
Request Body
{
"content": "---\ntitle: \"My Page\"\n---\n\nContent here...",
"message": "Updated auth section"
}Response
{
"id": "version-uuid",
"documentId": "doc-uuid",
"actorType": "human",
"message": "Updated auth section",
"status": "published",
"committedAt": "2026-05-19T15:00:00.000Z"
}/api/wikis/:wikiId/contributewriteSubmit text content for AI ingestion. The content will be analyzed and organized into wiki pages automatically. This is the HTTP equivalent of the MCP wiki_contribute tool.
Request Body
{
"title": "Q2 incident report",
"content": "On May 15th, the auth service experienced...",
"filename": "incident-q2.md" // optional
}Response
{
"ingestionId": "ingestion-uuid",
"sourceId": "source-uuid",
"filename": "q2-incident-report.md"
}/api/wikis/:wikiId/files/:pathwritePermanently delete a page and all versions. Cannot delete system files (index.md, SCHEMA.md, log.md).
{ "ok": true, "path": "topics/old-page.md" }/api/wikis/:wikiId/ingestsessionUpload files for AI ingestion. Multipart form data. Supported: .md, .txt, .html, .docx, .json
Content-Type: multipart/form-data files: [document.md, notes.docx]
Response
{
"sourceId": "source-uuid",
"files": [{ "id": "file-uuid", "filename": "document.md", "size": 4521 }],
"ingestionIds": ["ingestion-uuid"]
}MCP Server
Remote MCP server using Streamable HTTP. No local install — agents connect directly via URL.
Connection URL
https://atlas4.ai/mcp/{wikiId}?key={apiKey}Agent Config (Claude Code / .claude/settings.json)
{
"mcpServers": {
"atlas4": {
"url": "https://atlas4.ai/mcp/{wikiId}?key={apiKey}"
}
}
}MCP Tools
| Tool | Params | Description |
|---|---|---|
| wiki_index | — | Read index.md — start here |
| wiki_ls | folder? | List files and folders |
| wiki_cat | path | Read a page by path |
| wiki_grep | query, folder? | Search (AND logic, quotes for phrase) |
| wiki_log | — | Read the change log |
| wiki_contribute | title, content, filename? | Submit content for ingestion (write key) |
Account-Level MCP
A separate MCP endpoint for account-wide operations — managing wikis, tokens, and ingesting across multiple wikis.
Connection URL
https://atlas4.ai/mcp
Authenticate with Authorization: Bearer <account_token> or use the device flow (atlas_signup) to obtain one.
Public Tools (no auth)
| Tool | Params | Description |
|---|---|---|
| atlas_signup | agent_name | Start device flow — get activation URL + poll ID |
| atlas_status | poll_id | Poll activation status, retrieve token when approved |
Authenticated Tools (account token)
| Tool | Params | Description |
|---|---|---|
| atlas_wikis | — | List all wikis you own (with MCP URLs) |
| wiki_create | name, description? | Create a new wiki |
| wiki_write | wiki_id, path, content, message? | Write directly to any wiki page |
| wiki_ingest_text | wiki_id, content, mode?, topic? | Ingest content (quick=append, smart=AI pipeline) |
| wiki_index | wiki_id | Read a wiki's index |
| wiki_cat | wiki_id, path | Read a page from any wiki |
| wiki_grep | wiki_id, query | Search any wiki |
| wiki_ls | wiki_id, path? | List files in any wiki |
| token_create | label, token_scopes, wiki_id?, expires_in_days? | Create a scoped API token |
| token_revoke | token_id | Revoke a token |
Account REST API (equivalent)
All account-level MCP operations are also available via REST. Authenticate with Authorization: Bearer atlas_ak_...
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/account/wikis | List all wikis you own |
| POST | /api/account/wikis | Create wiki: {"name", "description?"} |
| POST | /api/account/tokens | Create token: {"label", "token_scopes", "wiki_id?", "expires_in_days?"} |
| DELETE | /api/account/tokens/:id | Revoke a token |
| POST | /agent/signup | Device flow: {"agent_name"} → activation URL |
| GET | /agent/signup/poll/:id | Poll activation status → token when approved |
/api/wikis/:wikiId/versions/:pathreadVersion history for a page, most recent first.
[
{
"id": "version-uuid",
"actorType": "ingestion",
"message": "Updated from slack-general-2026-05-19.md",
"committedAt": "2026-05-19T14:30:00.000Z"
}
]Errors
| Status | Meaning |
|---|---|
| 400 | Bad request — missing or invalid parameters |
| 401 | Authentication required |
| 402 | Budget exceeded |
| 403 | Insufficient key permissions |
| 404 | Wiki or page not found |
All errors return: { "error": "description" }