-
-
Notifications
You must be signed in to change notification settings - Fork 2
API Reference
This page documents the REST API endpoints exposed by ɳSelf plugins. These endpoints are internal to your ɳSelf stack and accessed via Nginx reverse proxy. All endpoints require authentication unless noted otherwise.
Base URL: https://api.yourdomain.com (or http://localhost in development)
- Authentication
- nself-claw (AI Assistant)
- nself-ai (LLM Routing)
- nself-mux (Email Pipeline)
- nself-claw-budget (Budget Management)
- nself-voice (TTS/STT/Calls)
- nself-browser (Web Automation)
- nself-google (Google Services)
- nself-notify (Notifications)
- nself-cron (Scheduled Jobs)
- nself-post (Social Publishing)
- Internal Plugin-to-Plugin
Plugin REST endpoints use two auth mechanisms:
| Method | Header | When Used |
|---|---|---|
| JWT Bearer | Authorization: Bearer {token} |
User-facing endpoints |
| Internal Token | X-Internal-Token: {secret} |
Plugin-to-plugin communication |
Internal tokens are configured via PLUGIN_INTERNAL_SECRET in .env.secrets. Plugin-to-plugin calls (e.g., mux calling claw) use MUX_CLAW_SHARED_SECRET or the generic internal token.
| Method | Path | Description |
|---|---|---|
POST |
/claw/message |
Send a message to the AI assistant. Returns AI response with tool results. |
GET |
/claw/threads |
List conversation threads for the authenticated user. |
GET |
/claw/threads/{id} |
Get a specific thread with messages. |
DELETE |
/claw/threads/{id} |
Delete a thread and its messages. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/memories |
List stored memories. Supports type filter (fact, preference, decision, pattern, relationship). |
POST |
/claw/memories |
Create a memory entry manually. |
DELETE |
/claw/memories/{id} |
Delete a specific memory. |
POST |
/claw/memories/bulk-delete |
Delete multiple memories by ID. |
GET |
/claw/memories/export |
Export all memories as JSON. |
POST |
/claw/memories/import |
Import memories from JSON. |
POST |
/claw/memories/search |
Semantic search over memories (pgvector cosine similarity). |
| Method | Path | Description |
|---|---|---|
GET |
/claw/personas |
List all personas. |
POST |
/claw/personas |
Create a new persona. |
PUT |
/claw/personas/{id} |
Update a persona. |
DELETE |
/claw/personas/{id} |
Delete a persona. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/tools |
List all registered tools (native + manifest + integration). |
| Method | Path | Description |
|---|---|---|
GET |
/claw/budget |
Get current budget status (daily/monthly limits, current spend). |
POST |
/claw/budget |
Set or update budget limits. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/email/priorities |
Get email priority classifications (action_required, time_sensitive, fyi, junk). |
| Method | Path | Description |
|---|---|---|
GET |
/claw/contacts |
List contacts. |
POST |
/claw/contacts |
Create a contact. |
PUT |
/claw/contacts/{id} |
Update a contact. |
DELETE |
/claw/contacts/{id} |
Delete a contact. |
GET |
/claw/contacts/{id}/vcard |
Export contact as vCard 3.0. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/integrations |
List configured integrations. |
POST |
/claw/integrations |
Create an integration (with SSRF validation on base_url). |
PUT |
/claw/integrations/{id} |
Update an integration. |
DELETE |
/claw/integrations/{id} |
Delete an integration. |
POST |
/claw/integrations/{id}/test |
Test integration health. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/transactions |
Query financial transactions. Filters: keyword, category, date range, user_id. |
GET |
/claw/transactions/summary |
6-month totals, top 5 vendors (30d), category breakdown. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/proactive/log |
Get proactive notification history. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/goals |
List goals. |
POST |
/claw/goals |
Create a goal. |
PUT |
/claw/goals/{id} |
Update a goal. |
DELETE |
/claw/goals/{id} |
Delete a goal. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/health/monitoring |
Check Prometheus, Loki, Alertmanager health. |
| Method | Path | Description |
|---|---|---|
POST |
/claw/pair/open |
Open pairing window (internal auth via X-Internal-Secret). |
GET |
/claw/pair/status |
Check pairing window status. |
GET |
/claw/pair |
Get pairing code (404 when window closed). |
POST |
/claw/pair/direct |
Direct pairing with HMAC-SHA256 4-word phrase. |
GET |
/claw/pair/direct/status |
Check direct pairing status. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/onboarding/status |
Check onboarding completion. |
POST |
/claw/onboarding/answer |
Submit an onboarding answer. |
POST |
/claw/onboarding/restart |
Restart onboarding flow. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/usage |
30-day AI usage by model (tokens, cost, routed_by). |
| Method | Path | Description |
|---|---|---|
POST |
/claw/telegram/webhook |
Telegram bot webhook handler. Gated by CLAW_TG_ALLOWED_USERS. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/memory/rooms |
List memory rooms with counts and health scores. |
POST |
/claw/memory/rooms |
Create a named memory room. |
PUT |
/claw/memory/rooms/{id} |
Update room name or ordering. |
DELETE |
/claw/memory/rooms/{id} |
Delete room (memories return to default). |
POST |
/claw/memory/rooms/{id}/assign |
Assign memory IDs to a room. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/knowledge/health |
Brain health check report (stale, orphan, duplicate detection). |
GET |
/claw/knowledge/stats |
Knowledge graph statistics (node count, edges, avg connections). |
GET |
/claw/knowledge/export |
Export knowledge graph. Query param format=obsidian or format=json. |
GET |
/claw/ingestion/queue |
List ingestion pipeline jobs. |
POST |
/claw/ingestion/start |
Start ingestion from URL or file. |
DELETE |
/claw/ingestion/{id} |
Cancel an ingestion job. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/decisions |
List recorded decisions. |
POST |
/claw/decisions |
Record a new decision with context. |
PUT |
/claw/decisions/{id} |
Update decision outcome. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/routing/rules |
List smart routing rules. |
POST |
/claw/routing/rules |
Create a routing rule. |
PUT |
/claw/routing/rules/{id} |
Update a routing rule. |
DELETE |
/claw/routing/rules/{id} |
Delete a routing rule. |
| Method | Path | Description |
|---|---|---|
POST |
/claw/image/generate |
Generate image from text prompt. Supports provider override. |
GET |
/claw/image/jobs |
List image generation jobs and statuses. |
GET |
/claw/image/jobs/{id} |
Get specific job result with image URL. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/model/recommend |
Get model recommendation for a given query type. |
POST |
/claw/sessions/{id}/features |
Toggle session feature flags. |
POST |
/claw/sessions/{id}/summarize |
Compress and summarize session context. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/marketplace/personas |
Browse community personas (no auth required). |
POST |
/claw/marketplace/personas |
Publish a persona to the marketplace. |
POST |
/claw/marketplace/personas/{id}/install |
Install a marketplace persona. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/agents/dashboard |
Agent metrics with sparkline data for all personas. |
GET |
/claw/agents/status |
Live per-agent status (active, idle, error). |
GET |
/claw/crews |
List agent crew configurations. |
POST |
/claw/crews |
Create an agent crew. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/habits |
List habit definitions. |
POST |
/claw/habits |
Create a habit. |
PUT |
/claw/habits/{id} |
Update habit settings. |
POST |
/claw/habits/{id}/log |
Log daily habit completion. |
GET |
/claw/tutor/cards |
List tutor flashcards. |
POST |
/claw/tutor/quiz |
Start a quiz session. |
GET |
/claw/career/cv |
Get structured CV data. |
PUT |
/claw/career/cv |
Update CV data. |
GET |
/claw/career/suggestions |
Get career suggestions. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/health/checkin |
Health coach check-in. |
GET |
/claw/health/summary |
Health metrics summary. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/reflections |
List daily reflections. |
POST |
/claw/reflections |
Create a reflection entry. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/prompts |
List prompt library templates. |
POST |
/claw/prompts |
Create a prompt template. |
POST |
/claw/prompts/{id}/chain |
Chain prompts for sequential execution. |
GET |
/claw/workflows/templates |
List workflow templates. |
POST |
/claw/workflows/templates |
Create a workflow template. |
POST |
/claw/workflows/run |
Execute a workflow. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/projects/files |
List project files. |
POST |
/claw/projects/files |
Upload a project file. |
DELETE |
/claw/projects/files/{id} |
Delete a project file. |
| Method | Path | Description |
|---|---|---|
GET |
/claw/history |
Conversation history with search and date filters. |
GET |
/claw/gallery |
Image gallery with generated images. |
| Method | Path | Description |
|---|---|---|
POST |
/ai/complete |
Route a completion request to the best model (4-tier routing). |
POST |
/ai/embeddings |
Generate vector embeddings for text. |
GET |
/ai/status |
Provider health and routing status. |
GET |
/ai/providers |
List configured AI providers and their status. |
GET |
/ai/tokens |
List caller tokens (per-namespace auth). |
POST |
/ai/tokens |
Create a caller token. |
DELETE |
/ai/tokens/{id} |
Revoke a caller token. |
GET |
/ai/accounts |
List OAuth AI accounts. |
POST |
/ai/accounts/refresh |
Force refresh OAuth tokens. |
POST |
/ai/email-event |
Receive forwarded email metadata from mux rules. |
External API (port 18900): OpenAI-compatible API for third-party integrations. Uses caller tokens for auth.
| Method | Path | Description |
|---|---|---|
GET |
/mux/messages |
Query email history. Filters: ILIKE search on from/subject/body, date range, account. Internal auth. |
POST |
/mux/tokens/import |
Import OAuth refresh token for a Gmail account. Internal auth. |
GET |
/mux/auto-reply/audit |
Auto-reply audit log. Filter by rule. |
POST |
/mux/pending-replies/{id}/approve |
Approve a pending auto-reply draft. |
POST |
/mux/pending-replies/{id}/discard |
Discard a pending auto-reply draft. |
The claw-budget plugin provides standalone budget management that works independently of the claw plugin:
| Method | Path | Description |
|---|---|---|
GET |
/claw-budget/status |
Current spend vs limits (daily + monthly). |
POST |
/claw-budget/limits |
Set daily/monthly token budget limits. |
GET |
/claw-budget/history |
Spend history over time. |
| Method | Path | Description |
|---|---|---|
POST |
/voice/tts |
Text-to-speech. Providers: Piper (local), ElevenLabs. |
POST |
/voice/stt |
Speech-to-text via whisper.cpp. |
POST |
/voice/call/outbound |
Initiate outbound call via Twilio. |
GET |
/voice/call/status |
Check call status. |
GET |
/voice/routing/status |
Current LLM routing tier (standard vs realtime). |
POST |
/voice/routing/set-tier |
Set voice LLM routing tier. |
| Method | Path | Description |
|---|---|---|
GET |
/browser/tabs |
List open browser tabs. |
POST |
/browser/action |
Execute browser action. Actions: navigate, click, type, extract, screenshot, wait_for, evaluate, get_cookies. |
GET |
/browser/allowlist |
List allowed URLs. |
POST |
/browser/allowlist |
Add URL to allowlist. |
SSRF protection blocks all RFC-1918 and private IP addresses.
| Method | Path | Description |
|---|---|---|
GET |
/google/gmail/messages |
Search Gmail messages. |
GET |
/google/gmail/message/{id} |
Get full email content. |
GET |
/google/calendar/events |
List calendar events. |
POST |
/google/calendar/events |
Create a calendar event. |
GET |
/google/calendar/freebusy |
Find free time slots. |
GET |
/google/drive/files |
List Drive files. |
POST |
/google/sheets/append |
Append row to a Google Sheet. |
GET |
/google/sheets/read |
Read data from a Google Sheet. |
Primary account resolution: GOOGLE_PRIMARY_USER_ID env var or first database row.
| Method | Path | Description |
|---|---|---|
POST |
/notify/send |
Send notification via configured channels. |
GET |
/notify/channels |
List notification channels. |
POST |
/notify/channels |
Create a channel (Telegram, webhook). |
DELETE |
/notify/channels/{id} |
Delete a channel. |
| Method | Path | Description |
|---|---|---|
GET |
/cron/jobs |
List scheduled jobs. |
POST |
/cron/jobs |
Create a cron job (timezone-aware, DB persistence). |
DELETE |
/cron/jobs/{id} |
Delete a job. |
POST |
/cron/jobs/{id}/run |
Trigger a job immediately. |
| Method | Path | Description |
|---|---|---|
POST |
/post/publish |
Publish to one or more platforms (immediate or scheduled). |
GET |
/post/accounts |
List connected publishing accounts. |
GET |
/post/queue |
Get scheduled post queue. |
Supported platforms: WordPress, Ghost, Twitter, Telegram channel, Dev.to, Hashnode.
These endpoints use X-Internal-Token auth and are not meant for direct user access.
| Method | Path | Plugin | Description |
|---|---|---|---|
POST |
/internal/classify |
claw | Classify a message (used by mux). Auth: MUX_CLAW_SHARED_SECRET. |
GET |
/internal/health |
all | Plugin health check. Returns 200 if healthy. |
When plugins are installed, the CLI auto-generates PLUGIN_{NAME}_INTERNAL_URL environment variables:
| Variable | Default |
|---|---|
PLUGIN_AI_INTERNAL_URL |
http://nself-ai:18900 |
PLUGIN_CLAW_INTERNAL_URL |
http://nself-claw:18901 |
PLUGIN_MUX_INTERNAL_URL |
http://nself-mux:18902 |
PLUGIN_VOICE_INTERNAL_URL |
http://nself-voice:18903 |
PLUGIN_BROWSER_INTERNAL_URL |
http://nself-browser:18904 |
PLUGIN_GOOGLE_INTERNAL_URL |
http://nself-google:18905 |
PLUGIN_NOTIFY_INTERNAL_URL |
http://nself-notify:18906 |
PLUGIN_CRON_INTERNAL_URL |
http://nself-cron:18907 |
Plugins use these URLs to communicate with each other over the Docker bridge network.
All endpoints return standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad request (validation error) |
| 401 | Unauthorized (missing or invalid token) |
| 403 | Forbidden (insufficient permissions or tier) |
| 404 | Not found |
| 429 | Rate limited |
| 500 | Internal server error |
Error body format:
{
"error": "human-readable message",
"code": "MACHINE_READABLE_CODE"
}- Feature-ɳClaw -- ɳClaw feature overview
- Plugin-Architecture -- how plugins are structured
- Security-Architecture -- auth model and rate limiting
- Config-Env-Vars -- environment variable reference
ɳSelf CLI v1.0.9. MIT licensed. Docs CC BY 4.0.
GitHub · Issues · Discussions · nself.org · docs.nself.org
Getting Started
Commands
- Commands, Overview
- Lifecycle: cmd-init · cmd-build · cmd-start · cmd-stop · cmd-restart · cmd-dev
- Monitoring: cmd-status · cmd-logs · cmd-health · cmd-urls · cmd-doctor · cmd-monitor · cmd-alerts · cmd-watchdog · cmd-dogfood
- Data: cmd-db · cmd-backup · cmd-dr · cmd-queue · cmd-webhooks
- Config: cmd-config · cmd-service · cmd-env · cmd-promote
- Networking: cmd-ssl · cmd-trust · cmd-dns-setup
- Security: cmd-security · cmd-secrets · cmd-waf
- Tenancy: cmd-tenant · cmd-billing
- Plugins: cmd-plugin · cmd-license
- AI: cmd-ai · cmd-claw
- Utilities: cmd-exec · cmd-clean · cmd-reset · cmd-update · cmd-upgrade · cmd-version · cmd-admin · cmd-migrate · cmd-completion
Features
- Features, Overview
- Feature-Auth
- Feature-Storage
- Feature-Search
- Feature-Functions
- Feature-Email
- Feature-Monitoring
- Feature-Plugins
- Feature-ɳClaw, AI Assistant
- Feature-ɳChat, Messaging
- Feature-ɳTV, Media Player
- Feature-ɳFamily, Family Social
- Feature-ɳCloud, Managed Hosting
- Feature-Memory-Rooms, Knowledge Organization
- Feature-Agent-Dashboard, Agent Metrics
- Feature-Image-Generation, AI Image Generation
Configuration
- Configuration, Overview
- Config-Env-Vars
- Config-Postgres
- Config-Hasura
- Config-Auth
- Config-Nginx
- Config-Optional-Services
- Config-Custom-Services
- Config-System
Plugins (87 + 10 monitoring)
Free (25)
- plugin-backup
- plugin-content-acquisition
- plugin-content-progress
- plugin-cron
- plugin-donorbox
- plugin-feature-flags
- plugin-github
- plugin-github-runner
- plugin-invitations
- plugin-jobs
- plugin-link-preview
- plugin-mdns
- plugin-mlflow
- plugin-monitoring
- plugin-notifications
- plugin-notify
- plugin-paypal
- plugin-search
- plugin-shopify
- plugin-stripe
- plugin-subtitle-manager
- plugin-tokens
- plugin-torrent-manager
- plugin-vpn
- plugin-webhooks
Pro (62)
- plugin-access-controls
- plugin-activity-feed
- plugin-admin-api
- plugin-ai
- plugin-analytics
- plugin-auth
- plugin-backup-pro
- plugin-bots
- plugin-browser
- plugin-calendar
- plugin-cdn
- plugin-chat
- plugin-claw
- plugin-claw-budget
- plugin-claw-news
- plugin-claw-web
- plugin-cloudflare
- plugin-cms
- plugin-compliance
- plugin-cron-pro
- plugin-ddns
- plugin-devices
- plugin-documents
- plugin-donorbox-pro
- plugin-entitlements
- plugin-epg
- plugin-file-processing
- plugin-game-metadata
- plugin-geocoding
- plugin-geolocation
- plugin-google
- plugin-home
- plugin-idme
- plugin-knowledge-base
- plugin-linkedin
- plugin-livekit
- plugin-media-processing
- plugin-meetings
- plugin-moderation
- plugin-mux
- plugin-notify-pro
- plugin-object-storage
- plugin-observability
- plugin-paypal-pro
- plugin-photos
- plugin-podcast
- plugin-post
- plugin-realtime
- plugin-recording
- plugin-retro-gaming
- plugin-rom-discovery
- plugin-shopify-pro
- plugin-social
- plugin-sports
- plugin-stream-gateway
- plugin-streaming
- plugin-stripe-pro
- plugin-support
- plugin-tmdb
- plugin-voice
- plugin-web3
- plugin-workflows
Planned (26)
plugin-auditplugin-blogplugin-checkoutplugin-commerceplugin-drmplugin-exportplugin-flowplugin-importplugin-ldapplugin-mailgunplugin-mediaplugin-oauth-providersplugin-pagesplugin-postmarkplugin-rate-limitplugin-reportsplugin-samlplugin-schedulerplugin-sendgridplugin-ssoplugin-subscriptionplugin-thumbplugin-transcoderplugin-twilioplugin-wafplugin-watermark
Guides
- Guide-Production-Deployment
- Guide-SSL-Setup
- Guide-Multi-Tenancy
- Guide-Security-Hardening
- Guide-Monitoring-Setup
- Guide-Backup-Restore
- Guide-Custom-Services
- Guide-Migration-from-v1
Architecture
Reference
- API-Reference
- reference-error-codes, Error Codes
Licensing
Security
Brand
Contributing