API Reference
The PocketPaw web dashboard exposes a comprehensive REST API for managing channels, sessions, MCP servers, memory, security, and more. All endpoints are served by the FastAPI backend.
Base URL
http://localhost:8000Endpoint Groups
Channels
Start, stop, and configure messaging channels (Discord, Slack, WhatsApp, Telegram, etc.)
Sessions
List, search, rename, and delete chat sessions.
MCP Servers
Add, remove, toggle, and test Model Context Protocol servers.
Memory
Manage long-term memories, memory settings, and backend statistics.
Security
View audit logs, run security audits, and manage self-audit reports.
Authentication
Session tokens, QR login, OAuth flows, and token management.
Webhooks
Manage inbound webhook slots and external platform webhooks.
Tunnel
Start and stop Cloudflare tunnels for remote access.
Authentication
Most API endpoints require authentication. PocketPaw supports multiple auth methods:
curl http://localhost:8000/api/sessions \ -H "Authorization: Bearer your-access-token"curl "http://localhost:8000/api/sessions?token=your-access-token"Requests from 127.0.0.1 or ::1 bypass auth automatically (unless a Cloudflare tunnel is active).
Auth-exempt paths: /webhook/*, /oauth/callback, /api/qr, /static/*, /favicon.ico
Quick Reference
Channels
| Method | Endpoint | Description |
|---|---|---|
GET | /api/channels/status | Get all channel statuses |
POST | /api/channels/save | Save channel configuration |
POST | /api/channels/toggle | Start or stop a channel |
Sessions
| Method | Endpoint | Description |
|---|---|---|
GET | /api/sessions | List all sessions |
GET | /api/sessions/search | Search sessions |
DELETE | /api/sessions/{id} | Delete a session |
POST | /api/sessions/{id}/title | Rename a session |
GET | /api/memory/session | Get session messages |
MCP Servers
| Method | Endpoint | Description |
|---|---|---|
GET | /api/mcp/status | Get MCP server statuses |
POST | /api/mcp/add | Add an MCP server |
POST | /api/mcp/remove | Remove an MCP server |
POST | /api/mcp/toggle | Enable/disable MCP server |
POST | /api/mcp/test | Test server connection |
GET | /api/mcp/presets | List available presets |
POST | /api/mcp/presets/install | Install a preset |
Memory
| Method | Endpoint | Description |
|---|---|---|
GET | /api/memory/long_term | List long-term memories |
DELETE | /api/memory/long_term/{id} | Delete a memory entry |
GET | /api/memory/settings | Get memory config |
POST | /api/memory/settings | Update memory config |
GET | /api/memory/stats | Get memory statistics |
Security & Audit
| Method | Endpoint | Description |
|---|---|---|
GET | /api/audit | Get audit log entries |
POST | /api/security-audit | Run security audit |
GET | /api/self-audit/reports | List audit reports |
GET | /api/self-audit/reports/{date} | Get specific report |
POST | /api/self-audit/run | Trigger self-audit |
Authentication & OAuth
| Method | Endpoint | Description |
|---|---|---|
POST | /api/auth/session | Get session token |
GET | /api/qr | Generate QR login code |
POST | /api/token/regenerate | Regenerate access token |
GET | /api/oauth/authorize | Start OAuth flow |
Webhooks
| Method | Endpoint | Description |
|---|---|---|
GET | /api/webhooks | List webhook slots |
POST | /api/webhooks/add | Create webhook slot |
POST | /api/webhooks/remove | Remove webhook slot |
POST | /webhook/inbound/{name} | Receive webhook payload |
Tunnel
| Method | Endpoint | Description |
|---|---|---|
GET | /api/remote/status | Get tunnel status |
POST | /api/remote/start | Start Cloudflare tunnel |
POST | /api/remote/stop | Stop tunnel |