Krafa
Dashboard
Dashboard
Getting Started
QuickstartHow it works
The Canvas
Canvas overviewPasting and node typesOrganizing a boardCommand menuKeyboard shortcuts
Design Taste
Taste memoriesExtractionConflictsCurating your profile
Using with Agents
Connecting an agentMCP server referenceClaude CodeCursorCodexKiroAntigravity
Imports
Imports overviewXPinterestDribbble
Reference
Plans and billingHTTP APISelf-hostingFAQ
KrafaAll systems operational
Reference

HTTP API

Every endpoint the Krafa backend exposes, covering boards, memories, files, and the MCP handler.

The HTTP API is what the Krafa web app talks to. It's documented here for self-hosters and for anyone scripting against their own instance.

Note

Everything except the MCP endpoint authenticates with a session cookie from Better Auth; there is no separate API key. The one credential designed for outside use is a board's MCP token, and it only works against /api/mcp. If you want programmatic read access to a taste profile, use MCP.

Requests without a valid session return 401 { "error": "unauthorized" }.

Boards

MethodPathPurpose
GET/api/boardsList your boards
POST/api/boardsCreate a board. { name? }, defaults to Untitled
GET/api/boards/:idFetch one board with its nodes
PUT/api/boards/:idUpdate { nodes?, name? }
DELETE/api/boards/:idDelete a board and everything it owns
GET/api/boards/:id/shareRead sharing settings
PUT/api/boards/:id/shareSet { visibility, userIds? }
POST/api/boards/:id/mcp-tokenMint or return the board's MCP token

PUT /api/boards/:id is what the canvas autosave calls, sending the full node array on a debounce.

Rotating an MCP token

curl -X POST https://app.krafa.ai/api/boards/BOARD_ID/mcp-token \
  -H "Content-Type: application/json" \
  -d '{"regenerate": true}'

Without regenerate, the endpoint returns the existing token or mints one if the board has none. With it, the old token stops working immediately and every agent configured with it starts returning invalid token.

Rotation isn't currently surfaced in the app UI; this endpoint is the way to do it.

Memories

Scoped under a board. See Taste memories for what the fields mean.

MethodPathPurpose
GET/api/boards/:boardId/memoriesList active memories
PUT/api/boards/:boardId/memories/:memoryIdEdit { statement }
DELETE/api/boards/:boardId/memories/:memoryIdDelete a memory
POST/api/boards/:boardId/memories/extractRun extraction for { nodeId, content }
POST/api/boards/:boardId/memories/resolveResolve a conflict
POST/api/boards/:boardId/memories/pruneDelete memories sourced from { nodeIds }

extract returns { memories, conflicts }. On an instance without ANTHROPIC_API_KEY it returns { memories: [], conflicts: [], disabled: true } rather than erroring.

resolve takes { choice, existingMemoryId, incoming, sourceNodeId? } where choice is one of:

choiceEffect
keepNo-op. The existing memory stands
replaceMarks the existing memory superseded and inserts the incoming one
bothKeeps the existing memory and inserts the incoming one alongside it

Files

MethodPathPurpose
POST/api/uploadMultipart upload, field file → { id, url }
GET/api/files/:idStream a file, with range request support

Uploads are capped at 50 MB and stored in S3-compatible object storage.

Content helpers

Used by the canvas to render embeds. All are session-authenticated.

MethodPathPurpose
GET/api/unfurl?url=Extract OG and meta tags for a link preview
GET/api/img?url=Same-origin image proxy, for sources that block cross-origin loads
GET/api/tweet-article/:idFetch article content attached to an X post

Imports

OAuth flows for the import sources. Each connect endpoint takes a boardId so the callback returns you to the board you started from.

MethodPath
GET/api/x/connect?boardId=
GET/api/x/callback
GET/api/x/bookmarks
GET/api/pinterest/connect?boardId=
GET/api/pinterest/callback
GET/api/pinterest/boards
GET/api/pinterest/boards/:id/pins

Access tokens are encrypted at rest with the instance's auth secret.

Auth and health

MethodPathPurpose
GET/POST/api/auth/*Better Auth: magic link, GitHub, Google, organizations, sessions
GET/api/healthLiveness plus a database connectivity check
GET/apiService name and version

MCP

MethodPathPurpose
ALL/api/mcpMCP Streamable HTTP, authenticated by board bearer token

The only endpoint intended for clients outside the app. Full tool schemas are in the MCP server reference.

On this page

BoardsRotating an MCP tokenMemoriesFilesContent helpersImportsAuth and healthMCP