Reference
API
HTTP routes for reading artifacts and workspace pages, plus the signed-in artifact creation endpoint.
Overview
MiraDock's public HTTP surface is intentionally small. Use artifact URLs for browser-readable output, workspace redirects for app entry points, and the MCP server for agent read/write workflows. Production base URL is https://miradock.com.
Authentication
Artifact and workspace page routes use the current app session when content is private, and return 404 when content is missing or not viewable. The artifact creation endpoint requires a signed-in app session. Bearer-token MCP authentication is handled by POST /mcp, not by these browser routes.
Endpoints
GET /a/[slug]
Renders a standalone artifact by its public slug.
| Path or body parameters | Response | Status codes |
|---|---|---|
| slug: artifact slug | text/html; charset=utf-8 | 200 success; 404 not found or not viewable |
GET /artifacts/[pageId]
Renders a standalone artifact by its artifact page id.
| Path or body parameters | Response | Status codes |
|---|---|---|
| pageId: artifact page UUID | text/html; charset=utf-8 | 200 success; 404 not found or not viewable |
GET /b/[slug]
Redirects to the signed-in app view for a workspace.
| Path or body parameters | Response | Status codes |
|---|---|---|
| slug: workspace slug | 308 redirect to /app/buckets/[slug] | 308 redirect |
GET /b/[slug]/[pageSlug]
Redirects to the signed-in app view for one workspace page.
| Path or body parameters | Response | Status codes |
|---|---|---|
| slug: workspace slug; pageSlug: page slug | 308 redirect to /app/buckets/[slug]/[pageSlug] | 308 redirect |
POST /api/artifacts/pages
Creates a Markdown artifact in the signed-in user's default workspace.
| Path or body parameters | Response | Status codes |
|---|---|---|
| JSON body: title, slug, body_markdown, summary | application/json containing the created part, collection, and artifact_url | 201 created; 400 validation error; 401 unauthenticated; 403 forbidden; 404 default workspace not found; 409 slug conflict |
{
"title": "Artifact title",
"slug": "artifact-slug",
"body_markdown": "# Artifact body",
"summary": "Optional summary"
}CORS
The documented browser routes are same-origin app routes. Use MCP for cross-client agent access, because MCP carries its own bearer or OAuth authentication contract.