Luna SaludAPI ReferenceLuna Salud

Authentication

The Luna Health API is a read-only REST API: every documented endpoint uses the HTTP GET method. Each request must be authenticated with an API key so Luna Health can identify your integration and enforce access to the right clinic data.

Get an API key

Create a free account and generate a key from your account dashboard. Keys are tied to your organization and can be revoked at any time.

Authenticate a request

Send your API key with every request using the scheme shown in Security scheme below. The most common form is a bearer token in the Authorization header:

curl https://account.lunahealth.app/api/patients \
  -H "Authorization: Bearer YOUR_API_KEY"
const res = await fetch("https://account.lunahealth.app/api/patients", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
const data = await res.json();
import requests

res = requests.get(
    "https://account.lunahealth.app/api/patients",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
data = res.json()

Replace YOUR_API_KEY with the key from your dashboard, and adjust the base URL and path to the endpoint you are calling — see the API reference for each endpoint.

Keep your key safe

Troubleshooting

Security scheme

NameTypeLocationDetails
bearerAuthhttpheaderbearer · API Key