Welcome to the API
The Mirobody Health API provides programmatic access to health device integrations, data retrieval, and AI-powered health insights.Base URL:
http://localhost:18080 (development) or https://your-domain.com (production)API Categories
Pulse API
Connect health devices and retrieve standardized health data from OAuth providers and Apple Health
Chat API
Stream AI responses from DeepAgent and BaselineAgent with MCP tool integration
MCP Protocol
JSON-RPC 2.0 interface for AI agents to discover and call tools and resources
Base URLs
Authentication
Most API endpoints require authentication using JWT tokens in the Authorization header:Obtaining Tokens
Tokens are issued through the authentication endpoints:- Email Login:
POST /api/v1/user/email/login - Google OAuth:
POST /api/v1/user/google/login - Apple Sign In:
POST /api/v1/user/apple/login
Rate Limiting
API requests are rate-limited per user and per provider:- Default: 100 requests per minute per user
- Provider-specific: Varies by provider (e.g., Garmin: 60 req/min)
Response Format
All API responses follow a standard format:HTTP Status Codes
| Status | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Common Error Codes
| Code | Description | Resolution |
|---|---|---|
0 | Success | - |
-1 | General error | Check error message |
-32000 | Auth required (MCP) | Authenticate via OAuth flow |
-32601 | Method not found (MCP) | Check method name |
-32602 | Invalid params (MCP) | Verify parameter format |
Quick Start
List available providers
API Endpoints Overview
Pulse API (/api/v1/pulse)
| Endpoint | Method | Description |
|---|---|---|
/providers | GET | List all available providers |
/user/providers | GET | Get user’s linked providers |
/user/providers/link | POST | Link a new provider |
/user/providers/unlink | POST | Unlink a provider |
/{platform}/{provider}/callback | GET | OAuth callback handler |
/{platform}/webhook | POST | Provider webhook receiver |
Chat API (/api/v1/chat)
| Endpoint | Method | Description |
|---|---|---|
/stream | POST | Stream chat response (SSE) |
/history | GET | Get conversation history |
/session | POST | Create/manage sessions |
MCP API (/mcp)
| Method | Description |
|---|---|
initialize | Handshake and capabilities |
tools/list | List available tools |
tools/call | Execute a tool |
resources/list | List resources |
resources/read | Read a resource |
File API (/api/v1/data)
| Endpoint | Method | Description |
|---|---|---|
/upload-with-processing | POST | Upload and process health files |
/health/data | GET/POST | Query/store health data |
/uploaded-files | GET | List uploaded files |
API Versioning
The API uses URL-based versioning:- Current:
/api/v1/... - Future:
/api/v2/...(when available)
Webhooks
Mirobody Health supports webhooks for real-time health data updates from providers:Next Steps
Pulse API
Connect and manage health providers
Chat API
Integrate AI health assistants
MCP Protocol
Build AI agent integrations
Examples
See complete implementation examples