Skip to main content

Workout

The main workout object returned by the API.
export interface Workout {
  id: string;
  title: string;
  routine_id: string;
  description: string;
  start_time: string;
  end_time: string;
  updated_at: string;
  created_at: string;
  exercises: WorkoutExercise[];
}
id
string
required
Unique identifier for the workout
title
string
required
Title of the workout
routine_id
string
required
ID of the routine this workout is based on
description
string
required
Description of the workout
start_time
string
required
ISO 8601 timestamp when the workout started
end_time
string
required
ISO 8601 timestamp when the workout ended
updated_at
string
required
ISO 8601 timestamp of last update
created_at
string
required
ISO 8601 timestamp of creation
exercises
WorkoutExercise[]
required
Array of exercises performed in this workout

WorkoutInput

Input type for creating a new workout.
export interface WorkoutInput {
  title: string;
  description?: string | null;
  start_time: string;
  end_time: string;
  is_private?: boolean;
  exercises: ExerciseInput[];
}
title
string
required
Title for the workout
description
string | null
Optional description for the workout
start_time
string
required
ISO 8601 timestamp when the workout started
end_time
string
required
ISO 8601 timestamp when the workout ended
is_private
boolean
Whether the workout should be private (default: false)
exercises
ExerciseInput[]
required
Array of exercises to include in the workout

WorkoutExercise

An exercise within a workout, containing sets and metadata.
export interface WorkoutExercise {
  index: number;
  title: string;
  notes: string;
  exercise_template_id: string;
  supersets_id: number | null;
  sets: WorkoutSet[];
}
index
number
required
Position of the exercise in the workout (0-indexed)
title
string
required
Title of the exercise
notes
string
required
Notes for this exercise
exercise_template_id
string
required
ID of the exercise template this is based on
supersets_id
number | null
required
Superset group ID, or null if not part of a superset
sets
WorkoutSet[]
required
Array of sets performed for this exercise

ExerciseInput

Input type for creating an exercise within a workout.
export interface ExerciseInput {
  exercise_template_id: string;
  superset_id?: number | null;
  notes?: string | null;
  sets: SetInput[];
}
exercise_template_id
string
required
ID of the exercise template to use
superset_id
number | null
Optional superset group ID
notes
string | null
Optional notes for this exercise
sets
SetInput[]
required
Array of sets to perform for this exercise

WorkoutSet

A single set within a workout exercise.
export interface WorkoutSet {
  index: number;
  type: SetType;
  weight_kg: number | null;
  reps: number | null;
  distance_meters: number | null;
  duration_seconds: number | null;
  rpe: number | null;
  custom_metric: number | null;
}
index
number
required
Position of the set within the exercise (0-indexed)
type
SetType
required
Type of set: "normal", "warmup", "dropset", or "failure"
weight_kg
number | null
required
Weight used in kilograms, or null if not applicable
reps
number | null
required
Number of repetitions, or null if not applicable
distance_meters
number | null
required
Distance in meters, or null if not applicable
duration_seconds
number | null
required
Duration in seconds, or null if not applicable
rpe
number | null
required
Rate of Perceived Exertion (RPE), or null if not specified
custom_metric
number | null
required
Custom metric value, or null if not used

SetInput

Input type for creating a set within an exercise.
export interface SetInput {
  type: SetType;
  weight_kg?: number | null;
  reps?: number | null;
  distance_meters?: number | null;
  duration_seconds?: number | null;
  rpe?: 6 | 7 | 7.5 | 8 | 8.5 | 9 | 9.5 | 10 | null;
  custom_metric?: number | null;
}
type
SetType
required
Type of set: "normal", "warmup", "dropset", or "failure"
weight_kg
number | null
Weight used in kilograms
reps
number | null
Number of repetitions
distance_meters
number | null
Distance in meters
duration_seconds
number | null
Duration in seconds
rpe
6 | 7 | 7.5 | 8 | 8.5 | 9 | 9.5 | 10 | null
Rate of Perceived Exertion (RPE) value
custom_metric
number | null
Custom metric value

SetType

Union type for different set types.
export type SetType = "normal" | "warmup" | "dropset" | "failure";

PaginatedWorkouts

Paginated response containing multiple workouts.
export interface PaginatedWorkouts {
  page: number;
  page_count: number;
  workouts: Workout[];
}
page
number
required
Current page number (1-indexed)
page_count
number
required
Total number of pages available
workouts
Workout[]
required
Array of workouts on this page

WorkoutCountResponse

Response containing the total workout count.
export interface WorkoutCountResponse {
  workout_count: number;
}
workout_count
number
required
Total number of workouts

Workout Events

Workout events are used to track changes to workouts over time.

UpdatedWorkoutEvent

Event emitted when a workout is updated.
export interface UpdatedWorkoutEvent {
  type: "updated";
  workout: Workout;
}
type
string
required
Event type discriminator (always "updated")
workout
Workout
required
The updated workout object

DeletedWorkoutEvent

Event emitted when a workout is deleted.
export interface DeletedWorkoutEvent {
  type: "deleted";
  id: string;
  deleted_at: string;
}
type
string
required
Event type discriminator (always "deleted")
id
string
required
ID of the deleted workout
deleted_at
string
required
ISO 8601 timestamp when the workout was deleted

WorkoutEvent

Union type for all workout events.
export type WorkoutEvent = UpdatedWorkoutEvent | DeletedWorkoutEvent;

PaginatedWorkoutEvents

Paginated response containing workout events.
export interface PaginatedWorkoutEvents {
  page: number;
  page_count: number;
  events: WorkoutEvent[];
}
page
number
required
Current page number (1-indexed)
page_count
number
required
Total number of pages available
events
WorkoutEvent[]
required
Array of workout events on this page

Build docs developers (and LLMs) love