Skip to Content
API ReferenceOverview

API Reference

Complete reference for all Loop Health API endpoints. All APIs use JSON request/response bodies and return consistent response envelopes.

Response Format

Success Response

{ "success": true, "data": { ... }, "meta": { "requestId": "req_abc123" } }

Paginated Response

{ "success": true, "data": [ ... ], "meta": { "requestId": "req_abc123", "page": 1, "limit": 20, "total": 150, "totalPages": 8 } }

Error Response

{ "success": false, "error": { "code": "NOT_FOUND", "message": "Resource not found", "details": {} }, "meta": { "requestId": "req_abc123" } }

Authentication

All APIs (except webhooks) require a Clerk JWT bearer token:

curl -H "Authorization: Bearer $CLERK_JWT" \ https://patient-graph.loop.health/profiles

Tokens are obtained from the Clerk SDK on the client side and contain user identity, roles, and subscription tier.

Rate Limiting

API endpoints enforce per-user rate limits using a sliding-window algorithm:

APILimitWindow
Patient Graph100 requests60 seconds
Platform APIVaries by endpoint

Rate limit headers are included in every response:

X-RateLimit-Limit: 100 X-RateLimit-Remaining: 95 X-RateLimit-Reset: 1700000060

When exceeded, the API returns 429 Too Many Requests with a Retry-After header.

APIs

Patient Graph API

The clinical data API — profiles, labs, protocols, events, treatments, prescriptions, conversation history, and audit logs. Deployed as a standalone Hono service.

Platform API

Internal API used by the admin dashboard and command center for cross-service operations — customer lookup, stack management, analytics, and product search.

Rimo SSO

Single sign-on token generation for Loop Bio Labs checkout flow.

Rimo Webhooks

Webhook receiver for Rimo Health treatment and prescription events.

Health Data API

Lab upload, history, trends, and comparison endpoints in the consumer app.

Embeddings API

Vector embedding generation, batch processing, and similarity search.