> ## Documentation Index
> Fetch the complete documentation index at: https://help.apnealytics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Daily vitals

> Returns wearable / Apple Health daily metrics, one row per night date, in ascending date order. Any metric not recorded for a given day is `null`.



## OpenAPI

````yaml /openapi.json get /api/v1/me/vitals
openapi: 3.1.0
info:
  title: Apnealytics API
  version: 1.0.0
  description: >-
    A read-only REST API for your own CPAP therapy data. Authenticate with a
    personal API key (created in the app under Account → API) sent as a Bearer
    token. Every response is JSON and is scoped to your own account only. The
    API is a Pro feature.


    Apnealytics is a tracking and coaching tool, not a medical device.
    Machine-estimated AHI and the values returned here are not a clinical
    diagnosis — discuss your therapy with a qualified clinician.
servers:
  - url: https://my.apnealytics.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Account profile and high-level counts.
  - name: Therapy
    description: Nightly therapy data and aggregate summaries.
  - name: Vitals
    description: Wearable / Apple Health daily metrics.
paths:
  /api/v1/me/vitals:
    get:
      tags:
        - Vitals
      summary: Daily vitals
      description: >-
        Returns wearable / Apple Health daily metrics, one row per night date,
        in ascending date order. Any metric not recorded for a given day is
        `null`.
      operationId: getVitals
      responses:
        '200':
          description: Daily vitals rows.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VitalsResponse'
              example:
                vitals:
                  - date: '2026-10-13'
                    resting_hr: 58
                    hrv_sdnn: 52
                    spo2_avg: 95.4
                    spo2_min: 90
                    sleep_hours: 7.4
                    weight_kg: 80.2
                count: 1
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    VitalsResponse:
      type: object
      properties:
        vitals:
          type: array
          description: Daily vitals rows, oldest first.
          items:
            $ref: '#/components/schemas/Vital'
        count:
          type: integer
          description: Number of rows returned.
      required:
        - vitals
        - count
    Vital:
      type: object
      description: >-
        One day of wearable / Apple Health metrics. Any unrecorded metric is
        null.
      properties:
        date:
          type: string
          format: date
          description: Night date, `YYYY-MM-DD`.
        resting_hr:
          type:
            - number
            - 'null'
          description: Resting heart rate (bpm).
        hrv_sdnn:
          type:
            - number
            - 'null'
          description: Heart rate variability, SDNN (ms).
        spo2_avg:
          type:
            - number
            - 'null'
          description: Overnight average blood oxygen (%).
        spo2_min:
          type:
            - number
            - 'null'
          description: Overnight minimum blood oxygen (%).
        sleep_hours:
          type:
            - number
            - 'null'
          description: Total sleep from the wearable (hours).
        weight_kg:
          type:
            - number
            - 'null'
          description: Body weight (kg).
      required:
        - date
        - resting_hr
        - hrv_sdnn
        - spo2_avg
        - spo2_min
        - sleep_hours
        - weight_kg
    Error:
      type: object
      description: Uniform error envelope. `error` is a stable machine-readable code.
      properties:
        error:
          type: string
          description: Error code.
          enum:
            - unauthorized
            - invalid_request
            - server_error
      required:
        - error
  responses:
    Unauthorized:
      description: >-
        Missing, malformed, revoked, expired, or non-Pro API key. The body never
        distinguishes between these cases.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    ServerError:
      description: >-
        Unexpected server error. The body carries no stack trace or internal
        detail.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: server_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Personal API key, created in the app under Account → API. Send it as
        `Authorization: Bearer apn_...`. Keys are read-only, Pro-gated, and
        revocable. A revoked, expired, or non-Pro key returns 401.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.