TrainingPeaks Workouts API

Planned and completed workouts, changes, details, and analytics.

GitHub OpenAPI

Operations 20

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v2/workouts/{startDate}/{endDate} List my planned and completed workouts for a date range · Get workouts by date range #
Ask an LLM
“How do I pull all my planned and completed workouts for a week?”
“Can I include workout descriptions when fetching a date range?”
Tell an agent
List my workouts from {startDate} to {endDate}.
Show my planned and completed workouts between {startDate} and {endDate} with descriptions.
GET /v2/workouts/{athleteId}/{startDate}/{endDate} List an athlete's workouts for a date range · Get athlete workouts by date range #
Ask an LLM
“How do I see a single athlete's workouts for a date range?”
“Can a coach pull an athlete's planned and completed workouts?”
Tell an agent
List workouts for athlete {athleteId} from {startDate} to {endDate}.
Show athlete {athleteId}'s planned and completed workouts between {startDate} and {endDate}.
GET /v2/workouts/changed List workouts changed since a date · Get changed workouts #
Ask an LLM
“How do I sync only the workouts that changed since a date?”
“What workouts were modified after a given date?”
Tell an agent
List workouts changed since {date}.
Sync my workouts modified after {date}.
GET /v2/workouts/{athleteId}/changed List an athlete's changed workouts since a date · Get changed workouts for athlete #
Ask an LLM
“How do I sync an athlete's workouts changed since a date?”
“Can a coach get only the workouts that changed for one athlete?”
Tell an agent
List workouts changed for athlete {athleteId} since {date}.
Sync athlete {athleteId}'s workouts modified after {date}.
GET /v2/workouts/wod/{date} Get the planned workout of the day · Get Workout of the Day #
Ask an LLM
“What workout is planned for today?”
“Can I get the Workout of the Day for a future date?”
Tell an agent
Get the Workout of the Day for {date}.
Show today's planned workout.
GET /v2/workouts/wod/file/{workoutId}/ Download the Workout of the Day file · Get structured workout file #
Ask an LLM
“How do I download the planned workout file for a date?”
“Can I get the Workout of the Day in a specific format?”
Tell an agent
Download the Workout of the Day file for workout {workoutId} as {format}.
Get the planned workout {workoutId} in {format} format.
POST /v2/workouts/plan Create a planned workout · Create planned workout #
Ask an LLM
“How do I plan a new workout for an athlete?”
“Can a basic athlete create a workout for the future?”
Tell an agent
Create a planned workout titled {Title} for athlete {AthleteId}.
Plan a {WorkoutType} workout {Title} starting at {StartTime}.
PUT /v2/workouts/plan/{id} Update a planned workout · Update planned workout #
Ask an LLM
“How do I edit a planned workout by id?”
“Can I change the structure of an existing planned workout?”
Tell an agent
Update planned workout {id} with title {Title}.
Change the structure of planned workout {id} to {Structure}.
GET /v2/workouts/id/{id} Get one of my workouts by id · Get workout by id #
Ask an LLM
“How do I fetch a single workout by id?”
“Can I include the description when fetching one workout?”
Tell an agent
Get workout {id}.
Show my workout {id} with its description.
DELETE /v2/workouts/id/{id} Delete one of my workouts by id · Delete workout by id #
Ask an LLM
“How do I delete a workout I planned?”
“Can I remove a planned workout by id?”
Tell an agent destructive · confirm first
Delete workout {id}.
Remove my planned workout {id}.
GET /v2/workouts/{athleteId}/id/{id} Get an athlete's workout by id · Get athlete workout by id #
Ask an LLM
“How do I view one of my athlete's workouts by id?”
“Can a coach fetch a single athlete workout?”
Tell an agent
Get workout {id} for athlete {athleteId}.
Show athlete {athleteId}'s workout {id}.
DELETE /v2/workouts/{athleteId}/id/{id} Delete an athlete's workout by id · Delete athlete workout by id #
Ask an LLM
“How do I delete a workout from one of my athletes?”
“Can a coach remove an athlete's planned workout?”
Tell an agent destructive · confirm first
Delete workout {id} for athlete {athleteId}.
Remove athlete {athleteId}'s workout {id}.
GET /v2/workouts/id/{id}/meanmaxes Get mean-max data for a completed workout · Get workout mean-max data #
Ask an LLM
“How do I get power and HR mean-max curves for a completed workout?”
“What mean-max data is available for a completed workout?”
Tell an agent
Get mean-max data for my completed workout {id}.
Show the power and HR mean-max curves for workout {id}.
GET /v2/workouts/{athleteId}/id/{id}/meanmaxes Get mean-max data for an athlete's completed workout · Get athlete workout mean-max data #
Ask an LLM
“How do I get mean-max data for one of my athletes' completed workouts?”
“Can a coach view an athlete's mean-max curves?”
Tell an agent
Get mean-max data for athlete {athleteId}'s completed workout {id}.
Show the power and HR mean-max curves for athlete {athleteId}'s workout {id}.
GET /v2/workouts/id/{id}/timeinzones Get time-in-zones for a completed workout · Get workout time in zones #
Ask an LLM
“How do I see how much time I spent in each training zone?”
“What time-in-zones data is available for a completed workout?”
Tell an agent
Get time-in-zones for my completed workout {id}.
Show how long I spent in each zone for workout {id}.
GET /v2/workouts/{athleteId}/id/{id}/timeinzones Get time-in-zones for an athlete's completed workout · Get athlete workout time in zones #
Ask an LLM
“How do I see an athlete's time-in-zones for a completed workout?”
“Can a coach view an athlete's zone time?”
Tell an agent
Get time-in-zones for athlete {athleteId}'s completed workout {id}.
Show how much time athlete {athleteId} spent in each zone for workout {id}.
GET /v2/workouts/id/{id}/details Get sample-level detail data for a completed workout · Get workout details #
Ask an LLM
“How do I get sample-by-sample detail data for a completed workout?”
“What does a completed workout's detail data include?”
Tell an agent
Get sample-level detail data for my completed workout {id}.
Show the detail data for completed workout {id}.
GET /v2/workouts/{athleteId}/id/{id}/details Get completed workout details for an athlete · Get athlete workout details #
Ask an LLM
“How do I see the sample-level details of a completed workout for one athlete?”
“Does viewing an athlete's completed workout require the workouts:details scope?”
Tell an agent
Get the details of workout {id} for athlete {athleteId}.
Show sample-level data for athlete {athleteId}'s completed workout {id}.
POST /v2/workouts/{athleteId}/id/{workoutId}/comment Post a coach comment on an athlete's workout · Create workout comment #
Ask an LLM
“How do I leave a comment on an athlete's workout?”
“Can a coach add a comment to a planned workout?”
Tell an agent
Post a comment {Comment} on athlete {athleteId}'s workout {workoutId}.
Comment {Comment} on workout {workoutId} for athlete {athleteId}.
GET /v2/athletes/{athleteId}/strength-workouts List an athlete's strength workouts · Get strength workouts #
Ask an LLM
“How do I pull an athlete's strength workouts?”
“Can I list only the strength workouts for one athlete?”
Tell an agent
List strength workouts for athlete {athleteId}.
Show athlete {athleteId}'s strength training workouts.

Documentation

📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Athlete-Get-Profile
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/API-Endpoints
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Workouts-Get
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Workouts-Get-Details
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Workouts-Get-Mean-Max-Data
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Workout-Of-The-Day-Get
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Workout-Of-The-Day-Structured-Workout-File
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Metrics-Object
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/v2-Metrics-Get-By-Date-Range
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Athlete-Get-Nutrition
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Athlete-Post-Nutrition
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Coach-Get-Profile
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Coach-Get-Athletes
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/File-Upload
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/File-Upload-Asynchronous
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Event-Object
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Routes-Object
📖
Documentation
https://github.com/TrainingPeaks/PartnersAPI/wiki/Webhook-Create-Subscription
📖
APIReference
https://github.com/TrainingPeaks/PartnersAPI/wiki/Webhook-Get-Subscriptions

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/trainingpeaks:trainingpeaks-workouts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

trainingpeaks-workouts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TrainingPeaks Partners Workouts API
  version: '2.0'
  description: The TrainingPeaks Partners API (Public API) lets approved third-party applications read and write TrainingPeaks data on behalf of a user - athlete profiles, planned and completed workouts, structured workout files, wellness metrics, nutrition, events, routes, coach relationships, activity file uploads, and workout webhooks.
  contact:
    name: TrainingPeaks API Partnerships Team
    url: https://api.trainingpeaks.com/request-access
  x-access-model: partner-gated (application required; not available for personal use)
  x-endpoints-confirmed: true
  x-schemas-modeled: true
  x-documentation: https://github.com/TrainingPeaks/PartnersAPI/wiki
servers:
- url: https://api.trainingpeaks.com
  description: Production
- url: https://api.sandbox.trainingpeaks.com
  description: Sandbox (UAT; database refreshed weekly from production)
security:
- OAuth2: []
tags:
- name: Workouts
  description: Planned and completed workouts, changes, details, and analytics.
paths:
  /v2/workouts/{startDate}/{endDate}:
    get:
      tags:
      - Workouts
      summary: Get workouts by date range
      description: Retrieve the authenticated athlete's planned and completed workouts for a date range. Add includeDescription=true to include the description field. Scope workouts:read.
      operationId: getWorkouts
      parameters:
      - name: startDate
        in: path
        required: true
        schema:
          type: string
          format: date
      - name: endDate
        in: path
        required: true
        schema:
          type: string
          format: date
      - name: includeDescription
        in: query
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Workouts in the date range.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/{startDate}/{endDate}:
    get:
      tags:
      - Workouts
      summary: Get athlete workouts by date range
      description: Coach access to an athlete's workouts for a date range. Scope workouts:read.
      operationId: getAthleteWorkouts
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: startDate
        in: path
        required: true
        schema:
          type: string
          format: date
      - name: endDate
        in: path
        required: true
        schema:
          type: string
          format: date
      - name: includeDescription
        in: query
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: Athlete workouts in the date range.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/changed:
    get:
      tags:
      - Workouts
      summary: Get changed workouts
      description: Retrieve the authenticated athlete's workouts changed since a date, for incremental sync. Scope workouts:read.
      operationId: getChangedWorkouts
      parameters:
      - name: date
        in: query
        required: true
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: Changed workouts.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/changed:
    get:
      tags:
      - Workouts
      summary: Get changed workouts for athlete
      description: Coach access to an athlete's workouts changed since a date. Scope workouts:read.
      operationId: getChangedWorkoutsForAthlete
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: date
        in: query
        required: true
        schema:
          type: string
          format: date-time
      responses:
        '200':
          description: Changed workouts for the athlete.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/wod/{date}:
    get:
      tags:
      - Workouts
      summary: Get Workout of the Day
      description: Retrieve the athlete's upcoming planned workouts (Workout of the Day) for a date, including WorkoutFileFormats. Scope workouts:wod.
      operationId: getWorkoutOfTheDay
      parameters:
      - name: date
        in: path
        required: true
        schema:
          type: string
          format: date
      responses:
        '200':
          description: Workout of the Day.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/wod/file/{workoutId}/:
    get:
      tags:
      - Workouts
      summary: Get structured workout file
      description: Download the structured workout file for a planned workout in fit, erg, mrc, zwo, or json format. Scope workouts:wod.
      operationId: getWorkoutOfTheDayFile
      parameters:
      - name: workoutId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: format
        in: query
        required: true
        schema:
          type: string
          enum:
          - fit
          - erg
          - mrc
          - zwo
          - json
      responses:
        '200':
          description: The structured workout file.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/plan:
    post:
      tags:
      - Workouts
      summary: Create planned workout
      description: Create a planned workout. Coach (allowed to plan for the athlete) or a premium athlete; basic athletes may only create workouts for today or in the past. Scope workouts:plan.
      operationId: createWorkout
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Workout'
      responses:
        '201':
          description: The created workout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workout'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/plan/{id}:
    put:
      tags:
      - Workouts
      summary: Update planned workout
      description: Update a planned workout by id. Scope workouts:plan.
      operationId: updateWorkout
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Workout'
      responses:
        '200':
          description: The updated workout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/id/{id}:
    get:
      tags:
      - Workouts
      summary: Get workout by id
      description: Retrieve one of the authenticated athlete's workouts by id. Scope workouts:read.
      operationId: getWorkoutById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: includeDescription
        in: query
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: The workout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      tags:
      - Workouts
      summary: Delete workout by id
      description: Delete one of the authenticated athlete's workouts by id. Scope workouts:plan.
      operationId: deleteWorkoutById
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/id/{id}:
    get:
      tags:
      - Workouts
      summary: Get athlete workout by id
      description: Coach access to an athlete's workout by id. Scope workouts:read.
      operationId: getAthleteWorkoutById
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: includeDescription
        in: query
        required: false
        schema:
          type: boolean
      responses:
        '200':
          description: The workout.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workout'
        '401':
          $ref: '#/components/responses/Unauthorized'
    delete:
      tags:
      - Workouts
      summary: Delete athlete workout by id
      description: Coach access to delete an athlete's workout by id. Scope workouts:plan.
      operationId: deleteAthleteWorkoutById
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/id/{id}/meanmaxes:
    get:
      tags:
      - Workouts
      summary: Get workout mean-max data
      description: Mean-max power/pace/HR curves for a completed workout. Premium athlete required (403 for basic). Scope workouts:read.
      operationId: getWorkoutMeanMax
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Mean-max data.
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/id/{id}/meanmaxes:
    get:
      tags:
      - Workouts
      summary: Get athlete workout mean-max data
      description: Coach access to mean-max data for an athlete's completed workout. Premium required. Scope workouts:read.
      operationId: getAthleteWorkoutMeanMax
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Mean-max data.
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/id/{id}/timeinzones:
    get:
      tags:
      - Workouts
      summary: Get workout time in zones
      description: Time-in-zones for a completed workout. Premium athlete required. Scope workouts:read.
      operationId: getWorkoutTimeInZones
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Time-in-zones data.
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/id/{id}/timeinzones:
    get:
      tags:
      - Workouts
      summary: Get athlete workout time in zones
      description: Coach access to time-in-zones for an athlete's completed workout. Premium required. Scope workouts:read.
      operationId: getAthleteWorkoutTimeInZones
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Time-in-zones data.
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/id/{id}/details:
    get:
      tags:
      - Workouts
      summary: Get workout details
      description: Sample-level detail data for a completed workout. Requires a premium athlete (403), a completed workout (204), and an uploaded workout file (204). Scope workouts:details.
      operationId: getWorkoutDetails
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Workout detail sample data.
        '204':
          description: No detail data (workout not completed or no file uploaded).
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/id/{id}/details:
    get:
      tags:
      - Workouts
      summary: Get athlete workout details
      description: Coach access to sample-level detail data for an athlete's completed workout. Premium required. Scope workouts:details.
      operationId: getAthleteWorkoutDetails
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Workout detail sample data.
        '204':
          description: No detail data.
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/workouts/{athleteId}/id/{workoutId}/comment:
    post:
      tags:
      - Workouts
      summary: Create workout comment
      description: Post a coach comment to an athlete's workout. Premium athlete required. Scope workouts:details.
      operationId: createWorkoutComment
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: workoutId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                Comment:
                  type: string
      responses:
        '201':
          description: The created comment.
        '403':
          $ref: '#/components/responses/Forbidden'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /v2/athletes/{athleteId}/strength-workouts:
    get:
      tags:
      - Workouts
      summary: Get strength workouts
      description: Retrieve an athlete's strength workouts. Scope workouts:read.
      operationId: getStrengthWorkouts
      parameters:
      - name: athleteId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: Strength workouts.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StrengthWorkout'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    Workout:
      type: object
      description: Planned and/or completed workout. Modeled from the Workouts-Object wiki page; premium-only fields (Calories, TssActual, IF, NormalizedPower, etc.) return null for basic athletes.
      properties:
        Id:
          type: integer
          format: int64
        AthleteId:
          type: integer
          format: int64
        Title:
          type: string
        WorkoutType:
          type: string
          description: e.g. Bike
          Run: null
          Swim: null
          Strength.: null
        WorkoutDay:
          type: string
          format: date-time
        StartTime:
          type: string
          format: date-time
        IsItAnActivity:
          type: boolean
          description: Completed activity vs planned only.
        Distance:
          type: number
        DistancePlanned:
          type: number
        TotalTime:
          type: number
        TotalTimePlanned:
          type: number
        Description:
          type: string
          description: Returned only when includeDescription=true.
        WorkoutFileFormats:
          type: array
          description: Available structured file formats (fit, erg, mrc, zwo, json).
          items:
            type: string
        Structure:
          type: object
          description: Structured workout steps; overrides planned distance
          duration: null
          and TSS.: null
        TssActual:
          type: number
          description: Premium only.
        TssPlanned:
          type: number
          description: Premium only.
        IF:
          type: number
          description: Premium only.
        NormalizedPower:
          type: number
          description: Premium only.
        Calories:
          type: number
          description: Premium only.
    StrengthWorkout:
      type: object
      description: Strength workout. Modeled from Strength-Workouts-Object wiki page.
      properties:
        Id:
          type: integer
          format: int64
        AthleteId:
          type: integer
          format: int64
        WorkoutDay:
          type: string
          format: date-time
        Title:
          type: string
        Exercises:
          type: array
          items:
            type: object
            properties:
              Name:
                type: string
              Sets:
                type: integer
              Reps:
                type: integer
              Load:
                type: number
  responses:
    Forbidden:
      description: Refused - e.g. accessing an athlete no longer attached to the coach, or premium data for a basic athlete.
    BadRequest:
      description: One or more required fields are missing or incorrect.
    Unauthorized:
      description: Bad, expired, or missing authorization header.
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authorization code flow. Tokens are short-lived (expires_in seconds) and refreshed with the refresh_token grant. Scopes are not inclusive (e.g. workouts:details does not include workouts:read) and are limited to those granted to your application.
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.trainingpeaks.com/OAuth/Authorize
          tokenUrl: https://oauth.trainingpeaks.com/oauth/token
          refreshUrl: https://oauth.trainingpeaks.com/oauth/token
          scopes:
            athlete:profile: Read the authenticated athlete's profile and zones.
            coach:athletes: Read coach profile, athletes, and assistants.
            workouts:read: Read planned and completed workouts and analytics.
            workouts:plan: Create, update, and delete planned workouts.
            workouts:wod: Read Workout of the Day and structured workout files.
            workouts:details: Read workout detail samples and post comments.
            metrics:read: Read athlete metrics.
            metrics:write: Create athlete metrics.
            nutrition:read: Read athlete nutrition entries.
            nutrition:write: Create, update, and delete nutrition entries.
            events:read: Read athlete events.
            events:write: Create athlete events.
            routes:read: Read athlete routes.
            routes:write: Create athlete routes.
            file:write: Upload activity files.
            webhook:read-subscriptions: List webhook subscriptions.
            webhook:write-subscriptions: Create, update, and delete webhook subscriptions.