Luna Health API — API Reference
Introduction
Luna Health offers a modern REST API that allows you to integrate with our platform programmatically. This API is currently read-only: it lets you retrieve data from your organization to build reporting tools, dashboards, and analytics. Write operations (creating, updating, or deleting records) are not available through the public API at this time.
For Developers
- You have programmatic access to the same features available in the Luna Health platform
- Create your own custom data representations and reporting tools
- Our developer support team is available to help you integrate with our platform
API Overview
Our API adheres to REST principles and is designed to be developer-friendly. The public API is read-only, so it uses the standard HTTP GET method and returns responses in JSON format.
Authentication
API access requires authentication using API keys. You need to include your API key in the Authorization header of all requests using the Bearer token format:
Authorization: Bearer YOUR_API_KEY_HERESecurity Warning
Never share your API keys in publicly accessible areas such as GitHub, client-side code, etc. API keys should be stored securely server-side.
Generating API Keys
You can generate and manage API keys in your Luna Health account settings. Follow these steps:
1. Log in to your Luna Health account 2. Navigate to Settings > API Keys 3. Click "Generate New API Key" 4. Store your new API key securely as it will only be displayed once
Error Handling
All errors are returned in a consistent format with appropriate HTTP status codes.
Biomarkers
Endpoints for managing and analyzing biomarker data. Biomarkers are measurable indicators of biological states or conditions that provide insights into a patient's health status.
Patients
Read-only endpoints for retrieving patient records in your organization — listing patients, looking up a patient by ID, and accessing patient chart data and health records. These endpoints do not create, update, or delete patient data, and never expose staff or administrator accounts.
Webhooks
Read-only endpoint for retrieving your organization's webhook configuration. The secret key is never returned. Webhook configuration changes are made from your Luna Health account settings, not through the public API.
Lab Tests
APIs for ordering, tracking, and retrieving laboratory test results. These endpoints provide access to comprehensive lab data, historical test results, and reference ranges for accurate interpretation.
Appointments
Endpoints for listing and managing appointments. Retrieve scheduled, confirmed, completed, and canceled appointments for your organization with filtering by date range, status, and patient.
Payments
Read-only endpoints for retrieving payment records (invoices) in your organization — listing payments with filtering by status, payment method, patient, and date range, and looking up a single payment by ID. These endpoints do not create, charge, refund, or modify payments, and never expose Stripe identifiers or fiscal (CFDI) data.