> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/planned-workouts-api/overview.md).

# Overview

> ⚠️ **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.

## Terra Planned Workouts API

Push structured workouts directly to your users' fitness devices.

### Documentation

1. Introduction & Quick Start - Get started in 5 minutes
2. Core Concepts - Workout structure, blocks, steps, targets
3. Athlete Parameters - Personalizing workouts per user
4. Sport-Specific Examples - Running, cycling, swimming, strength
5. Provider Compatibility - What works where
6. Coercion Warnings - Handling feature limitations
7. Exercise Reference - Garmin exercise names

### Quick Links

* OpenAPI Specification (to be added soon)
* Garmin Exercise Names reference

### API Endpoints

| Method | Endpoint                          | Description                                                         |
| ------ | --------------------------------- | ------------------------------------------------------------------- |
| POST   | `/workouts`                       | Create workout template                                             |
| GET    | `/workouts`                       | List all templates                                                  |
| GET    | `/workouts/{id}`                  | Get template details                                                |
| DELETE | `/workouts/{id}`                  | Delete template                                                     |
| POST   | `/workouts/{id}/plan?user_id=X`   | Schedule workout to user                                            |
| GET    | `/plannedWorkouts/{id}`           | Get planned workout details                                         |
| GET    | `/plannedWorkouts?user_id=X`      | List user's scheduled workouts (optional: `start_date`, `end_date`) |
| PATCH  | `/plannedWorkouts/{id}?user_id=X` | Update scheduled date (only `planned_date`, not athlete params)     |
| DELETE | `/plannedWorkouts/{id}?user_id=X` | Remove scheduled workout                                            |

{% hint style="warning" %}

#### Deleting a workout template cascades to all scheduled workouts

When you call `DELETE /workouts/{id}`, Terra automatically removes all planned workouts linked to that template from every connected provider (e.g. Garmin, Suunto, Wahoo) before deleting the template itself. This cannot be undone. If you only want to unschedule a workout for a specific user, use `DELETE /plannedWorkouts/{id}` instead.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tryterra.co/planned-workouts-api/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
