Naar de inhoud
GET /v1/meta

Spec

Probeer het live

10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.

Aangepaste headers (optioneel)
api.oanor.com/sleep-api

Het werkt. Haal een API-key op en gebruik hem in je project.

Verkrijg een API-sleutel

Codefragmenten

curl "https://api.oanor.com/sleep-api/v1/meta" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/sleep-api/v1/meta", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/sleep-api/v1/meta");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/sleep-api/v1/meta",
    headers={"x-oanor-key": "oanor_test_..."}
)

Voorbeeldrespons

Een echte respons van dit endpoint, vastgelegd bij de laatste health check.

{
    "data": {
        "notes": "All clock maths is modulo 24h. Times accept 24h ('23:15') or 12h ('10:30 PM'); 'now' uses server local time.",
        "service": "sleep",
        "endpoints": {
            "/v1/nap": "Given a start time, suggest nap lengths (power / short / slow-wave / full-cycle) and end times.",
            "/v1/bedtime": "Given a wake-up time, suggest bedtimes ending on a sleep-cycle boundary.",
            "/v1/duration": "Given a bedtime and wake time, report sleep duration, full cycles, and cycle alignment.",
            "/v1/wake-time": "Given a bedtime (or 'now'), suggest wake times ending on a sleep-cycle boundary."
        },
        "disclaimer": "Informational only — not medical advice.",
        "description": "Sleep-cycle calculator: recommended bedtimes, wake times, sleep duration analysis, and nap planning, based on ~90-minute sleep cycles.",
        "fall_asleep_minutes_default": 15,
        "cycle_length_minutes_default": 90
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:02.078Z",
        "request_id": "43a2769f-9994-42ac-9b74-26039bba472d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}