---
title: "Concepts"
canonical: "https://aifitnessapi.com/learn"
type: "cluster-index"
pages: "13"
last_reviewed: "2026-08-12"
publisher: "AIFitnessAPI"
---

# Concepts

> 13 pages. Each entry below shows the question the page owns, followed by its answer capsule.

## What Is a Fitness API?

- Question: what is a fitness API
- HTML: https://aifitnessapi.com/learn/what-is-a-fitness-api
- Markdown: https://aifitnessapi.com/learn/what-is-a-fitness-api.md
- Last reviewed: 2026-07-09

A fitness API is a service that lets your application programmatically retrieve fitness or health data, or invoke a fitness capability, without building the underlying data pipeline yourself. Most are HTTP/REST web services you call over the network; a key exception is on-device health stores like Apple HealthKit and Google Health Connect, which you reach through the phone's operating system rather than a remote server. It is a category, not a single product: exercise-content databases, wearable-metric APIs, nutrition APIs, AI-motion SDKs, and aggregators are all fitness APIs, each solving a different job.

## What Is a Health-Data Aggregator?

- Question: what is a health data aggregator
- HTML: https://aifitnessapi.com/learn/what-is-a-health-data-aggregator
- Markdown: https://aifitnessapi.com/learn/what-is-a-health-data-aggregator.md
- Last reviewed: 2026-07-09

A health-data aggregator is a single third-party service that connects to many wearables and health providers on your behalf and returns their data in one standardized schema, delivered to a webhook. You integrate once instead of building a separate integration for Fitbit, Garmin, Oura, Whoop, and every other source. The main options as of 2026 are Terra, Junction (formerly Vital), Rook, and Spike.

## On-Device vs Cloud Health Data: What's the Difference?

- Question: on-device vs cloud health data
- HTML: https://aifitnessapi.com/learn/on-device-vs-cloud-health-data
- Markdown: https://aifitnessapi.com/learn/on-device-vs-cloud-health-data.md
- Last reviewed: 2026-07-09

Health and fitness data reaches your app by one of three routes. On-device stores like Apple HealthKit and Google Health Connect hold data on the user's phone under an OS-granted permission, with no vendor server to query. Cloud or OAuth APIs like Fitbit, Strava, and Oura keep data on the provider's servers, and your backend fetches it server-to-server using OAuth tokens. Aggregators like Terra and Junction are a single integration that fronts both. On-device is privacy-forward but platform-locked and device-bound; cloud/OAuth gives always-on server access across platforms; aggregators buy reach across both for a recurring fee.

## What Is OAuth 2.0 (and How Health APIs Use It)?

- Question: OAuth for health data
- HTML: https://aifitnessapi.com/learn/what-is-oauth-for-health-data
- Markdown: https://aifitnessapi.com/learn/what-is-oauth-for-health-data.md
- Last reviewed: 2026-07-09

OAuth 2.0 is the industry-standard authorization framework that lets a user grant your app limited access to their data on another service without sharing their password. Cloud health APIs like Fitbit, Strava, Oura, and Garmin use its authorization-code flow: the user consents on the provider's screen, your app receives an access token (scoped to specific data) plus a refresh token to renew it, and the user can revoke access at any time. Health APIs use it because health data is user-owned and sensitive, so consent must be explicit, granular, and revocable. The key exception is on-device stores — Apple HealthKit and Google Health Connect use OS-level permissions, not OAuth, with no tokens at all.

## What Are Webhooks (and Why Fitness APIs Use Them)?

- Question: what are webhooks
- HTML: https://aifitnessapi.com/learn/what-are-webhooks
- Markdown: https://aifitnessapi.com/learn/what-are-webhooks.md
- Last reviewed: 2026-07-09

A webhook is a server-to-server push notification: instead of your app repeatedly polling a provider for new data, the provider sends an HTTP POST to a callback URL you register the moment a relevant event happens, such as a wearable syncing a new workout. Webhooks are secured with a validation handshake (you prove you own the endpoint) and signature verification (you check each payload was really sent by the provider). Fitness APIs favor them because wearable data arrives unpredictably, and webhooks deliver it near-real-time instead of leaving you to poll too often (hitting rate limits) or too rarely (showing stale data).

## What Is Pose Estimation (for Fitness Apps)?

- Question: what is pose estimation
- HTML: https://aifitnessapi.com/learn/what-is-pose-estimation
- Markdown: https://aifitnessapi.com/learn/what-is-pose-estimation.md
- Last reviewed: 2026-07-09

Pose estimation is a computer-vision technique that locates body keypoints (joints such as shoulders, elbows, hips, and knees) in a camera image or video frame and outputs their coordinates plus a confidence score. A trained model returns those keypoints per frame, in 2D or rough 3D. In fitness apps it is the foundation for camera-based rep counting and form feedback: your app turns the keypoints into joint angles and motion over time. It typically runs on-device and in real time, so camera frames stay on the phone.

## What Is HRV (Heart Rate Variability)?

- Question: what is HRV
- HTML: https://aifitnessapi.com/learn/what-is-hrv
- Markdown: https://aifitnessapi.com/learn/what-is-hrv.md
- Last reviewed: 2026-07-09

Heart rate variability (HRV) is the variation in time between consecutive heartbeats. Wearables derive it from the inter-beat intervals captured by an optical (PPG) or electrical (ECG) sensor, usually averaged over an overnight window, and typically report the time-domain metric RMSSD in milliseconds (SDNN, the overall variability, is classically a 24-hour clinical measure). It is used as a general recovery and stress-balance signal, not a diagnosis. HRV is highly individual, so it should be compared against a person's own baseline, never across people or between brands.

## What Is VO2 Max (and How Do Wearables Estimate It)?

- Question: what is VO2 max
- HTML: https://aifitnessapi.com/learn/what-is-vo2-max
- Markdown: https://aifitnessapi.com/learn/what-is-vo2-max.md
- Last reviewed: 2026-07-09

VO2 max is the maximum rate at which the body can consume oxygen during intense exercise, measured in milliliters of oxygen per kilogram per minute (mL/kg/min), and it is a widely used proxy for aerobic fitness. On a wearable or fitness API it is almost always an estimate, not a measurement: the device models it from your heart rate and pace during activity rather than the lab gas-analysis test that produces a true VO2 max. Treat the number as a fitness trend to watch over time, not a precise clinical value. This is general wellness information, not medical advice.

## What Are Sleep Stages (Awake, Light, Deep, REM)?

- Question: what are sleep stages
- HTML: https://aifitnessapi.com/learn/what-are-sleep-stages
- Markdown: https://aifitnessapi.com/learn/what-are-sleep-stages.md
- Last reviewed: 2026-07-09

Sleep stages are the distinct phases the body cycles through during sleep, commonly grouped as awake, light, deep, and REM. Clinically they are defined by brain activity (EEG) in a sleep lab, but consumer wearables estimate them from movement and heart-rate patterns rather than measuring brainwaves. They are a directional wellness signal, useful for trends across nights, not clinical fact for any single night. This is general information for developers, not medical advice.

## How Do Fitness Apps Estimate Calories Burned?

- Question: how fitness apps estimate calories
- HTML: https://aifitnessapi.com/learn/how-fitness-apps-estimate-calories
- Markdown: https://aifitnessapi.com/learn/how-fitness-apps-estimate-calories.md
- Last reviewed: 2026-07-09

Fitness apps do not measure calories burned; they estimate them with a model. The device feeds signals it can sense (movement and heart rate) plus your profile (age, sex, height, weight) into formulas — MET-based, heart-rate-based, and accelerometer-based — that output a calorie number. Independent testing shows that estimate can be far off: a 2017 Stanford study found the most accurate of seven wrist devices was still about 27% off for energy expenditure and the worst about 93% off, even though the same devices read heart rate to within about 5%. Treat calorie burn as a relative activity signal and trend, not a precise measurement.

## Webhooks vs. Polling for Fitness Data: How to Decide

- Question: webhooks vs polling for fitness data
- HTML: https://aifitnessapi.com/learn/webhooks-vs-polling-for-fitness-data
- Markdown: https://aifitnessapi.com/learn/webhooks-vs-polling-for-fitness-data.md
- Last reviewed: 2026-08-12

The first question is not which transport is better but whether you have a choice, because the provider often decides for you: Garmin pushes to callback URLs you register and does not let you poll, Android Health Connect has no push mechanism at all, and Strava, WHOOP and Fitbit offer an opt-in subscription on top of a pollable REST API. Poll when you have no public endpoint, when freshness is measured in hours, or when your user count sits comfortably inside per-user quotas like Fitbit's roughly 150 requests per hour per consented user. Push when arrival is unpredictable and quota pressure makes timer-based fetching expensive. Expect a hybrid either way: most fitness webhooks carry a pointer rather than data, so the webhook is really a cache-invalidation signal, and a low-frequency reconciliation poll stays as the only thing covering what the push stream drops.

## What Are OAuth Scopes (and How Health APIs Grant Them)?

- Question: what are oauth scopes
- HTML: https://aifitnessapi.com/learn/what-are-oauth-scopes
- Markdown: https://aifitnessapi.com/learn/what-are-oauth-scopes.md
- Last reviewed: 2026-08-12

An OAuth scope is a named string attached to an access token that caps what that token may read or write — Fitbit's activity or heartrate, Strava's activity:read_all, WHOOP's read:sleep. In health APIs the user grants them per collection rather than all-or-nothing, so the set you requested and the set you received routinely differ and you have to read the granted scope back out of the response. A scope is also only one layer of permission: an OS permission like HealthKit or Health Connect is a device access control, and a platform entitlement like Apple's HealthKit capability or Garmin's partner-level program grant is a build- or business-level gate, and each fails differently. The signature worth memorising is that a missing scope is a 403 with insufficient_scope rather than a 401, and refreshing never fixes it, because a refresh mints a token carrying the same scopes the user already granted.

## What Is RPE (Rating of Perceived Exertion)?

- Question: what is RPE
- HTML: https://aifitnessapi.com/learn/what-is-rpe
- Markdown: https://aifitnessapi.com/learn/what-is-rpe.md
- Last reviewed: 2026-08-12

RPE stands for rating of perceived exertion: a number a person gives to describe how hard an effort felt to them. It is a self-report rather than a measurement, so no sensor produces it and no wearable or health-data API exposes it, because there is nothing for a device to observe. Two conventions dominate: a 6-to-20 range commonly described as the Borg scale, and a modern 0-to-10 range usually anchored to reps in reserve, meaning how many more repetitions the person believes they had left. For a fitness app that makes RPE your own field in your own schema, collected from your own interface, and useful as a personal trend feeding auto-regulation rather than as a precise or cross-user comparable number.
