All backend API endpoints.
Base URL: http://localhost:41522
Register new user
{
"email": "user@example.com",
"password": "password123",
"name": "User Name"
}Login user
{
"email": "user@example.com",
"password": "password123"
}Returns: { token: "jwt_token" }
Logout current user
List all agents
Create new agent
{
"name": "My Agent",
"emoji": "🤖",
"system_prompt": "You are a helpful assistant",
"model": "claude-sonnet-4.5"
}Update agent
Delete agent
Get agent files (PERSONALITY.md, MEMORY.md)
Update agent PERSONALITY.md
Update agent MEMORY.md
Send message to AI
{
"message": "Hello",
"agentId": "agent-id",
"sessionId": "session-id"
}Returns: Server-Sent Events (SSE) stream
List chat sessions
Get session messages
Delete session
List calendar events
Create event
{
"title": "Meeting",
"start": "2026-02-22T10:00:00Z",
"end": "2026-02-22T11:00:00Z",
"type": "meeting"
}List calendar sources (Google, iCal)
Add calendar source
Sync calendar source
List files
Upload file (multipart/form-data)
Delete file
Download file
List all extensions
Enable extension
Disable extension
Delete extension
Get database statistics
Create database backup
Restore from backup
Optimize database (VACUUM)
Delete old records (90+ days)
List notifications
Mark as read
Delete notification
Get notification settings
Update settings
Get avatar settings
Update avatar settings
List user avatars
Create user avatar
List user worlds
Upload world (GLB file)
Update world
Delete world
List system worlds
Get user profile
Update profile
Upload profile picture
List available AI tools (18 built-in)
List webhooks
Create webhook
Delete webhook
Health check
System statistics
All endpoints except /api/auth/* require JWT token:
Authorization: Bearer <token>
Get token from login response and store in localStorage.
{
"error": "Error message",
"code": "ERROR_CODE"
}Status Codes:
- 200: Success
- 400: Bad request
- 401: Unauthorized
- 403: Forbidden
- 404: Not found
- 500: Server error