> ## 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.

# Account profile

> Returns the caller's account name, their current machine (if set), and high-level counts for the nights on record. History visible to the key follows the account's plan (Pro: all nights).



## OpenAPI

````yaml /openapi.json get /api/v1/me
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:
    get:
      tags:
        - Account
      summary: Account profile
      description: >-
        Returns the caller's account name, their current machine (if set), and
        high-level counts for the nights on record. History visible to the key
        follows the account's plan (Pro: all nights).
      operationId: getMe
      responses:
        '200':
          description: Account profile and night counts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Me'
              example:
                account: Home
                machine: ResMed AirSense 11 AutoSet
                nights:
                  count: 214
                  first: '2025-11-02'
                  last: '2026-10-14'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    Me:
      type: object
      properties:
        account:
          type:
            - string
            - 'null'
          description: Account name, or null if none is set.
        machine:
          type:
            - string
            - 'null'
          description: >-
            Current machine as "brand model", or null if no current machine is
            registered.
        nights:
          type: object
          description: High-level counts over the nights the key can see.
          properties:
            count:
              type: integer
              description: Number of nights on record.
            first:
              type:
                - string
                - 'null'
              format: date
              description: Earliest night date, or null if there are no nights.
            last:
              type:
                - string
                - 'null'
              format: date
              description: Latest night date, or null if there are no nights.
          required:
            - count
            - first
            - last
      required:
        - account
        - machine
        - nights
    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.