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
workspaceIdrequired | string | From the note URL: /w/{workspaceId}/n/{noteId}. |
noteIdrequired | string | From the note URL. |
Response 200
ok | boolean | true on success. |
note.id | string | The note id. |
note.workspaceId | string | The workspace id. |
note.title | string | The note title (empty string if untitled). |
note.specMarkdown | string | null | The published plan markdown. null until the author presses 'Publish for Claude' on the note. |
note.specPublishedAt | number | null | When 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
| 404 | note-not-found | No 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}/resultsPush a result (markdown - a QA report, build summary, a mermaid diagram) back into the note.
Auth: Owner or editor of the workspace.
Path parameters
workspaceIdrequired | string | From the note URL. |
noteIdrequired | string | The target note the result is appended to. |
Request body
markdownrequired | string | The result body, as markdown. Renders as rich blocks (headings, checklists, code, tables, mermaid). Max 200,000 chars. |
title | string | Optional 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
ok | boolean | true on success. |
id | string | Id 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
| 400 | invalid-json | The request body is not valid JSON. |
| 400 | empty-markdown | markdown is missing or blank. |
| 413 | markdown-too-large | markdown exceeds 200,000 characters. |
| 404 | note-not-found | No 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"}'