API Reference

ClawIDE exposes HTTP and WebSocket endpoints for all functionality. The HTTP API is primarily consumed by the HTMX frontend, but all endpoints can be called directly.

Global Endpoints

Version

MethodPathDescription
GET/api/versionReturns the ClawIDE version

Dashboard

MethodPathDescription
GET/Renders the main dashboard page

Settings

MethodPathDescription
GET/settingsRenders the settings page
PUT/api/settingsUpdate configuration settings

Onboarding

MethodPathDescription
POST/api/onboarding/completeMark the welcome onboarding as complete
POST/api/onboarding/workspace-tour-completeMark the workspace tour as complete
POST/api/onboarding/resetReset all onboarding state

Static Files

MethodPathDescription
GET/static/*Serves embedded static assets (CSS, JS, vendor libraries)

Bookmarks

Bookmark endpoints use the project_id query parameter to scope results to a specific project.

MethodPathDescription
GET/api/bookmarks?project_id={projectID}List all bookmarks for a project
GET/api/bookmarks?project_id={projectID}&q={query}Search bookmarks by name or URL
POST/api/bookmarksCreate a new bookmark
PUT/api/bookmarks/{bookmarkID}Update a bookmark’s name, URL, or emoji
DELETE/api/bookmarks/{bookmarkID}Delete a bookmark
PATCH/api/bookmarks/{bookmarkID}/starToggle a bookmark’s starred status (max 5 per project)

Notes

Notes can be scoped to a project or kept global (no project_id).

MethodPathDescription
GET/api/notes?project_id={projectID}List notes for a project
GET/api/notes?q={query}Search notes by title or content
POST/api/notesCreate a new note
PUT/api/notes/{noteID}Update a note’s title or content
DELETE/api/notes/{noteID}Delete a note

Notifications

MethodPathDescription
GET/api/notificationsList all notifications (newest first)
GET/api/notifications?unread_only=trueList unread notifications only
POST/api/notificationsCreate a notification
GET/api/notifications/unread-countGet the unread notification count
GET/api/notifications/streamSSE stream for real-time notification delivery
PATCH/api/notifications/{notifID}/readMark a notification as read
POST/api/notifications/read-allMark all notifications as read
DELETE/api/notifications/{notifID}Delete a notification

The SSE stream at /api/notifications/stream sends events in the following format:

event: notification
data: {"id":"...","title":"...","level":"info","read":false,...}

A keepalive ping is sent every 15 seconds. The server buffers up to 50 events per client.

System Statistics

MethodPathDescription
GET/api/system/statsReturns current CPU, memory, network, session, and project metrics

Auto-Update

MethodPathDescription
GET/api/update/checkForce an immediate update check against GitHub releases
GET/api/update/statusGet the cached update state (version, availability, last check)
POST/api/update/applyDownload, verify (SHA-256), and install the latest release

Claude Code Hooks

MethodPathDescription
GET/api/claude/detectCheck if the Claude CLI is installed
POST/api/claude/setup-hookInstall the stop hook script and configure Claude settings
DELETE/api/claude/hookRemove the hook script and clean up Claude settings

VoiceBox

VoiceBox endpoints are global and not scoped to a project.

MethodPathDescription
GET/api/voiceboxList all voice entries
POST/api/voiceboxCreate a new voice entry
DELETE/api/voicebox/{entryID}Delete a specific voice entry
DELETE/api/voiceboxDelete all voice entries

Snippets

Snippet endpoints are global and not scoped to a project.

MethodPathDescription
GET/api/snippets/List all code snippets
POST/api/snippets/Create a new code snippet
PUT/api/snippets/{snippetID}Update an existing snippet
DELETE/api/snippets/{snippetID}Delete a snippet

Project Endpoints

Projects

MethodPathDescription
GET/projects/List all projects
POST/projects/Create a new project
GET/projects/{id}/Render the project workspace
DELETE/projects/{id}/Delete a project

All routes under /projects/{id}/ pass through the ProjectLoader middleware, which loads the project from the store into the request context.

Sessions

MethodPathDescription
GET/projects/{id}/sessions/List all sessions for a project
POST/projects/{id}/sessions/Create a new terminal session
PATCH/projects/{id}/sessions/{sid}/Rename a session
DELETE/projects/{id}/sessions/{sid}/Delete a session and its panes

Panes

Pane operations are scoped to a specific session.

MethodPathDescription
POST/projects/{id}/sessions/{sid}/panes/{pid}/splitSplit a pane (horizontal or vertical)
DELETE/projects/{id}/sessions/{sid}/panes/{pid}Close a pane
PATCH/projects/{id}/sessions/{sid}/panes/{pid}/resizeResize a pane

Files

MethodPathDescription
GET/projects/{id}/api/filesList files and directories in the project
GET/projects/{id}/api/fileRead a file’s contents
PUT/projects/{id}/api/fileWrite (save) a file

Docker

MethodPathDescription
GET/projects/{id}/api/docker/psList Docker Compose service status
POST/projects/{id}/api/docker/upStart all Docker Compose services (docker compose up -d)
POST/projects/{id}/api/docker/downStop all Docker Compose services (docker compose down)
POST/projects/{id}/api/docker/{svc}/startStart a specific service
POST/projects/{id}/api/docker/{svc}/stopStop a specific service
POST/projects/{id}/api/docker/{svc}/restartRestart a specific service

Git

MethodPathDescription
GET/projects/{id}/api/worktreesList all git worktrees
POST/projects/{id}/api/worktreesCreate a new worktree
DELETE/projects/{id}/api/worktrees/{wid}Delete a worktree
GET/projects/{id}/api/branchesList all git branches
POST/projects/{id}/api/branchesCreate a new branch
POST/projects/{id}/api/checkoutCheckout a branch
POST/projects/{id}/api/pull-mainPull latest changes from the main branch

Ports

MethodPathDescription
GET/projects/{id}/api/portsDetect and list listening ports for the project

Features (Worktree Workspaces)

Feature endpoints create self-contained workspaces backed by git worktrees.

MethodPathDescription
POST/projects/{id}/features/Create a new feature workspace
GET/projects/{id}/features/{fid}/Open a feature workspace
DELETE/projects/{id}/features/{fid}/Delete a feature workspace
POST/projects/{id}/features/{fid}/sessions/Create a session in the feature workspace

Feature File Operations

MethodPathDescription
GET/projects/{id}/features/{fid}/api/filesList files in the feature worktree
GET/projects/{id}/features/{fid}/api/fileRead a file from the feature worktree
PUT/projects/{id}/features/{fid}/api/fileWrite a file in the feature worktree

Feature Git Operations

MethodPathDescription
GET/projects/{id}/features/{fid}/api/statusGet git status for the feature branch
POST/projects/{id}/features/{fid}/api/commitCommit changes in the feature branch
POST/projects/{id}/features/{fid}/api/mergeMerge the feature branch back to the parent
POST/projects/{id}/features/{fid}/api/pull-mainPull latest main branch changes into the feature branch

WebSocket Endpoints

Terminal

PathDescription
ws://host:port/ws/terminal/{sessionID}/{paneID}Bidirectional terminal I/O for a specific pane

The terminal WebSocket streams binary frames:

  • Client → Server: Keyboard input written to the PTY stdin
  • Server → Client: PTY stdout output sent as binary WebSocket frames

On disconnect, the WebSocket is closed but the underlying PTY/tmux session remains alive for reconnection.

Docker Logs

PathDescription
ws://host:port/ws/docker/{projectID}/logs/{svc}Real-time log streaming for a Docker Compose service

The Docker logs WebSocket streams log output from a specific service. New log lines are pushed to the client as they arrive.

Middleware

All requests pass through a global middleware chain:

MiddlewarePurpose
LoggerLogs all HTTP requests
RecovererRecovers from panics and returns 500
CompressApplies gzip compression to responses
HTMXDetectDetects HX-Request header and sets a context flag
ProjectLoaderLoads project from store for /projects/{id}/* routes

The HTMXDetect middleware enables the template renderer to return partial HTML fragments for HTMX requests and full-page layouts for direct browser navigation.