SwollStep / Developers
SWOLLSTEP API / DOCUMENTATION

Build the plan. Leave the workout to SwollStep.

Create structured workouts and training Programs from your tools, scripts, or AI agent. SwollStep takes care of the step-by-step session on iPhone.

Public docs. Private training.

Anyone can read these docs. API requests require an account-scoped token created in the app.

THE WORKFLOW
  1. Read the owner’s catalog
  2. Create workouts or a Program
  3. Verify the saved definitions
  4. Open SwollStep and sync

Creation returns 201 after the records are saved. No import or approval step is needed in the app.

Your first workout

  1. In SwollStep, open Settings → Agent API and create a token. Copy it once and keep it in your tool’s secret store.
  2. Set SWOLLSTEP_TOKEN in your environment. Read your catalog before choosing exercise definitions.
  3. Save the example as workout.json. Its weights are illustrative; choose targets that fit the owner and reuse catalog IDs when available.
  4. Set SWOLLSTEP_REQUEST_KEY to a new unique key. Save that key and exact file for retries, then POST the request.
  5. Read the returned workout IDs to verify creation. Open and sync the app to see them in the library.

Use a new key for a new creation. Retry an uncertain request with its original key and unchanged body.

1 / Read catalog
curl --request GET \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/catalog' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN"
2 / workout.json
{
  "exercises": [
    {
      "key": "bench",
      "name": "Bench press",
      "fields": [
        "load",
        "reps",
        "rest"
      ]
    },
    {
      "key": "walk",
      "name": "Brisk walk",
      "fields": [
        "duration"
      ]
    }
  ],
  "workouts": [
    {
      "key": "strength",
      "title": "Strength day",
      "color": "blue",
      "blocks": [
        {
          "title": "Warm-up",
          "items": [
            {
              "exercise": "walk",
              "targets": {
                "duration_seconds": 300
              }
            }
          ]
        },
        {
          "title": "Bench press",
          "items": [
            {
              "title": "Ramp-up",
              "exercises": [
                {
                  "exercise": "bench",
                  "targets": {
                    "load_type": "externalWeight",
                    "weight_lb": 45,
                    "reps": 10,
                    "rest_seconds": 60
                  }
                },
                {
                  "exercise": "bench",
                  "targets": {
                    "load_type": "externalWeight",
                    "weight_lb": 95,
                    "reps": 5,
                    "rest_seconds": 60
                  }
                }
              ]
            },
            {
              "title": "Working sets",
              "fields": {
                "rounds": 3
              },
              "exercises": [
                {
                  "exercise": "bench",
                  "targets": {
                    "load_type": "externalWeight",
                    "weight_lb": 140,
                    "reps": 8,
                    "rest_seconds": 90
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
3 / Create workout
curl --request POST \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/workouts' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $SWOLLSTEP_REQUEST_KEY" \
  --data-binary @workout.json

Tokens & permissions

Send Authorization: Bearer swollstep_… on every API request. Tokens belong to one account, expire after 90 days by default, and can be revoked in the app. Their secret is shown only once.

What a token can do

Read owned definitions and creation receipts. Create new workouts and Programs.

Keep the owner in control

Tokens cannot update or delete existing records, access performed results, or start or finish a workout. Give a token only to tools you trust. Revoke it if exposed.

Creation request headers
Authorization: Bearer $SWOLLSTEP_TOKEN
Content-Type: application/json
Idempotency-Key: $SWOLLSTEP_REQUEST_KEY

Connect your agent

Give your agent the guide URL and your training request. Supply the token through its secret mechanism. These public files contain no account data.

Agent guide ↗Workflow, scope, and modeling rulesOpenAPI specification ↗Exact schemas, enums, and endpointsllms.txt ↗Documentation discoveryFull plain-text docs ↗Guide and complete machine-readable schema

Agents should ask for essential targets they do not know. The catalog does not expose workout history.

Copy into your agent’s instructions
Use https://swollstep.app/docs/agent-guide.md and https://swollstep.app/docs/openapi.json to create my requested workouts or Program. Read my catalog first and reuse suitable owned IDs. Ask me for missing essential targets. Keep drafts unscheduled unless I request dates. Keep my API token secret and use it only with https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api. Save the exact payload and a unique idempotency key before creation. Verify the returned IDs and report what was created. Do not claim access to my workout history.

Model a workout

Workout → Block → Group → Step. A step references an exercise definition and carries its own targets. A block can contain direct steps or explicit groups.

  • Put warm-up first, then mobility, ramp-up immediately before working sets, core, and cool-down.
  • Use group fields.rounds for repeated identical sets. Give different ramp-up loads separate steps.
  • Names are optional and default on save. Labels describe intent; they do not control execution.
  • Put required work in structured targets. Instructions are optional technique context.
  • Loads are pounds. Specify rep scope and weight basis where needed. Bodyweight work logs reps without pounds.
  • Use record_only_fields for measurements to log without a prescribed target.

Every attached target field needs its target unless explicitly recording-only. Load needs load_type; external weight needs weight_lb.

Ramp-up + working sets
{
  "title": "Bench press",
  "items": [
    {
      "title": "Ramp-up",
      "exercises": [
        {
          "exercise": "bench",
          "targets": {
            "load_type": "externalWeight",
            "weight_lb": 45,
            "reps": 10,
            "rest_seconds": 60
          }
        },
        {
          "exercise": "bench",
          "targets": {
            "load_type": "externalWeight",
            "weight_lb": 95,
            "reps": 5,
            "rest_seconds": 60
          }
        }
      ]
    },
    {
      "title": "Working sets",
      "fields": {
        "rounds": 3
      },
      "exercises": [
        {
          "exercise": "bench",
          "targets": {
            "load_type": "externalWeight",
            "weight_lb": 140,
            "reps": 8,
            "rest_seconds": 90
          }
        }
      ]
    }
  ]
}

Programs & progression

Create a draft by omitting both start_date and end_date. Supply both dates only when the owner requests scheduling. Dates are inclusive floating calendar dates; the maximum range is 366 days.

Weekly schedules

Rules use Sunday = 1 through Saturday = 7. Target changes belong to the rule and use either relative week or scheduled effective_date. Partial patches accumulate and preserve omitted targets.

Relative plans

Use week_count (1–52) and seven relative_days numbered 1–7, without weekday rules or dates. The app anchors Day 1 only when the owner schedules the plan. Optional workouts can offer rest; a rest-only day omits its workout and sets rest_alternative: true.

Each scheduled occurrence has a frozen prescription. Automatic performance-based progression and RRULE parsing are not implemented.

Complete examples

Scheduled strength Program ↗

Rule-level progression ↗

Unscheduled relative plan ↗

Example dates and targets are illustrative. Adapt them to the owner’s request before submitting.

Retries, errors & limits

POST requires a durable Idempotency-Key (1–128 characters: letters, numbers, dot, underscore, colon, or hyphen). Retry with the same token, key, and exact body to retain the same IDs. Different content under an accepted key returns 409.

Duplicate names, including archived definitions, are checked transactionally. Reuse owned UUIDs instead of recreating existing definitions.

401 Invalid, expired, or revoked token.

404 Owned definition or receipt not found.

409 Duplicate name/ID or idempotency conflict. Inspect before retrying.

415 Send application/json.

422 Invalid prescription. Fix the fields described in the error.

429 Rate limit. Wait before retrying; preserve the key and body.

503 Backend unavailable. Retry with backoff and the original key/body.

Request limits

1 MiB request body
5 MiB expanded prescriptions
30 new operations/minute/token
200 new exercises
50 new workouts
1,000 prescribed steps
2,000 scheduled entries

Read your catalog

GET/v1/catalog

Read owned exercise, workout, recipe, and Program definitions. Results and workout history are excluded.

Parameters

include_archived query

Include owned archived definitions for inspection/reuse.

default: false

Responses

200 Latest uploaded catalogue; excludes history

401 Invalid token

503 Unavailable

cURL
curl --request GET \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/catalog' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN"

Create a Program

POST/v1/programs

Create a Program with new or existing workouts. Omit both dates for a draft.

Parameters

Idempotency-Key header · required

pattern: ^[A-Za-z0-9._:-]{1,128}$

Request body

CreateProgram schema → · application/json

Responses

201 Created atomically in normalized tables; immediately readable

400 Missing/invalid idempotency key

401 Invalid token

404 Not found

409 Idempotency conflict

415 Unsupported content type

422 Invalid prescription

429 Limit reached

503 Unavailable

cURL
curl --request POST \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/programs' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $SWOLLSTEP_REQUEST_KEY" \
  --data-binary @program.json

Retrieve a Program

GET/v1/programs/{id}

Retrieve an owned definition or creation receipt by UUID.

Parameters

id path · required

Native Program UUID

Responses

200 Import receipt

401 Invalid token

404 Not found

503 Unavailable

cURL
curl --request GET \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/programs/{id}' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN"

getOpenAPISpec

GET/openapi.json

Public OpenAPI specification; no token required

Responses

200 OpenAPI 3.1 document

cURL
curl --request GET \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/openapi.json' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN"

Create workouts

POST/v1/workouts

Create library workouts without dates or schedule entries.

Parameters

Idempotency-Key header · required

pattern: ^[A-Za-z0-9._:-]{1,128}$

Request body

CreateWorkouts schema → · application/json

Responses

201 Created atomically in normalized tables; immediately readable

400 Missing/invalid idempotency key

401 Invalid token

404 Not found

409 Idempotency conflict

415 Unsupported content type

422 Invalid prescription

429 Limit reached

503 Unavailable

cURL
curl --request POST \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/workouts' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: $SWOLLSTEP_REQUEST_KEY" \
  --data-binary @workout.json

getCreationOperation

GET/v1/operations/{id}

Retrieve an owned definition or creation receipt by UUID.

Parameters

id path · required

Import receipt ID returned by POST, not the native Program ID.

Responses

200 Import receipt plus canonical workouts and exercise definitions

401 Invalid token

404 Not found

503 Unavailable

cURL
curl --request GET \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/operations/{id}' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN"

Retrieve a workout

GET/v1/workouts/{id}

Retrieve an owned definition or creation receipt by UUID.

Parameters

id path · required

Native workout UUID

Responses

200 Import receipt

401 Invalid token

404 Not found

503 Unavailable

cURL
curl --request GET \
  'https://fvgemdcvjuknvzdqkurt.supabase.co/functions/v1/agent-api/v1/workouts/{id}' \
  --header "Authorization: Bearer $SWOLLSTEP_TOKEN"

CreateProgram

exercises array<object>
Child fields

minItems: 0 · maxItems: 200

key string required

maxLength: 80 · pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$

name string required

minLength: 1 · maxLength: 200

fields array<string> required

minItems: 1 · maxItems: 10

Values: load, reps, duration, distance, pace, effort, stroke, rest, repsInReserve, equipment

distance_unit string

Values: meters, kilometers, miles, yards

pace_unit string

Values: perKilometer, perMile, per100Meters, per100Yards

workouts array<object>
Child fields

minItems: 0 · maxItems: 50

key string required

maxLength: 80 · pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$

title string

maxLength: 200

color string

Values: indigo, blue, green, orange, pink, purple

blocks array<object> required
Child fields

minItems: 1 · maxItems: 50

title string

maxLength: 200

labels array<string>

minItems: 0 · maxItems: 20

minLength: 1 · maxLength: 80

items array<Step | Group> required

minItems: 1 · maxItems: 100

Step →Group →
description string

maxLength: 4000

labels array<string>

maxItems: 20

maxLength: 80

estimated_duration_seconds integer

minimum: 1 · maximum: 86400

duration_progression_seconds array<integer>

Ordered reference duration targets, typically one per week. Does not create dates, Programs or schedule entries.

minItems: 1 · maxItems: 52

minimum: 1 · maximum: 86400

program object | object required
Child fields
title string

maxLength: 200

start_date string

Optional. Provide both start_date and end_date only when scheduling.

end_date string

Optional. Omit both dates for an unscheduled Program.

rules array<object>
Child fields

minItems: 1 · maxItems: 40

weekday integer required

Sunday=1 through Saturday=7

minimum: 1 · maximum: 7

workout string required

New workout key or available catalogue UUID

maxLength: 80

changes array<object | object>
Child fields

maxItems: 100

effective_date string

Unique effective date within the Program range. Changes accumulate in chronological order.

targets array<object> required
Child fields

minItems: 1 · maxItems: 1000

step string required

Step key declared on this workout or existing catalogue step UUID.

maxLength: 80

targets TargetPatch required
TargetPatch →
week integer

Program-relative week. Works without calendar dates.

minimum: 1 · maximum: 52

description string

maxLength: 4000

week_count integer

minimum: 1 · maximum: 52

relative_days array<object>
Child fields

Unscheduled relative plan: each Day 1–7 exactly once. Expands into week_count weeks with independent prescriptions. Mutually exclusive with rules and dates.

minItems: 7 · maxItems: 7

day integer required

minimum: 1 · maximum: 7

workout string

maxLength: 80

optional boolean
rest_alternative boolean
notes string

maxLength: 4000

changes array<object | object>
Child fields

maxItems: 100

effective_date string

Unique effective date within the Program range. Changes accumulate in chronological order.

targets array<object> required
Child fields

minItems: 1 · maxItems: 1000

step string required

Step key declared on this workout or existing catalogue step UUID.

maxLength: 80

targets TargetPatch required
TargetPatch →
week integer

Program-relative week. Works without calendar dates.

minimum: 1 · maximum: 52

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "exercises": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*import docs from './docs-assets.js';quot;,
            "maxLength": 80
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "load",
                "reps",
                "duration",
                "distance",
                "pace",
                "effort",
                "stroke",
                "rest",
                "repsInReserve",
                "equipment"
              ]
            },
            "minItems": 1,
            "maxItems": 10,
            "uniqueItems": true
          },
          "distance_unit": {
            "type": "string",
            "enum": [
              "meters",
              "kilometers",
              "miles",
              "yards"
            ]
          },
          "pace_unit": {
            "type": "string",
            "enum": [
              "perKilometer",
              "perMile",
              "per100Meters",
              "per100Yards"
            ]
          }
        },
        "required": [
          "key",
          "name",
          "fields"
        ]
      },
      "minItems": 0,
      "maxItems": 200
    },
    "workouts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*import docs from './docs-assets.js';quot;,
            "maxLength": 80
          },
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "color": {
            "type": "string",
            "enum": [
              "indigo",
              "blue",
              "green",
              "orange",
              "pink",
              "purple"
            ]
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "title": {
                  "type": "string",
                  "maxLength": 200
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "minItems": 0,
                  "maxItems": 20
                },
                "items": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Step"
                      },
                      {
                        "$ref": "#/components/schemas/Group"
                      }
                    ]
                  },
                  "minItems": 1,
                  "maxItems": 100
                }
              },
              "required": [
                "items"
              ]
            },
            "minItems": 1,
            "maxItems": 50
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 80
            },
            "maxItems": 20
          },
          "estimated_duration_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 86400
          },
          "duration_progression_seconds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 52,
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 86400
            },
            "description": "Ordered reference duration targets, typically one per week. Does not create dates, Programs or schedule entries."
          }
        },
        "required": [
          "key",
          "blocks"
        ]
      },
      "minItems": 0,
      "maxItems": 50
    },
    "program": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "title": {
          "type": "string",
          "maxLength": 200
        },
        "start_date": {
          "type": "string",
          "format": "date",
          "description": "Optional. Provide both start_date and end_date only when scheduling."
        },
        "end_date": {
          "type": "string",
          "format": "date",
          "description": "Optional. Omit both dates for an unscheduled Program."
        },
        "rules": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "weekday": {
                "type": "integer",
                "minimum": 1,
                "maximum": 7,
                "description": "Sunday=1 through Saturday=7"
              },
              "workout": {
                "type": "string",
                "maxLength": 80,
                "description": "New workout key or available catalogue UUID"
              },
              "changes": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "targets"
                  ],
                  "properties": {
                    "effective_date": {
                      "type": "string",
                      "format": "date",
                      "description": "Unique effective date within the Program range. Changes accumulate in chronological order."
                    },
                    "targets": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 1000,
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "step",
                          "targets"
                        ],
                        "properties": {
                          "step": {
                            "type": "string",
                            "maxLength": 80,
                            "description": "Step key declared on this workout or existing catalogue step UUID."
                          },
                          "targets": {
                            "$ref": "#/components/schemas/TargetPatch"
                          }
                        }
                      }
                    },
                    "week": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 52,
                      "description": "Program-relative week. Works without calendar dates."
                    }
                  },
                  "oneOf": [
                    {
                      "required": [
                        "week"
                      ],
                      "not": {
                        "required": [
                          "effective_date"
                        ]
                      }
                    },
                    {
                      "required": [
                        "effective_date"
                      ],
                      "not": {
                        "required": [
                          "week"
                        ]
                      }
                    }
                  ]
                }
              }
            },
            "required": [
              "weekday",
              "workout"
            ]
          },
          "minItems": 1,
          "maxItems": 40
        },
        "description": {
          "type": "string",
          "maxLength": 4000
        },
        "week_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 52
        },
        "relative_days": {
          "type": "array",
          "minItems": 7,
          "maxItems": 7,
          "description": "Unscheduled relative plan: each Day 1–7 exactly once. Expands into week_count weeks with independent prescriptions. Mutually exclusive with rules and dates.",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "day"
            ],
            "properties": {
              "day": {
                "type": "integer",
                "minimum": 1,
                "maximum": 7
              },
              "workout": {
                "type": "string",
                "maxLength": 80
              },
              "optional": {
                "type": "boolean"
              },
              "rest_alternative": {
                "type": "boolean"
              },
              "notes": {
                "type": "string",
                "maxLength": 4000
              },
              "changes": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "targets"
                  ],
                  "properties": {
                    "effective_date": {
                      "type": "string",
                      "format": "date",
                      "description": "Unique effective date within the Program range. Changes accumulate in chronological order."
                    },
                    "targets": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 1000,
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "step",
                          "targets"
                        ],
                        "properties": {
                          "step": {
                            "type": "string",
                            "maxLength": 80,
                            "description": "Step key declared on this workout or existing catalogue step UUID."
                          },
                          "targets": {
                            "$ref": "#/components/schemas/TargetPatch"
                          }
                        }
                      }
                    },
                    "week": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 52,
                      "description": "Program-relative week. Works without calendar dates."
                    }
                  },
                  "oneOf": [
                    {
                      "required": [
                        "week"
                      ],
                      "not": {
                        "required": [
                          "effective_date"
                        ]
                      }
                    },
                    {
                      "required": [
                        "effective_date"
                      ],
                      "not": {
                        "required": [
                          "week"
                        ]
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "required": [],
      "oneOf": [
        {
          "required": [
            "rules"
          ],
          "not": {
            "required": [
              "relative_days"
            ]
          }
        },
        {
          "required": [
            "relative_days",
            "week_count"
          ],
          "not": {
            "anyOf": [
              {
                "required": [
                  "rules"
                ]
              },
              {
                "required": [
                  "start_date"
                ]
              },
              {
                "required": [
                  "end_date"
                ]
              }
            ]
          }
        }
      ]
    }
  },
  "required": [
    "program"
  ]
}

Targets

load_type string

Values: bodyweight, externalWeight, none

weight_lb number

minimum: 0 · maximum: 10000

reps integer

minimum: 1 · maximum: 100000

rep_scope string

Values: total, perSide, perDirection

weight_basis string

Values: total, perDumbbell

duration_seconds integer

minimum: 1 · maximum: 86400

distance number

minimum: 0.000001 · maximum: 1000000

pace_seconds integer

minimum: 1 · maximum: 86400

effort string

Values: easy, moderate, hard, maximal

stroke string

Values: freestyle, backstroke, breaststroke, butterfly, mixed

rest_seconds integer

minimum: 0 · maximum: 86400

reps_in_reserve integer

minimum: 0 · maximum: 100

equipment string

maxLength: 200

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "load_type": {
      "type": "string",
      "enum": [
        "bodyweight",
        "externalWeight",
        "none"
      ]
    },
    "weight_lb": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000
    },
    "reps": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "rep_scope": {
      "type": "string",
      "enum": [
        "total",
        "perSide",
        "perDirection"
      ]
    },
    "weight_basis": {
      "type": "string",
      "enum": [
        "total",
        "perDumbbell"
      ]
    },
    "duration_seconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 86400
    },
    "distance": {
      "type": "number",
      "minimum": 0.000001,
      "maximum": 1000000
    },
    "pace_seconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 86400
    },
    "effort": {
      "type": "string",
      "enum": [
        "easy",
        "moderate",
        "hard",
        "maximal"
      ]
    },
    "stroke": {
      "type": "string",
      "enum": [
        "freestyle",
        "backstroke",
        "breaststroke",
        "butterfly",
        "mixed"
      ]
    },
    "rest_seconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "reps_in_reserve": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "equipment": {
      "type": "string",
      "maxLength": 200
    }
  }
}

Step

exercise string required

New exercise key or available catalogue UUID.

maxLength: 80

title string

maxLength: 200

labels array<string>

minItems: 0 · maxItems: 20

minLength: 1 · maxLength: 80

instructions string

maxLength: 2000

targets Targets required
Targets →
key string

Optional unique step key within a workout, used by dated target changes.

maxLength: 80 · pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$

record_only_fields array<string>

Attached measurements to record without requiring a prescribed target. Actual results remain empty until performed.

maxItems: 6

Values: reps, duration, distance, pace, effort, stroke

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "exercise": {
      "type": "string",
      "maxLength": 80,
      "description": "New exercise key or available catalogue UUID."
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80
      },
      "minItems": 0,
      "maxItems": 20
    },
    "instructions": {
      "type": "string",
      "maxLength": 2000
    },
    "targets": {
      "$ref": "#/components/schemas/Targets"
    },
    "key": {
      "type": "string",
      "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*import docs from './docs-assets.js';quot;,
      "maxLength": 80,
      "description": "Optional unique step key within a workout, used by dated target changes."
    },
    "record_only_fields": {
      "type": "array",
      "maxItems": 6,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "reps",
          "duration",
          "distance",
          "pace",
          "effort",
          "stroke"
        ]
      },
      "description": "Attached measurements to record without requiring a prescribed target. Actual results remain empty until performed."
    }
  },
  "required": [
    "exercise",
    "targets"
  ]
}

Group

title string

maxLength: 200

labels array<string>

minItems: 0 · maxItems: 20

minLength: 1 · maxLength: 80

fields object
Child fields
rounds integer

minimum: 1 · maximum: 100

duration_seconds integer

minimum: 1 · maximum: 86400

interval_seconds integer

minimum: 1 · maximum: 86400

rest_between_rounds_seconds integer

minimum: 0 · maximum: 86400

repetition string

Values: once, untilDuration

tracks_rounds boolean
exercises array<Step> required

minItems: 1 · maxItems: 100

Step →
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "labels": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80
      },
      "minItems": 0,
      "maxItems": 20
    },
    "fields": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "rounds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "duration_seconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 86400
        },
        "interval_seconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 86400
        },
        "rest_between_rounds_seconds": {
          "type": "integer",
          "minimum": 0,
          "maximum": 86400
        },
        "repetition": {
          "type": "string",
          "enum": [
            "once",
            "untilDuration"
          ]
        },
        "tracks_rounds": {
          "type": "boolean"
        }
      }
    },
    "exercises": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Step"
      },
      "minItems": 1,
      "maxItems": 100
    }
  },
  "required": [
    "exercises"
  ]
}

Receipt

id string required

Creation operation ID; use /v1/operations/{id} for its receipt.

status string required

Values: created

created_at string required
programs array<object> required
Child fields

minItems: 0 · maxItems: 100

id string required
title string required
workout_ids array<string> required

minItems: 0 · maxItems: 100

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Creation operation ID; use /v1/operations/{id} for its receipt."
    },
    "status": {
      "type": "string",
      "enum": [
        "created"
      ]
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "programs": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title"
        ]
      },
      "minItems": 0,
      "maxItems": 100
    },
    "workout_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "minItems": 0,
      "maxItems": 100
    }
  },
  "required": [
    "id",
    "status",
    "created_at",
    "programs",
    "workout_ids"
  ]
}

Error

error string required
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "string"
    }
  },
  "required": [
    "error"
  ]
}

TargetPatch

Partial target changes; omitted targets retain their previous value. Only attached fields may change. load_type=bodyweight/none clears an omitted external weight.

load_type string

Values: bodyweight, externalWeight, none

weight_lb number

minimum: 0 · maximum: 10000

reps integer

minimum: 1 · maximum: 100000

rep_scope string

Values: total, perSide, perDirection

weight_basis string

Values: total, perDumbbell

duration_seconds integer

minimum: 1 · maximum: 86400

distance number

minimum: 0.000001 · maximum: 1000000

pace_seconds integer

minimum: 1 · maximum: 86400

effort string

Values: easy, moderate, hard, maximal

stroke string

Values: freestyle, backstroke, breaststroke, butterfly, mixed

rest_seconds integer

minimum: 0 · maximum: 86400

reps_in_reserve integer

minimum: 0 · maximum: 100

equipment string

maxLength: 200

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "load_type": {
      "type": "string",
      "enum": [
        "bodyweight",
        "externalWeight",
        "none"
      ]
    },
    "weight_lb": {
      "type": "number",
      "minimum": 0,
      "maximum": 10000
    },
    "reps": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100000
    },
    "rep_scope": {
      "type": "string",
      "enum": [
        "total",
        "perSide",
        "perDirection"
      ]
    },
    "weight_basis": {
      "type": "string",
      "enum": [
        "total",
        "perDumbbell"
      ]
    },
    "duration_seconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 86400
    },
    "distance": {
      "type": "number",
      "minimum": 0.000001,
      "maximum": 1000000
    },
    "pace_seconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 86400
    },
    "effort": {
      "type": "string",
      "enum": [
        "easy",
        "moderate",
        "hard",
        "maximal"
      ]
    },
    "stroke": {
      "type": "string",
      "enum": [
        "freestyle",
        "backstroke",
        "breaststroke",
        "butterfly",
        "mixed"
      ]
    },
    "rest_seconds": {
      "type": "integer",
      "minimum": 0,
      "maximum": 86400
    },
    "reps_in_reserve": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "equipment": {
      "type": "string",
      "maxLength": 200
    }
  },
  "minProperties": 1,
  "description": "Partial target changes; omitted targets retain their previous value. Only attached fields may change. load_type=bodyweight/none clears an omitted external weight."
}

CreateWorkouts

exercises array<object>
Child fields

minItems: 0 · maxItems: 200

key string required

maxLength: 80 · pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$

name string required

minLength: 1 · maxLength: 200

fields array<string> required

minItems: 1 · maxItems: 10

Values: load, reps, duration, distance, pace, effort, stroke, rest, repsInReserve, equipment

distance_unit string

Values: meters, kilometers, miles, yards

pace_unit string

Values: perKilometer, perMile, per100Meters, per100Yards

workouts array<object> required
Child fields

minItems: 1 · maxItems: 50

key string required

maxLength: 80 · pattern: ^[a-zA-Z][a-zA-Z0-9_-]*$

title string

maxLength: 200

color string

Values: indigo, blue, green, orange, pink, purple

blocks array<object> required
Child fields

minItems: 1 · maxItems: 50

title string

maxLength: 200

labels array<string>

minItems: 0 · maxItems: 20

minLength: 1 · maxLength: 80

items array<Step | Group> required

minItems: 1 · maxItems: 100

Step →Group →
description string

maxLength: 4000

labels array<string>

maxItems: 20

maxLength: 80

estimated_duration_seconds integer

minimum: 1 · maximum: 86400

duration_progression_seconds array<integer> deprecated

Ordered reference duration targets, typically one per week. Does not create dates, Programs or schedule entries.

minItems: 1 · maxItems: 52

minimum: 1 · maximum: 86400

JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "workouts"
  ],
  "properties": {
    "exercises": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*import docs from './docs-assets.js';quot;,
            "maxLength": 80
          },
          "name": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "load",
                "reps",
                "duration",
                "distance",
                "pace",
                "effort",
                "stroke",
                "rest",
                "repsInReserve",
                "equipment"
              ]
            },
            "minItems": 1,
            "maxItems": 10,
            "uniqueItems": true
          },
          "distance_unit": {
            "type": "string",
            "enum": [
              "meters",
              "kilometers",
              "miles",
              "yards"
            ]
          },
          "pace_unit": {
            "type": "string",
            "enum": [
              "perKilometer",
              "perMile",
              "per100Meters",
              "per100Yards"
            ]
          }
        },
        "required": [
          "key",
          "name",
          "fields"
        ]
      },
      "minItems": 0,
      "maxItems": 200
    },
    "workouts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*import docs from './docs-assets.js';quot;,
            "maxLength": 80
          },
          "title": {
            "type": "string",
            "maxLength": 200
          },
          "color": {
            "type": "string",
            "enum": [
              "indigo",
              "blue",
              "green",
              "orange",
              "pink",
              "purple"
            ]
          },
          "blocks": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "title": {
                  "type": "string",
                  "maxLength": 200
                },
                "labels": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "minItems": 0,
                  "maxItems": 20
                },
                "items": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Step"
                      },
                      {
                        "$ref": "#/components/schemas/Group"
                      }
                    ]
                  },
                  "minItems": 1,
                  "maxItems": 100
                }
              },
              "required": [
                "items"
              ]
            },
            "minItems": 1,
            "maxItems": 50
          },
          "description": {
            "type": "string",
            "maxLength": 4000
          },
          "labels": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 80
            },
            "maxItems": 20
          },
          "estimated_duration_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 86400
          },
          "duration_progression_seconds": {
            "type": "array",
            "minItems": 1,
            "maxItems": 52,
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 86400
            },
            "description": "Ordered reference duration targets, typically one per week. Does not create dates, Programs or schedule entries.",
            "deprecated": true
          }
        },
        "required": [
          "key",
          "blocks"
        ]
      },
      "minItems": 1,
      "maxItems": 50
    }
  }
}