Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.
get_api_artifactsOne API's artifacts, grouped by type.
get_openapiThe primary OpenAPI for this API.
find_similar_apisAPIs that look like this one.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/usebrains-app:usebrains-app-wiki-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: brains Wiki API
version: 1.0.0
description: API-first interface for the brains second-brain wiki. OAuth 2.0 authorization-code flow is designed for ChatGPT Actions and Claude integrations.
servers:
- url: https://lets.usebrains.app
security:
- ApiKeyAuth: []
- OAuth2:
- wiki.read
- wiki.write
tags:
- name: Wiki
paths:
/api/v1/pages:
get:
tags:
- Wiki
summary: List pages
parameters:
- name: tag
in: query
schema:
type: string
- name: status
in: query
schema:
type: string
enum:
- active
- archived
- draft
responses:
'200':
description: Pages list
operationId: getApiV1Pages
x-operation-id-source: derived
post:
tags:
- Wiki
summary: Create page
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/create_pageInput'
responses:
'200':
description: Create result
operationId: postApiV1Pages
x-operation-id-source: derived
/api/v1/pages/batch:
post:
tags:
- Wiki
summary: Create pages batch
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/create_pagesInput'
responses:
'200':
description: Batch result
operationId: postApiV1PagesBatch
x-operation-id-source: derived
/api/v1/pages/{name}/backlinks:
get:
tags:
- Wiki
summary: List backlinks for a page
parameters:
- name: name
in: path
required: true
schema:
type: string
- name: userId
in: query
required: false
schema:
type: string
description: 'Admin (api-key) only: query a specific user''s link graph.'
responses:
'200':
description: Backlink source pages
'403':
description: userId override requires api-key authentication
operationId: getApiV1PagesByNameBacklinks
x-operation-id-source: derived
/api/v1/pages/{name}/related:
get:
tags:
- Wiki
summary: List related pages (shared outbound targets)
parameters:
- name: name
in: path
required: true
schema:
type: string
- name: userId
in: query
required: false
schema:
type: string
description: 'Admin (api-key) only: query a specific user''s link graph.'
responses:
'200':
description: Related pages
'403':
description: userId override requires api-key authentication
operationId: getApiV1PagesByNameRelated
x-operation-id-source: derived
/api/v1/page:
get:
tags:
- Wiki
summary: Read page
parameters:
- name: name
in: query
required: true
schema:
type: string
responses:
'200':
description: Page
operationId: getApiV1Page
x-operation-id-source: derived
put:
tags:
- Wiki
summary: Update page (full rewrite)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/update_pageInput'
responses:
'200':
description: Update result
operationId: putApiV1Page
x-operation-id-source: derived
patch:
tags:
- Wiki
summary: Patch page
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/patch_pageInput'
responses:
'200':
description: Patch result
operationId: patchApiV1Page
x-operation-id-source: derived
/api/v1/page/move:
post:
tags:
- Wiki
summary: Archive or rename page
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/move_pageInput'
responses:
'200':
description: Move result
operationId: postApiV1PageMove
x-operation-id-source: derived
/api/v1/search:
get:
tags:
- Wiki
summary: Search pages
parameters:
- name: query
in: query
required: true
schema:
type: string
- name: tag
in: query
schema:
type: string
- name: maxCandidates
in: query
schema:
type: integer
- name: maxResults
in: query
schema:
type: integer
- name: maxConcurrency
in: query
schema:
type: integer
- name: rerank
in: query
schema:
type: boolean
description: Set true to reorder the top lexical matches by relevance (Jev). Each result gets a 'relevance' value from 0 to 1. The rerank runs only for paid tiers (solo, pro, unlimited). For other tiers, rerank.reason is 'not_entitled'. If the rerank is not available, the response has reranked=false and the lexical order. The search does not fail.
- name: minRelevance
in: query
schema:
type: number
minimum: 0
maximum: 1
description: Applies only when the rerank runs. If the best result has a relevance below this value, the response has no results and abstained=true.
responses:
'200':
description: Search result
operationId: getApiV1Search
x-operation-id-source: derived
/api/v1/logs:
post:
tags:
- Wiki
summary: Append log entry
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/append_logInput'
responses:
'200':
description: Log write result
operationId: postApiV1Logs
x-operation-id-source: derived
/api/v1/links/extract:
post:
tags:
- Wiki
summary: Extract and index wiki links for stale pages
description: Processes only pages matching tags/folder filters where link metadata is missing or stale. Admin (api-key) callers may pass userId to backfill another user's pages.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
tags:
type: array
items:
type: string
folder:
type: string
userId:
type: string
description: 'Admin (api-key) only: target a specific user''s pages.'
responses:
'200':
description: Extraction summary
'400':
description: Missing required filter parameter
'403':
description: userId override requires api-key authentication
operationId: postApiV1LinksExtract
x-operation-id-source: derived
/api/v1/links/suggest:
post:
tags:
- Wiki
summary: Suggest cross-reference links for pages missing a Related pages section
description: Finds pages that lack a '## Related pages' section and returns ready-to-apply markdown patches suggesting cross-references. Uses the link graph when available; falls back to tag-overlap heuristics. Never writes — all patches require explicit review and confirmation.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
tags:
type: array
items:
type: string
folder:
type: string
maxPages:
type: number
description: Maximum candidate pages to analyze (default 20, max 50).
responses:
'200':
description: Link suggestion result with patches
'400':
description: Missing required filter parameter
operationId: postApiV1LinksSuggest
x-operation-id-source: derived
/api/v1/import:
post:
tags:
- Wiki
summary: Import source brain documents
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/import_brain_sourceInput'
responses:
'200':
description: Import result
operationId: postApiV1Import
x-operation-id-source: derived
/api/v1/export:
post:
tags:
- Wiki
summary: Export wiki to ZIP archive
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/export_wikiInput'
responses:
'200':
description: Export result
operationId: postApiV1Export
x-operation-id-source: derived
/api/v1/export/download:
get:
tags:
- Wiki
summary: Download wiki export ZIP (async)
description: Enqueues a background export job and returns immediately. Poll GET /api/v1/jobs/{jobId} until status is 'done', then fetch the ZIP from GET /api/v1/jobs/{jobId}/download.
parameters:
- name: folder
in: query
required: false
schema:
type: string
description: Optional path prefix filter (e.g. projects/brainsapp).
- name: tags
in: query
required: false
schema:
type: string
description: Optional comma-separated tags filter.
- name: includeSystem
in: query
required: false
schema:
type: boolean
default: false
description: Include system files (index.md, log.md). Defaults to false.
- name: since
in: query
required: false
schema:
type: string
format: date-time
description: ISO 8601 datetime — only include pages modified after this time (delta export).
responses:
'202':
description: Export job queued. Poll GET /api/v1/jobs/{jobId} for status, then GET /api/v1/jobs/{jobId}/download for the ZIP.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
jobId:
type: string
status:
type: string
pollUrl:
type: string
downloadUrl:
type: string
'400':
description: Invalid query parameter
'401':
description: Missing or invalid authentication
operationId: getApiV1ExportDownload
x-operation-id-source: derived
/api/v1/import-zip:
post:
tags:
- Wiki
summary: Import wiki from ZIP archive
description: Accepts zipData (base64) or zipPath (server-local path). Request body is capped at 64MB — the same effective limit as POST /api/v1/import-zip/upload. Base64 adds ~33% overhead over the raw ZIP, so archives near the cap should use the upload route instead.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/import_wikiInput'
responses:
'200':
description: Import result
'400':
description: Invalid arguments, or neither zipData nor zipPath provided
'401':
description: Missing or invalid authentication
'413':
description: Payload too large (over 64MB) — use POST /api/v1/import-zip/upload for archives near this size
operationId: postApiV1ImportZip
x-operation-id-source: derived
/api/v1/import-zip/upload:
post:
tags:
- Wiki
summary: Import wiki from uploaded ZIP bytes
parameters:
- name: execute
in: query
required: false
schema:
type: boolean
default: true
description: If false, returns preview diff only. Defaults to true.
- name: conflictStrategy
in: query
required: false
schema:
type: string
enum:
- skip
- overwrite
- merge
default: merge
description: Conflict handling strategy. Defaults to merge.
- name: includeSystem
in: query
required: false
schema:
type: boolean
default: false
description: Include system files (index.md, log.md). Defaults to false.
- name: mode
in: query
required: false
schema:
type: string
enum:
- additive
- replace
default: additive
description: Import mode. replace mirrors ZIP and deletes pages missing from ZIP.
- name: logTiming
in: query
required: false
schema:
type: boolean
default: false
description: If true, appends a log entry to log.md after a successful execute run. Defaults to false.
requestBody:
required: true
content:
application/zip:
schema:
type: string
format: binary
responses:
'202':
description: Job queued (both preview and execute). Poll GET /api/v1/jobs/{jobId} for result.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
jobId:
type: string
status:
type: string
pollUrl:
type: string
'400':
description: Invalid query parameter
'401':
description: Missing or invalid authentication
'413':
description: Payload too large
'415':
description: Unsupported media type
operationId: postApiV1ImportZipUpload
x-operation-id-source: derived
/api/v1/purge:
post:
tags:
- Wiki
summary: Purge all wiki pages
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/purge_wikiInput'
responses:
'200':
description: Dry-run result (confirm=false)
'202':
description: Purge job queued (confirm=true). Poll GET /api/v1/jobs/{jobId} for result.
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
jobId:
type: string
status:
type: string
pollUrl:
type: string
operationId: postApiV1Purge
x-operation-id-source: derived
/api/v1/jobs/{jobId}:
get:
tags:
- Wiki
summary: Get async job status and result
parameters:
- name: jobId
in: path
required: true
schema:
type: string
description: Job ID returned by an async import or purge endpoint.
responses:
'200':
description: Job status
content:
application/json:
schema:
type: object
properties:
ok:
type: boolean
job:
type: object
properties:
id:
type: string
kind:
type: string
enum:
- import
- import-preview
- export
- purge
status:
type: string
enum:
- queued
- running
- done
- failed
progress:
type: object
properties:
processed:
type: integer
total:
type: integer
phase:
type: string
result:
type: object
error:
type: string
startedAt:
type: string
completedAt:
type: string
'401':
description: Missing or invalid authentication
'404':
description: Job not found or expired (jobs expire after 1 hour)
operationId: getApiV1JobsByJobId
x-operation-id-source: derived
/api/v1/jobs/{jobId}/download:
get:
tags:
- Wiki
summary: Download the binary result of a completed async job
parameters:
- name: jobId
in: path
required: true
schema:
type: string
description: Job ID returned by an async export endpoint.
responses:
'200':
description: Binary file (e.g. ZIP archive for export jobs)
content:
application/zip:
schema:
type: string
format: binary
'401':
description: Missing or invalid authentication
'404':
description: Job not found, expired, or has no binary result
'409':
description: Job is not yet done — poll /api/v1/jobs/{jobId} first
operationId: getApiV1JobsByJobIdDownload
x-operation-id-source: derived
components:
schemas:
update_pageInput:
type: object
properties:
name:
type: string
fileId:
type: string
revision:
type: string
body:
type: string
frontmatterPatch: {}
summary:
type: string
required:
- name
- revision
- body
export_wikiInput:
type: object
properties:
outputPath:
type: string
includeSystem:
type: boolean
folder:
type: string
tags:
type: array
items:
type: string
import_brain_sourceInput:
type: object
properties:
sourceRoot:
type: string
execute:
type: boolean
maxFiles:
type: number
skipRawCatalogs:
type: boolean
excludeDirs:
type: array
items:
type: string
chunkSize:
type: number
runLabel:
type: string
logTiming:
type: boolean
previewLimit:
type: number
required:
- sourceRoot
append_logInput:
type: object
properties:
type:
type: string
enum:
- ingest
- query
- update
- create
- move
- lint
- error
title:
type: string
detail:
type: string
required:
- type
- title
create_pageInput:
type: object
properties:
name:
type: string
title:
type: string
body:
type: string
tags:
type: array
items:
type: string
summary:
type: string
required:
- name
- title
- body
move_pageInput:
type: object
properties:
name:
type: string
action:
type: string
enum:
- archive
- rename
newName:
type: string
required:
- name
- action
purge_wikiInput:
type: object
properties:
confirm:
type: boolean
exportBeforeDelete:
type: boolean
exportOutputPath:
type: string
includeSystem:
type: boolean
create_pagesInput:
type: object
properties:
pages:
type: array
items:
type: object
properties:
name:
type: string
title:
type: string
body:
type: string
tags:
type: array
items:
type: string
summary:
type: string
required:
- name
- title
- body
verbose:
type: boolean
runLabel:
type: string
logTiming:
type: boolean
required:
- pages
import_wikiInput:
type: object
properties:
zipData:
type: string
zipPath:
type: string
execute:
type: boolean
mode:
type: string
enum:
- additive
- replace
conflictStrategy:
type: string
enum:
- skip
- overwrite
- merge
folder:
type: string
confirmWholeWiki:
type: boolean
includeSystem:
type: boolean
logTiming:
type: boolean
patch_pageInput:
type: object
properties:
name:
type: string
operations:
type: array
items: {}
summary:
type: string
required:
- name
- operations
securitySchemes:
OAuth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://lets.usebrains.app/oauth/authorize
tokenUrl: https://lets.usebrains.app/oauth/token
scopes:
wiki.read: Read wiki content and metadata
wiki.write: Create, update, patch, and move wiki content
ApiKeyAuth:
type: apiKey
in: header
name: x-api-key
x-tools:
- name: list_pages
summary: List Pages
description: 'List wiki pages with optional filtering by tag or status. PRIMARY routing tool: call list_pages first to get a full inventory. When running with Supabase/Postgres index enabled, this is fast with no file reads; otherwise it falls back to a storage scan. Use the returned names to select candidates, then read_page only those candidates.'
inputSchema:
type: object
properties:
tag:
type: string
status:
type: string
enum:
- active
- archived
- draft
folder:
type: string
compact:
type: boolean
limit:
type: number
offset:
type: number
- name: read_page
summary: Read Page
description: 'Read a wiki page by filename, returning content, frontmatter, fileId, revision, and outbound_link_count. If you already pulled a session bundle, do NOT call this for any page listed in that bundle — its full content is already in your context; read it from there. Otherwise the REQUIRED retrieval workflow is: (1) list_pages first to get inventory, (2) LLM selects candidate files from results, (3) read_page only those candidates, (4) LLM performs synthesis. Do NOT read index.md for routing — when Supabase/Postgres index is enabled the DB index is authoritative; otherwise use list_pages. For small edits, prefer patch_page (especially replace_lines). Use update_page only for intentional full-body rewrites. Pages above the 100 KB inline cap (some pages predate the cap and are still legally larger) come back with `truncated: true` and a `size` field (full byte length) instead of the full body — the returned `content` is a valid head slice you can still use as a `find` anchor for patch_page. `truncated` does NOT mean the page is unwritable; patch_page (especially `append`) works on it regardless of size.'
inputSchema:
type: object
properties:
name:
type: string
required:
- name
- name: search_pages
summary: Search Pages
description: Full-text search across wiki pages. Uses Postgres FTS when Supabase/Postgres index is enabled (fast); falls back to a local scan otherwise. Use for keyword lookups; use list_pages for full inventory and routing. Set rerank=true to reorder the top matches by relevance. Each result then has a relevance value from 0 to 1. The rerank runs only for paid tiers (solo, pro, unlimited). For other tiers, rerank.reason is 'not_entitled'. If the rerank is not available, search returns the lexical order and reranked=false.
inputSchema:
type: object
properties:
query:
type: string
tag:
type: string
folder:
type: string
maxCandidates:
type: number
maxResults:
type: number
maxConcurrency:
type: number
rerank:
type: boolean
minRelevance:
type: number
required:
- query
- name: create_page
summary: Create Page
description: 'Create a new wiki page with frontmatter and body content. Name is auto-normalized to a wiki-safe .md path. Returns bytesWritten (UTF-8 byte count of the written file). Ingest responsibility rule: if source material contains stable facts, active tasks, and decisions, you MUST split it across taxonomy folders (canonical/, projects/, decisions/) and keep data/ as raw synthesis only.'
inputSchema:
type: object
properties:
name:
type: string
title:
type: string
body:
type: string
tags:
type: array
items:
type: string
summary:
type: string
required:
- name
- title
- body
- name: create_pages
summary: Create Pages
description: Create multiple pages in one call (fast path for ingest decomposition into canonical/projects/decisions/data). Returns compact timing/count summary by default; set verbose=true for per-page results. Response includes totalBytesWritten (sum of UTF-8 bytes across all created pages) and per-page bytesWritten when verbose=true.
inputSchema:
type: object
properties:
pages:
type: array
items:
type: object
properties:
name:
type: string
title:
type: string
body:
type: string
tags:
type: array
items:
type: string
summary:
type: string
required:
- name
- title
- body
verbose:
type: boolean
runLabel:
type: string
logTiming:
type: boolean
required:
- pages
- name: import_brain_source
summary: Import Brain Source
description: Deterministic importer for source brain folders. Supports preview mode (execute=false) and execute mode (execute=true) with folder-based routing and car-profile consolidation.
inputSchema:
type: object
properties:
sourceRoot:
type: string
execute:
type: boolean
maxFiles:
type: number
skipRawCatalogs:
type: boolean
excludeDirs:
type: array
items:
type: string
chunkSize:
type: number
runLabel:
type: string
logTiming:
type: boolean
previewLimit:
type: number
required:
- sourceRoot
- name: export_wiki
summary: Export Wiki
description: Export wiki pages to a ZIP archive. Without outputPath, the server returns a downloadUrl on the issuing deployment. Send GET to this URL without another credential. The token grants access to that archive for 24 hours. Keep the URL private. Repeat calls within that period reuse the archive. With outputPath, the server writes the ZIP to that path instead. Optional filters select a folder prefix or any matching tag.
inputSchema:
type: object
properties:
outputPath:
type: string
includeSystem:
type: boolean
folder:
type: string
tags:
type: array
items:
type: string
- name: import_wiki
summary: Import Wiki
description: 'Import a wiki from a ZIP archive. Agent-friendly: pass zipData (a base64-encoded ZIP, e.g. downloaded from export_wiki''s downloadUrl and re-encoded) instead of zipPath for fully agent-reachable round-trips. Supports preview (execute=false) and execute (execute=true). Modes: mode=''additive'' updates/creates ZIP pages without deleting others; mode=''replace'' mirrors the ZIP exactly (imports all ZIP pages and deletes pages absent from the ZIP, always overwrite). When execute applies changes, response includes instructionRefreshRequired/discoveredFolders/nextAction hints for instruction refresh.'
inputSchema:
type: object
properties:
zipData:
type: string
zipPath:
type: string
execute:
type: boolean
mode:
type: string
enum:
- additive
- replace
conflictStrategy:
type: string
enum:
- skip
- overwrite
- merge
folder:
type: string
confirmWholeWiki:
type: boolean
includeSystem:
type: boolean
logTiming:
type: boolean
- name: pull_session_bundle
summary: Pull Session Bundle
description: 'Downloads all relevant wiki pages for your project as a single plain-text bundle (no ZIP decode needed). The returned bundle IS your working set: every listed page is included in full, so do NOT call read_page on any of them afterwards. Work locally in this conversation, then push back with push_session_bundle when done. Measured 10.04s of individual read_page calls versus 3.47s for the same ten pages bundled. For a project, prefer folder=projects/<slug> over tags — folder membership is structural and cannot drift, whereas tags are hand-maintained and frequently incomplete (measured on a real wiki: tags returned 0 of 39 pages for one project and 2 of 49 for another, while the folder selector returned all of them). Use tags only for cross-cutting themes that span folders. If you do not know the project slug, do NOT guess one: list_pages with folder=''projects'' shows the available projects — resolve the slug first, then pull. Leave maxBytes at its default unless you need a smaller slice. The default already matches the largest response this transport can carry without dropping the connection. A value above that hard cap returns an error, not a slice. Paginate via nextCursor to reach the rest of a large folder. Each entry in the returned ''pages'' array includes a ''revision'' — pass it back on the matching page in push_session_bundle''s pages mode to get conflict protection against other concurrent writers (e.g. a shared project).'
inputSchema:
type: object
properties:
folder:
type: string
tags:
type: array
items:
type: string
query:
type: string
includeSystem:
type: boolean
cursor:
type: string
maxBytes:
type: number
maxPages:
type: number
session_audience:
type: string
enum:
- internal
- client-safe
- public
# --- truncated at 32 KB (48 KB total) ---
# Full source: https://artifacts.apis.io/usebrains-app/openapi/usebrains-app-wiki-api-openapi.yml