Skip to main content

Routine

The main routine object returned by the API.
export interface Routine {
  id: string;
  title: string;
  folder_id: number | null;
  updated_at: string;
  created_at: string;
  exercises: RoutineExercise[];
}
id
string
required
Unique identifier for the routine
title
string
required
Title of the routine
folder_id
number | null
required
ID of the folder containing this routine, or null if not in a folder
updated_at
string
required
ISO 8601 timestamp of last update
created_at
string
required
ISO 8601 timestamp of creation
exercises
RoutineExercise[]
required
Array of exercises in this routine

RoutineCreateInput

Input type for creating a new routine.
export interface RoutineCreateInput {
  title: string;
  folder_id?: number | null;
  notes?: string | null;
  exercises: RoutineExerciseInput[];
}
title
string
required
Title for the routine
folder_id
number | null
Optional folder ID to organize the routine
notes
string | null
Optional notes for the routine
exercises
RoutineExerciseInput[]
required
Array of exercises to include in the routine

RoutineUpdateInput

Input type for updating an existing routine.
export interface RoutineUpdateInput {
  title: string;
  notes?: string | null;
  exercises: RoutineExerciseInput[];
}
title
string
required
Updated title for the routine
notes
string | null
Optional updated notes for the routine
exercises
RoutineExerciseInput[]
required
Updated array of exercises in the routine

RoutineExercise

An exercise within a routine, containing planned sets and metadata.
export interface RoutineExercise {
  index: number;
  title: string;
  rest_seconds: string;
  notes: string;
  exercise_template_id: string;
  supersets_id: number | null;
  sets: RoutineSet[];
}
index
number
required
Position of the exercise in the routine (0-indexed)
title
string
required
Title of the exercise
rest_seconds
string
required
Rest time in seconds between sets (stored as string)
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
RoutineSet[]
required
Array of planned sets for this exercise

RoutineExerciseInput

Input type for creating an exercise within a routine.
export interface RoutineExerciseInput {
  exercise_template_id: string;
  superset_id?: number | null;
  rest_seconds?: number | null;
  notes?: string | null;
  sets: RoutineSetInput[];
}
exercise_template_id
string
required
ID of the exercise template to use
superset_id
number | null
Optional superset group ID
rest_seconds
number | null
Optional rest time in seconds between sets
notes
string | null
Optional notes for this exercise
sets
RoutineSetInput[]
required
Array of planned sets for this exercise

RoutineSet

A planned set within a routine exercise.
export interface RoutineSet extends RoutineSetInput {
  index: number;
  rpe: 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
Planned weight in kilograms
reps
number | null
Planned number of repetitions
distance_meters
number | null
Planned distance in meters
duration_seconds
number | null
Planned duration in seconds
custom_metric
number | null
Planned custom metric value
rep_range
{ start: number; end: number } | null
Optional rep range with start and end values
rpe
number | null
required
Rate of Perceived Exertion (RPE), or null if not specified

RoutineSetInput

Input type for creating a planned set within a routine exercise.
export interface RoutineSetInput {
  type: SetType;
  weight_kg?: number | null;
  reps?: number | null;
  distance_meters?: number | null;
  duration_seconds?: number | null;
  custom_metric?: number | null;
  rep_range?: { start: number; end: number } | null;
}
type
SetType
required
Type of set: "normal", "warmup", "dropset", or "failure"
weight_kg
number | null
Planned weight in kilograms
reps
number | null
Planned number of repetitions
distance_meters
number | null
Planned distance in meters
duration_seconds
number | null
Planned duration in seconds
custom_metric
number | null
Planned custom metric value
rep_range
{ start: number; end: number } | null
Optional rep range with start and end values

PaginatedRoutines

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

Build docs developers (and LLMs) love