Browse the API
Quick start
- In Life OS, open Settings, Your data, Developer API and switch it on.
- Choose what the API may read: days, sleep, meals, workouts, today's list. Each is off until you switch it on.
- Tap Create a key. It is shown once: keep it somewhere safe, such as an environment variable called
ELO_KEY. - Ask for your last 30 days:
curl "https://api.eloai.io/v1/days" \
-H "Authorization: Bearer $ELO_KEY"const res = await fetch("https://api.eloai.io/v1/days", {
headers: { Authorization: `Bearer ${process.env.ELO_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).message);
const data = await res.json();import os, requests
res = requests.get(
"https://api.eloai.io/v1/days",
headers={"Authorization": f"Bearer {os.environ['ELO_KEY']}"},
timeout=10,
)
res.raise_for_status()
data = res.json()var request = URLRequest(url: URL(string: "https://api.eloai.io/v1/days")!)
request.setValue("Bearer \(key)", forHTTPHeaderField: "Authorization")
let (data, _) = try await URLSession.shared.data(for: request)Your iPhone keeps a copy of what you chose, for the last 90 days, where the API can read it, and refreshes it as the app is used. Turn the API off and that copy and every key are deleted.
Authentication
Send your key as a bearer token on every request: Authorization: Bearer elo_.... Keys start with elo_ and are stored by us only as a hash. Anyone holding your key can read what you shared, so keep it on a server or in your own scripts, never in a web page or an app you give to others. Revoke a key in the same screen; it stops working at once.
Base URL and dates
https://api.eloai.io/v1. Every response is JSON. Dates are ISO 8601 in your own time zone (see timeZone on /v1/me). from and to take YYYY-MM-DD, both inclusive; without them you get the last 30 days. A figure the phone did not have is null, never zero.
GET /v1/me
The account the key belongs to, what it may read, and when your iPhone last sent a copy.
{
"account": "a1b2c3d4",
"name": "Sky",
"scopes": ["days", "sleep", "meals"],
"timeZone": "Asia/Jerusalem",
"syncedAt": "2026-10-05T04:02:11.000Z"
}
GET /v1/days?from=2026-09-01&to=2026-09-30
One row a day. Needs the days scope.
| Field | Type | What it is |
|---|---|---|
date | string | The day, YYYY-MM-DD, in your time zone. |
sleepMinutes | number | null | Minutes asleep the night that ended that morning. |
readiness | number | null | Readiness, 0 to 100, against your own normal. |
restingHeartRate | number | null | Resting heart rate, beats a minute. |
hrv | number | null | Heart rate variability (SDNN), milliseconds. |
steps | number | null | Steps that day. |
activeKcal | number | null | Active energy, kilocalories. |
exerciseMinutes | number | null | Exercise minutes. |
waterMl | number | null | Water logged, millilitres. |
eatenKcal | number | null | Energy eaten, kilocalories. |
proteinG, carbsG, fatG | number | null | Macronutrients eaten, grams. |
{ "days": [ { "date": "2026-09-30", "sleepMinutes": 431, "readiness": 64, "restingHeartRate": 52, "hrv": 61,
"steps": 9120, "activeKcal": 512, "exerciseMinutes": 38, "waterMl": 1750,
"eatenKcal": 2140, "proteinG": 142, "carbsG": 210, "fatG": 71 } ] }
GET /v1/sleep?from&to
One row a night. Needs the sleep scope.
| Field | Type | What it is |
|---|---|---|
night | string | The night, YYYY-MM-DD of the evening it began. |
asleepMinutes | number | Total minutes asleep. |
deepMinutes, remMinutes, coreMinutes | number | null | Minutes in each stage. |
awakeMinutes | number | null | Minutes awake in the night. |
midpointHour | number | null | The middle of your sleep, hours after midnight. |
respiratoryRate | number | null | Breaths a minute, asleep. |
GET /v1/meals?from&to
Each meal and drink you logged. Needs the meals scope.
| Field | Type | What it is |
|---|---|---|
time | string | When it was logged, ISO 8601 with your offset. |
name | string | What it was. |
kcal | number | null | Energy, kilocalories. |
proteinG, carbsG, fatG | number | null | Grams of each. |
drinkMl | number | null | Millilitres, for a drink. |
GET /v1/workouts?from&to
Each workout from Apple Health. Needs the workouts scope.
| Field | Type | What it is |
|---|---|---|
type | string | The workout, as Apple Health names it. |
start | string | When it began, ISO 8601 with your offset. |
minutes | number | How long it lasted. |
activeKcal | number | null | Active energy, kilocalories. |
GET /v1/tasks
Today's list. Needs the tasks scope. Takes no dates.
| Field | Type | What it is |
|---|---|---|
title | string | The item on today's list. |
time | string | null | Its time, HH:MM, when it has one. |
done | boolean | Whether it was ticked off. |
Limits
- 60 requests a minute for each key.
- Up to 5 keys on an account at once.
- The last 90 days are kept; at most 2,000 rows come back from one request, oldest first. Ask for a shorter range to page.
Errors
Every error is JSON: {"error": "code", "message": "what to do"}.
| Status | error | Meaning |
|---|---|---|
| 400 | bad range | from is after to. |
| 401 | unauthorized | No key, a key that was revoked, or the API is switched off. |
| 403 | not shared | That data is not shared with the API. Switch it on in the app. |
| 404 | not found | No such endpoint. |
| 405 | method not allowed | The API is read only. Use GET. |
| 429 | rate limited | More than 60 requests a minute. Wait and try again. |
| 503 | unavailable | A moment's trouble on our side. Try again shortly. |
What it can see
Only what you switched on, only yours, and only read. The API cannot change your data, cannot see your journal, notes or conversations with your ELO, and is never used for advertising. See the API terms and the privacy policy.