Introduction

⚠️ Pre-Release / Under Construction

This page is currently under active development and is provided in a pre-release state.

Content may be incomplete, outdated, or inaccurate, and details may changewithout notice as the implementation evolves.

Please use this documentation for early reference only, and avoid relying on it for production-critical decisions until the page is marked as stable.

Introduction & Quick Start

What Are Planned Workouts?

Planned workouts let you push structured training sessions directly to your users' fitness devices. Instead of users manually creating workouts on their watch or bike computer, your app can:

  1. Create reusable workout templates - Define the structure once

  2. Schedule to any user - Apply athlete-specific parameters at scheduling time

  3. Sync to device - Workout appears on user's Garmin, COROS, Wahoo, etc.

Two-Phase Workflow

┌─────────────────────────────────────────────────────────────────┐
│  Phase 1: Create Template (once)                                │
│  POST /workouts                                                 │
│  → Returns workout_id                                           │
└─────────────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────────────┐
│  Phase 2: Schedule to User (per athlete)                        │
│  POST /workouts/{workout_id}/plan?user_id=X                     │
│  → Applies athlete's max HR, FTP, etc.                          │
│  → Pushes to user's connected device                            │
└─────────────────────────────────────────────────────────────────┘

Quick Start Example

Step 1: Create a Workout Template

Create a simple 20-minute interval run: 5min warmup → 3x(3min fast, 2min easy) → 5min cooldown

Response:

Step 2: Schedule to a User

Push the workout to a specific user for tomorrow, with their max heart rate:

Response:

The workout now appears on the user's device, with the 85-90% HR targets converted to 157-167 BPM based on their max HR of 185.

Authentication

All requests require two headers:

Header
Description

dev-id

Your Terra developer ID

x-api-key

Your Terra API key

Supported Providers

Provider
Running
Cycling
Swimming
Strength

Garmin

COROS

Wahoo

Suunto

TrainingPeaks

Huawei

Zepp

Hevy

Apple

Not all providers support all operations (update, retrieve, delete). See Provider Compatibility for detailed feature and operations support.

Next Steps

  • Core Concepts - Understand workout structure

  • Athlete Parameters - Personalize for each user

  • Sport-Specific Examples - Copy-paste examples

Last updated

Was this helpful?