PugBase/Docs

Endpoints

Everything the Pugbase MCP server does is a plain HTTPS endpoint too, so any language or HTTP client can use it - read a note's published plan, and push results back into it. Same API keys as the MCP connection.

GET/notes/{workspaceId}/{noteId}

Read a note's published spec (the plan brief), as markdown.

Auth: Any member of the workspace.

Path parameters

workspaceIdrequiredstringFrom the note URL: /w/{workspaceId}/n/{noteId}.
noteIdrequiredstringFrom the note URL.

Response 200

okbooleantrue on success.
note.idstringThe note id.
note.workspaceIdstringThe workspace id.
note.titlestringThe note title (empty string if untitled).
note.specMarkdownstring | nullThe published plan markdown. null until the author presses 'Publish for Claude' on the note.
note.specPublishedAtnumber | nullWhen the spec was last published (epoch milliseconds), or null.
{
  "ok": true,
  "note": {
    "id": "n_8fK2...",
    "workspaceId": "w_3Qd9...",
    "title": "Checkout API",
    "specMarkdown": "# Checkout API\n## Goal\n...",
    "specPublishedAt": 1717200000000
  }
}

Errors

404note-not-foundNo note with that id in the workspace.

Example

curl https://pugbase.io/api/public/notes/WORKSPACE_ID/NOTE_ID \
  -H "Authorization: Bearer pgb_..."
POST/notes/{workspaceId}/{noteId}/results

Push a result (markdown - a QA report, build summary, a mermaid diagram) back into the note.

Auth: Owner or editor of the workspace.

Path parameters

workspaceIdrequiredstringFrom the note URL.
noteIdrequiredstringThe target note the result is appended to.

Request body

markdownrequiredstringThe result body, as markdown. Renders as rich blocks (headings, checklists, code, tables, mermaid). Max 200,000 chars.
titlestringOptional short heading for the result. Max 120 chars.
{
  "markdown": "## QA Report\n\n| Test | Result |\n| --- | --- |\n| Login | Pass |\n| Checkout | Pass |",
  "title": "QA Report"
}

Response 200

okbooleantrue on success.
idstringId of the stored result. It is inserted into the note as blocks the next time an editor opens it.
{ "ok": true, "id": "res_b21..." }

Errors

400invalid-jsonThe request body is not valid JSON.
400empty-markdownmarkdown is missing or blank.
413markdown-too-largemarkdown exceeds 200,000 characters.
404note-not-foundNo note with that id in the workspace.

Example

curl -X POST https://pugbase.io/api/public/notes/WORKSPACE_ID/NOTE_ID/results \
  -H "Authorization: Bearer pgb_..." \
  -H "Content-Type: application/json" \
  -d '{"markdown":"## QA Report\n- [x] Login works","title":"QA Report"}'
PugBase x Claude Code - plan it in PugBase, build it with Claude, review it together.