> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fitsociety.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Single completed plan — training-plan History detail

> Recorded history remains available after its plan or day is removed. Original session labels and performance targets/types are used when captured. Detail for ONE completed training plan — the SAME object shape as a single element of `plans[]` in the plan History **feed** tab (POST /app/v1/workout/plans/client/history). Returns `{ plan }` with the plan's days, each carrying its grouped `exercises[]` (standalone + superset blocks), plan targets, the 'Previous' column, and per-set + exercise-level PR flags. A coach passes `clientId` in the body; a client resolves from token.

Requires the workout_progress:read scope. This operation maps to /app/v1/workout/plans/client/history/plan/:planId and retains its Workout V2 permission, feature-flag, and resource-scope checks.

The clientId path parameter identifies the client represented by the request context.



## OpenAPI

````yaml /openapi/public-v1.json post /public/v1/workout/clients/{clientId}/plans/history/plan/{planId}
openapi: 3.1.0
info:
  title: FITsociety Public API v1
  version: 1.0.0
  description: >-
    Developer Public API endpoints under `/public/v1`. This reference is
    filtered to OAuth/Bearer Public API resources and excludes provider callback
    receivers, storefront routes, public widgets, wishlist routes, and
    access-device validation endpoints.
  contact:
    name: FITsociety Engineering
servers:
  - url: https://api.fitsociety.io
    description: Production
security: []
tags:
  - name: Workout
    description: >-
      Workout V2 libraries, programmes, client plans, calendars, sessions,
      groups, settings and progress. AI operations are excluded.
  - name: OAuth
    description: Public API OAuth endpoints for server-to-server client credentials.
  - name: Health
    description: Public API token health checks.
  - name: Platform
    description: >-
      Inspect Public API client context, capabilities, scopes, and redacted
      audit logs.
  - name: Company Catalog
    description: Read and manage company profile metadata and locations.
  - name: Clients
    description: >-
      Create and manage clients through the Public API using Bearer access
      tokens.
  - name: Coaches
    description: Retrieve coaches for the authenticated company via integrations.
  - name: Calendar Events
    description: Read Public API calendar events.
  - name: Calendar Templates
    description: >-
      Read and manage event types and event templates used by calendar
      availability and bookings.
  - name: Calendar Extensions
    description: >-
      Read recurring bookings, booking requests, calendar tasks, and
      availability closure metadata.
  - name: Availability
    description: Read bookable availability slots and signed availability tokens.
  - name: Availability Management
    description: >-
      Manage coach and location availability templates used to derive bookable
      slots.
  - name: Bookings
    description: Read and manage Public API bookings.
  - name: Finance
    description: >-
      Read invoices, transactions, products, subscriptions, and memberships with
      guarded finance writes.
  - name: Credits
    description: >-
      Read company-wide and client-scoped credit allocations, mutations, and
      guarded credit adjustments.
  - name: Exports
    description: >-
      Create and monitor asynchronous company exports through Public API Bearer
      endpoints.
  - name: Webhooks
    description: >-
      Manage outbound webhook subscriptions and inspect delivery attempts
      through Public API Bearer endpoints.
  - name: Measurements
    description: Read and write client measurement entries.
  - name: Progress Photos
    description: Read client progress photo metadata and short-lived signed media URLs.
  - name: Forms
    description: Read, create, update, and archive company form templates.
  - name: Intakes
    description: Assign intake forms and read client intake assignments and submissions.
  - name: Check-ups
    description: >-
      Schedule and cancel client check-ups and read their status and
      submissions.
  - name: Documents
    description: >-
      Read client document and folder metadata, register external document
      links, update metadata, and archive documents from Public API listings.
      Binary upload, permanent deletion, and company-wide document management
      are not exposed.
  - name: Habits
    description: Read habits and habit entries.
  - name: Goals
    description: Read client goal summaries.
  - name: Conversations
    description: >-
      Read and manage direct and group chat conversations through the Public
      API.
  - name: Reports
    description: Read aggregate attendance, revenue, and retention summaries.
paths:
  /public/v1/workout/clients/{clientId}/plans/history/plan/{planId}:
    post:
      tags:
        - Workout
      summary: Single completed plan — training-plan History detail
      description: >-
        Recorded history remains available after its plan or day is removed.
        Original session labels and performance targets/types are used when
        captured. Detail for ONE completed training plan — the SAME object shape
        as a single element of `plans[]` in the plan History **feed** tab (POST
        /app/v1/workout/plans/client/history). Returns `{ plan }` with the
        plan's days, each carrying its grouped `exercises[]` (standalone +
        superset blocks), plan targets, the 'Previous' column, and per-set +
        exercise-level PR flags. A coach passes `clientId` in the body; a client
        resolves from token.


        Requires the workout_progress:read scope. This operation maps to
        /app/v1/workout/plans/client/history/plan/:planId and retains its
        Workout V2 permission, feature-flag, and resource-scope checks.


        The clientId path parameter identifies the client represented by the
        request context.
      operationId: publicWorkoutpostPublicV1WorkoutClientsClientIdPlansHistoryPlanPlanId
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
            example: booking-create-20260714-001
          description: >-
            Required for Public API write requests. Reusing the same key with
            the same method, path, and body replays the stored successful
            response; reusing it with a different request returns `409
            idempotency.conflict`.
        - in: path
          name: planId
          required: true
          description: Assigned WorkoutPlan id.
          schema:
            type: string
            example: 67f1234567890abcdef1234
        - name: clientId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
          description: Client in the company bound to the Public API token.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/PublicWorkoutSourcePOSTAppV1WorkoutPlansClientHistoryPlanPlanIdRequest
            example:
              clientId: 67f1234567890abcdef9999
      responses:
        '200':
          description: The single completed plan with its days and grouped exercises.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PublicApiWriteSuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: >-
                          #/components/schemas/PublicWorkoutSourcePOSTAppV1WorkoutPlansClientHistoryPlanPlanIdResponse200
              examples:
                success:
                  summary: Successful response
                  value:
                    data:
                      plan:
                        _id: 67f1234567890abcdef1234
                        name: Weekly Strength Program
                        averageRating: 3.2
                        totalDays: 4
                        completedAt: '2026-04-12T10:00:00.000Z'
                        days:
                          - planMomentId: 67f1234567890abcdef1234
                            sessionId: 67f1234567890abcdef1234
                            name: 'Day 1: Dumbbell Bench Press'
                            description: ''
                            date: '2026-04-12T10:00:00.000Z'
                            durationMinutes: 50
                            totalVolume: 207
                            totalReps: 60
                            totalTimeSeconds: 0
                            totalDistanceMeters: 0
                            rating: 4
                            emojiRating: 4
                            emoji: 💪
                            exerciseCount: 6
                            scoring:
                              scoringType: forTime
                              descriptionOnly: true
                              acceptsManualResult: true
                              targetValue: null
                              timeDomain:
                                windowSeconds: null
                                timeCapSeconds: 900
                                rounds: 3
                                intervalSeconds: null
                                intervalCount: null
                                workSeconds: null
                                restSeconds: null
                              scoreValidation:
                                timeCapSeconds: 900
                                maxReps: null
                                expectedIntervals: null
                              result:
                                roundsCompleted: 5
                                repsPerRound: 30
                                extraReps: 12
                                totalReps: 162
                                intervalReps:
                                  - 12
                                  - 11
                                  - 10
                                elapsedSeconds: 742
                                finishedBeforeCap: true
                                timeCapSeconds: 900
                                maxLoadKg: 120
                            exercises:
                              - type: exercise
                                planExerciseId: 67f1234567890abcdef1234
                                exerciseId: 67f1234567890abcdef1234
                                name: Dumbbell Bench Press
                                description: Example description
                                thumbnail: https://cdn.example.com/exercises/bench.jpg
                                primaryMuscle: chest
                                secondaryMuscles:
                                  - string
                                equipment:
                                  - string
                                groupId: ''
                                order: 0
                                isFavourite: false
                                isPersonalRecord: true
                                prVerified: true
                                prRank: 1
                                targets:
                                  type: string
                                  sets: 1
                                  reps: string
                                  rest: 1
                                  rpe: 1
                                  rmPercentage: 1
                                  tempo: string
                                  notes: string
                                previousBestSet:
                                  reps: 1
                                  weight: 1
                                  timeSeconds: 1
                                  distanceMeters: 1
                                  rpe: 1
                                  setNumber: 1
                                performanceId: 67f1234567890abcdef1234
                                isCompleted: true
                                notes: ''
                                clientNotes: Felt strong today.
                                clientRestSeconds: 90
                                sets:
                                  - setNumber: 1
                                    setType: 'N'
                                    previous:
                                      reps: 1
                                      weight: 1
                                      timeSeconds: 1
                                      distanceMeters: 1
                                      rpe: 1
                                    reps: 15
                                    weight: 20
                                    timeSeconds: 1
                                    distanceMeters: 1
                                    restSeconds: 60
                                    rpe: 1
                                    completed: true
                                    isPersonalRecord: false
                                    prVerified: false
                                    prRank: 1
                                    repsPlaceholderCoach: 10
                                    weightPlaceholderCoach: 40
                                    timeSecondsPlaceholderCoach: null
                                    distanceMetersPlaceholderCoach: null
                                    rpePlaceholderCoach: 7
                                    restSecondsPlaceholderCoach: 90
                                    repsPlaceholder: 10
                                    weightPlaceholder: 40
                                    timeSecondsPlaceholder: null
                                    distanceMetersPlaceholder: null
                                    rpePlaceholder: 7
                                    restSecondsPlaceholder: 90
                                    repsActual: 30
                                    weightActual: 42
                                    timeSecondsActual: null
                                    distanceMetersActual: null
                                    rpeActual: 8
                                    restSecondsActual: 90
                                exerciseCount: 2
                                rounds: 3
                                data:
                                  - id: 67f1234567890abcdef1234
                                    name: Barbell Bench Press
                                    primaryMuscle: Chest
                                    secondaryMuscles:
                                      - Chest
                                    primaryJoint: Shoulder
                                    equipment:
                                      - Dumbbells
                                    difficulty: Intermediate
                                    intensity: Above Average
                                    visibility: Company
                                    tags:
                                      - string
                                    thumbnail: >-
                                      https://cdn.example.com/exercises/bench-thumb.jpg
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                      idempotency:
                        replayed: false
        '400':
          description: >-
            Validation error. Keys: `INVALID_PLAN_ID`, `COMPANY_ID_REQUIRED`,
            `INVALID_CLIENT_ID`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                invalidRequest:
                  summary: Invalid request
                  value:
                    error:
                      code: 400
                      key: request.invalid
                      message: The request is invalid.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                idempotencyRequired:
                  summary: Missing Idempotency-Key
                  value:
                    error:
                      code: 400
                      key: idempotency.required
                      message: >-
                        Idempotency-Key header is required for Public API write
                        requests.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                idempotencyInvalid:
                  summary: Invalid Idempotency-Key
                  value:
                    error:
                      code: 400
                      key: idempotency.invalid
                      message: Idempotency-Key header must be 200 characters or fewer.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '401':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                missingBearer:
                  summary: Missing Bearer token
                  value:
                    error:
                      code: 401
                      key: auth.missing_bearer
                      message: Authorization Bearer token is required.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                invalidToken:
                  summary: Invalid or expired token
                  value:
                    error:
                      code: 401
                      key: auth.invalid_token
                      message: The access token is invalid or expired.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                invalidClient:
                  summary: Inactive or revoked client
                  value:
                    error:
                      code: 401
                      key: auth.invalid_client
                      message: The Public API client is inactive or revoked.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '403':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                insufficientScopes:
                  summary: Missing required scope
                  value:
                    error:
                      code: 403
                      key: scopes.insufficient
                      message: The access token does not include the required scope.
                      details:
                        requiredScopes:
                          - required:scope
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '404':
          description: Plan not found / not assigned to this client (`TEMPLATE_NOT_FOUND`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                notFound:
                  summary: Resource not found
                  value:
                    error:
                      code: 404
                      key: resource.not_found
                      message: The requested Public API resource was not found.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '409':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                idempotencyConflict:
                  summary: Idempotency-Key conflict
                  value:
                    error:
                      code: 409
                      key: idempotency.conflict
                      message: >-
                        Idempotency-Key was already used with a different
                        request.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                idempotencyInProgress:
                  summary: Idempotency-Key in progress
                  value:
                    error:
                      code: 409
                      key: idempotency.in_progress
                      message: >-
                        Idempotency-Key is already processing for this Public
                        API client.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '422':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                emptyBody:
                  summary: Empty or invalid JSON object body
                  value:
                    error:
                      code: 422
                      key: EMPTY_BODY
                      message: Request body must be a non-empty JSON object.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '429':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                rateLimitExceeded:
                  summary: Rate limit exceeded
                  value:
                    error:
                      code: 429
                      key: rate_limit.exceeded
                      message: Too many Public API requests. Retry later.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 0
                        resetSeconds: 1
                        retryAfterSeconds: 1
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                serverInternalError:
                  summary: Unexpected server error
                  value:
                    error:
                      code: 500
                      key: server.internal_error
                      message: An unexpected Public API server error occurred.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
      security:
        - PublicBearerAuth: []
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl -X POST
            "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/plans/history/plan/{planId}"
            \
              -H "Authorization: Bearer <access_token>" \
              -H "Idempotency-Key: <stable_request_key>" \
              -H "Content-Type: application/json" \
              -d '{}'
components:
  schemas:
    PublicWorkoutSourcePOSTAppV1WorkoutPlansClientHistoryPlanPlanIdRequest:
      type: object
      properties:
        clientId:
          type: string
          example: 67f1234567890abcdef1234
          description: >-
            Required when the caller is a coach; inferred from token when the
            caller is a client.
    PublicApiWriteSuccessResponse:
      type: object
      additionalProperties: false
      required:
        - data
        - meta
      properties:
        data:
          type: object
        meta:
          $ref: '#/components/schemas/PublicApiWriteMeta'
    PublicWorkoutSourcePOSTAppV1WorkoutPlansClientHistoryPlanPlanIdResponse200:
      type: object
      properties:
        plan:
          type: object
          properties:
            _id:
              type: string
              example: 67f1234567890abcdef1234
            name:
              type: string
              example: Weekly Strength Program
            averageRating:
              type: number
              nullable: true
              example: 3.2
              description: >-
                Average of the per-day session ratings; `null` when none are
                rated.
            totalDays:
              type: integer
              example: 4
              description: >-
                Count of COMPLETED days only (partial completion supported), not
                the plan's total prescribed day count.
            completedAt:
              type: string
              format: date-time
              example: '2026-04-12T10:00:00.000Z'
              nullable: true
              description: Most recent day completion date across the plan.
            days:
              type: array
              description: >-
                Only the completed days (plan moments with at least one
                completed session).
              items:
                type: object
                properties:
                  planMomentId:
                    type: string
                    example: 67f1234567890abcdef1234
                  sessionId:
                    oneOf:
                      - type: string
                        example: 67f1234567890abcdef1234
                      - type: 'null'
                    description: >-
                      Completed session id for this day (drives the workout-day
                      detail). `null` only if a day has no completed session.
                  name:
                    type: string
                    example: 'Day 1: Dumbbell Bench Press'
                  description:
                    type: string
                    example: ''
                  date:
                    type: string
                    format: date-time
                    example: '2026-04-12T10:00:00.000Z'
                    nullable: true
                    description: Session end date (falls back to start date).
                  durationMinutes:
                    type: integer
                    example: 50
                  totalVolume:
                    type: number
                    example: 207
                    description: >-
                      Sum of volume across COMPLETED sets for the day (kg) —
                      completed === true only.
                  totalReps:
                    type: integer
                    example: 60
                    description: Sum of reps across COMPLETED sets only.
                  totalTimeSeconds:
                    type: integer
                    example: 0
                    description: Sum of timeSeconds across COMPLETED sets only.
                  totalDistanceMeters:
                    type: number
                    example: 0
                    description: Sum of distanceMeters across COMPLETED sets only.
                  rating:
                    type: number
                    nullable: true
                    example: 4
                    description: Session rating for the day; `null` when unrated.
                  emojiRating:
                    type:
                      - integer
                      - 'null'
                    example: 4
                    description: Emoji feedback value (1–5) for the day; `null` when unset.
                  emoji:
                    type: string
                    example: 💪
                    description: Emoji glyph resolved from `emojiRating` ("" when unset).
                  exerciseCount:
                    type: integer
                    example: 6
                  scoring:
                    type: object
                    nullable: true
                    description: >-
                      Scoring of a plan day. Null for an ordinary standard day.
                      `acceptsManualResult` is true only for exercise-free
                      scored days (`descriptionOnly`), which take a `wodResult`
                      on PATCH
                      /app/v1/workout/performance/sessions/{sessionId}/complete.
                      `result` is the saved score of the selected session, or
                      null.
                    properties:
                      scoringType:
                        type: string
                        enum:
                          - standard
                          - forTime
                          - amrap
                          - emom
                          - tabata
                          - maxLoad
                        example: forTime
                      descriptionOnly:
                        type: boolean
                        example: true
                      acceptsManualResult:
                        type: boolean
                        example: true
                      targetValue:
                        type: number
                        nullable: true
                        example: null
                      timeDomain:
                        type: object
                        nullable: true
                        description: >-
                          Clock prescription, same contract as a WOD
                          `timeDomain`. Allowed fields depend on `scoringType`:
                          amrap → windowSeconds (required); forTime →
                          timeCapSeconds, rounds (defaults to 1); emom →
                          intervalSeconds, intervalCount (both required); tabata
                          → workSeconds, restSeconds, intervalCount (all
                          required); standard/maxLoad → none.
                        properties:
                          windowSeconds:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: null
                          timeCapSeconds:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: 900
                          rounds:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: 3
                          intervalSeconds:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: null
                          intervalCount:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: null
                          workSeconds:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: null
                          restSeconds:
                            type: integer
                            nullable: true
                            minimum: 0
                            example: null
                      scoreValidation:
                        type: object
                        nullable: true
                        description: >-
                          Optional result caps. timeCapSeconds and
                          expectedIntervals are derived from `timeDomain` when
                          one is set.
                        properties:
                          timeCapSeconds:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: 900
                          maxReps:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: null
                          expectedIntervals:
                            type: integer
                            nullable: true
                            minimum: 1
                            example: null
                      result:
                        allOf:
                          - type: object
                            description: >-
                              Type-specific manual score, the same shape as the
                              WOD `wodResult`. Only the fields of the day's
                              scoringType are accepted: amrap → roundsCompleted,
                              repsPerRound, extraReps, totalReps (total = rounds
                              × repsPerRound + extraReps, extraReps <
                              repsPerRound); forTime → elapsedSeconds,
                              finishedBeforeCap, totalReps (reps required when
                              not finished before the cap); emom/tabata →
                              intervalReps, totalReps (sum of intervals; count
                              must match intervalCount when set); maxLoad →
                              maxLoadKg. The stored copy of a forTime result
                              also carries timeCapSeconds.
                            properties:
                              roundsCompleted:
                                type: integer
                                minimum: 0
                                example: 5
                              repsPerRound:
                                type: integer
                                minimum: 1
                                example: 30
                              extraReps:
                                type: integer
                                minimum: 0
                                example: 12
                              totalReps:
                                type: integer
                                minimum: 0
                                example: 162
                              intervalReps:
                                type: array
                                items:
                                  type: integer
                                  minimum: 0
                                example:
                                  - 12
                                  - 11
                                  - 10
                              elapsedSeconds:
                                type: number
                                minimum: 0
                                example: 742
                              finishedBeforeCap:
                                type: boolean
                                example: true
                              timeCapSeconds:
                                type: integer
                                nullable: true
                                readOnly: true
                                example: 900
                              maxLoadKg:
                                type: number
                                minimum: 0
                                example: 120
                        nullable: true
                  exercises:
                    type: array
                    description: >-
                      Grouped exercises for the day — same shape as
                      getClientWorkoutDay (standalone items + superset blocks),
                      with plan targets, the 'Previous' column, and per-set +
                      exercise-level PR flags.
                    items:
                      type: object
                      description: >-
                        Standalone exercise (`type: "exercise"`) or a superset
                        block (`type: "superset"`; member exercises in
                        `data[]`).
                      properties:
                        type:
                          type: string
                          enum:
                            - exercise
                            - superset
                          example: exercise
                        planExerciseId:
                          oneOf:
                            - type: string
                              example: 67f1234567890abcdef1234
                            - type: 'null'
                        exerciseId:
                          oneOf:
                            - type: string
                              example: 67f1234567890abcdef1234
                            - type: 'null'
                        name:
                          type: string
                          example: Dumbbell Bench Press
                        description:
                          type: string
                        thumbnail:
                          type: string
                          example: https://cdn.example.com/exercises/bench.jpg
                        primaryMuscle:
                          type: string
                          example: chest
                        secondaryMuscles:
                          type: array
                          items:
                            type: string
                        equipment:
                          type: array
                          items:
                            type: string
                        groupId:
                          type: string
                          example: ''
                        order:
                          type: integer
                          example: 0
                        isFavourite:
                          type: boolean
                          example: false
                        isPersonalRecord:
                          type: boolean
                          example: true
                          description: >-
                            Exercise-level PR badge: `true` when this
                            occurrence's record set beat the client's prior
                            all-time best.
                        prVerified:
                          type: boolean
                          example: true
                          description: >-
                            The exercise's record set was completed (filled
                            badge) vs logged-but-unchecked (outline). On a
                            superset block: `true` when any member's record was
                            completed.
                        prRank:
                          type:
                            - integer
                            - 'null'
                          example: 1
                          description: >-
                            Record number within the exercise's history:
                            most-recent record = 1 ("PR 1"), the previous record
                            = 2, … `null` when not a PR. Always `null` on
                            superset blocks — the numbered ranks stay on the
                            member exercises in `data[]`.
                        targets:
                          type:
                            - object
                            - 'null'
                          properties:
                            type:
                              type: string
                            sets:
                              type:
                                - integer
                                - 'null'
                            reps:
                              type:
                                - string
                                - number
                                - 'null'
                            rest:
                              type:
                                - number
                                - 'null'
                            rpe:
                              type:
                                - number
                                - 'null'
                            rmPercentage:
                              type:
                                - number
                                - 'null'
                            tempo:
                              type:
                                - string
                                - 'null'
                            notes:
                              type:
                                - string
                                - 'null'
                          additionalProperties: false
                        previousBestSet:
                          type:
                            - object
                            - 'null'
                          properties:
                            reps:
                              type:
                                - number
                                - 'null'
                            weight:
                              type:
                                - number
                                - 'null'
                            timeSeconds:
                              type:
                                - number
                                - 'null'
                            distanceMeters:
                              type:
                                - number
                                - 'null'
                            rpe:
                              type:
                                - number
                                - 'null'
                            setNumber:
                              type:
                                - integer
                                - 'null'
                          additionalProperties: false
                        performanceId:
                          oneOf:
                            - type: string
                              example: 67f1234567890abcdef1234
                            - type: 'null'
                        isCompleted:
                          type: boolean
                          example: true
                        notes:
                          type: string
                          example: ''
                        clientNotes:
                          type: string
                          example: Felt strong today.
                          description: >-
                            The client's own note for this performance (mirrors
                            getClientWorkoutDay / getClientFreestyleWorkout).
                            Empty string when none. Always `""` on superset
                            blocks.
                        clientRestSeconds:
                          type:
                            - integer
                            - 'null'
                          example: 90
                          description: >-
                            The client's own 'Rest time' for this performance,
                            in seconds. `null` when unset — it does NOT fall
                            back to the plan's prescribed rest. Always `null` on
                            superset blocks.
                        sets:
                          type: array
                          items:
                            type: object
                            properties:
                              setNumber:
                                type: integer
                                example: 1
                              setType:
                                type: string
                                enum:
                                  - 'N'
                                  - W
                                  - D
                                  - F
                                example: 'N'
                                description: Normal / Warm-up / Drop / Failure.
                              previous:
                                type:
                                  - object
                                  - string
                                  - 'null'
                                properties:
                                  reps:
                                    type:
                                      - number
                                      - 'null'
                                  weight:
                                    type:
                                      - number
                                      - 'null'
                                  timeSeconds:
                                    type:
                                      - number
                                      - 'null'
                                  distanceMeters:
                                    type:
                                      - number
                                      - 'null'
                                  rpe:
                                    type:
                                      - number
                                      - 'null'
                                additionalProperties: false
                              reps:
                                type:
                                  - number
                                  - 'null'
                                example: 15
                              weight:
                                type:
                                  - number
                                  - 'null'
                                example: 20
                              timeSeconds:
                                type:
                                  - number
                                  - 'null'
                              distanceMeters:
                                type:
                                  - number
                                  - 'null'
                              restSeconds:
                                type:
                                  - number
                                  - 'null'
                                example: 60
                              rpe:
                                type:
                                  - number
                                  - 'null'
                              completed:
                                type: boolean
                                example: true
                              isPersonalRecord:
                                type: boolean
                                example: false
                                description: >-
                                  `true` for the single record set of the
                                  occurrence — its heaviest set, only when it
                                  beats the client's prior all-time best.
                              prVerified:
                                type: boolean
                                example: false
                                description: >-
                                  Verified PR (blue-filled tag) when the record
                                  set was completed; otherwise non-verified
                                  (blue-outlined).
                              prRank:
                                type:
                                  - integer
                                  - 'null'
                                example: 1
                                description: >-
                                  Numbered badge for the record set: most-recent
                                  record across the exercise's history = 1 ("PR
                                  1"), the previous record = 2, … `null` when
                                  the set is not a PR.
                              repsPlaceholderCoach:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                example: 10
                                description: >-
                                  The coach's prescribed hint for an empty reps
                                  input on this set (WorkoutPlan `setsData`). A
                                  range string (`"8-12"`) is allowed. `null`
                                  when this exercise type does not track reps,
                                  nothing is prescribed, or the entry is
                                  freestyle.
                              weightPlaceholderCoach:
                                type:
                                  - number
                                  - 'null'
                                example: 40
                              timeSecondsPlaceholderCoach:
                                type:
                                  - number
                                  - 'null'
                                example: null
                              distanceMetersPlaceholderCoach:
                                type:
                                  - number
                                  - 'null'
                                example: null
                              rpePlaceholderCoach:
                                type:
                                  - number
                                  - 'null'
                                example: 7
                              restSecondsPlaceholderCoach:
                                type:
                                  - number
                                  - 'null'
                                example: 90
                              repsPlaceholder:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                example: 10
                                description: >-
                                  The hint to actually show. The coach's
                                  `repsPlaceholderCoach` wins wherever it
                                  exists; otherwise the client's own stored
                                  placeholder (the only source for a freestyle
                                  entry).
                              weightPlaceholder:
                                type:
                                  - number
                                  - 'null'
                                example: 40
                              timeSecondsPlaceholder:
                                type:
                                  - number
                                  - 'null'
                                example: null
                              distanceMetersPlaceholder:
                                type:
                                  - number
                                  - 'null'
                                example: null
                              rpePlaceholder:
                                type:
                                  - number
                                  - 'null'
                                example: 7
                              restSecondsPlaceholder:
                                type:
                                  - number
                                  - 'null'
                                example: 90
                              repsActual:
                                type:
                                  - number
                                  - string
                                  - 'null'
                                example: 30
                                description: >-
                                  The athlete's ACTUALLY-logged reps for this
                                  set (mirrors `reps`), or `null` when they did
                                  not log it. Additive: `reps` is unchanged.
                              weightActual:
                                type:
                                  - number
                                  - 'null'
                                example: 42
                                description: >-
                                  Actually-logged weight (mirrors `weight`), or
                                  `null`.
                              timeSecondsActual:
                                type:
                                  - number
                                  - 'null'
                                example: null
                                description: >-
                                  Actually-logged time (mirrors `timeSeconds`),
                                  or `null`.
                              distanceMetersActual:
                                type:
                                  - number
                                  - 'null'
                                example: null
                                description: >-
                                  Actually-logged distance (mirrors
                                  `distanceMeters`), or `null`.
                              rpeActual:
                                type:
                                  - number
                                  - 'null'
                                example: 8
                                description: >-
                                  Actually-logged RPE (mirrors `rpe`), or
                                  `null`.
                              restSecondsActual:
                                type:
                                  - number
                                  - 'null'
                                example: 90
                                description: >-
                                  Actually-logged rest (mirrors `restSeconds`),
                                  or `null`.
                        exerciseCount:
                          type: integer
                          example: 2
                          description: 'Superset blocks only: number of member exercises.'
                        rounds:
                          type: integer
                          example: 3
                          description: 'Superset blocks only: max set count across members.'
                        data:
                          type: array
                          description: >-
                            Superset blocks: the member exercise items (each the
                            same shape as a standalone exercise item). Empty
                            array for standalone exercises.
                          items:
                            $ref: >-
                              #/components/schemas/PublicWorkoutSourceWorkoutGroupedExerciseItem
    PublicApiError:
      type: object
      additionalProperties: false
      required:
        - error
        - meta
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - key
            - message
          properties:
            code:
              type: integer
              example: 401
            key:
              type: string
              example: auth.invalid_token
            message:
              type: string
              example: The access token is invalid.
            details:
              type: object
              additionalProperties: true
        meta:
          $ref: '#/components/schemas/PublicApiMeta'
    ErrorResponse:
      allOf:
        - $ref: '#/components/schemas/StandardResponse'
        - example:
            status: 401
            error: true
            message: MISSING_AUTH
    PublicApiWriteMeta:
      type: object
      additionalProperties: false
      required:
        - requestId
      properties:
        requestId:
          type: string
          description: Stable request correlation id. Mirrors `X-Request-Id` when supplied.
          example: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
        rateLimit:
          $ref: '#/components/schemas/PublicApiRateLimitMeta'
        idempotency:
          type: object
          additionalProperties: false
          properties:
            replayed:
              type: boolean
              description: >-
                True when the response was replayed from a previous request with
                the same `Idempotency-Key`.
              example: true
    PublicWorkoutSourceWorkoutGroupedExerciseItem:
      type: object
      properties:
        id:
          type: string
          example: 67f1234567890abcdef1234
        name:
          type: string
          example: Barbell Bench Press
        primaryMuscle:
          type: string
          enum:
            - Chest
            - Back
            - Lats
            - Traps
            - Shoulders
            - Biceps
            - Triceps
            - Forearms
            - Core
            - Abs
            - Obliques
            - Glutes
            - Quads
            - Hamstrings
            - Calves
            - Adductors
            - Abductors
            - Hip Flexors
            - Full Body
            - Cardio / Conditioning
            - Neck
            - Lower Back
          example: Chest
        secondaryMuscles:
          type: array
          items:
            type: string
            enum:
              - Chest
              - Back
              - Lats
              - Traps
              - Shoulders
              - Biceps
              - Triceps
              - Forearms
              - Core
              - Abs
              - Obliques
              - Glutes
              - Quads
              - Hamstrings
              - Calves
              - Adductors
              - Abductors
              - Hip Flexors
              - Full Body
              - Cardio / Conditioning
              - Neck
              - Lower Back
        primaryJoint:
          type: string
          enum:
            - ''
            - Ankle
            - Combination
            - Core
            - Elbow
            - Fingers
            - Hip
            - Knee
            - Neck
            - Shoulder
            - Spine
            - Wrist
          example: Shoulder
        equipment:
          type: array
          items:
            type: string
            enum:
              - Dumbbells
              - AdjustableDumbbells
              - Kettlebell
              - AdjustableKettlebell
              - CompetitionKettlebell
              - Medicineball
              - SlamBall
              - WallBall
              - Weightplate
              - BumperPlates
              - FractionalPlates
              - LoadableDumbbellHandle
              - Sandbag
              - StrongmanSandbag
              - Bulgarianbag
              - Aquabag
              - Aquaball
              - Hydrovest
              - MagneticBell
              - Macebell
              - SteelClub
              - IndianClub
              - Barbell
              - OlympicBarbell
              - TechniqueBar
              - EZBar
              - TrapBar
              - SafetySquatBar
              - SwissBar
              - CamberedBar
              - AxleBar
              - Landmine
              - Bench
              - FlatBench
              - AdjustableBench
              - InclineBench
              - DeclineBench
              - SealRowBench
              - HipThrustBench
              - BenchPressRack
              - SquatRack
              - SquatStand
              - PowerRack
              - WallMountedRack
              - HalfRack
              - SmithMachine
              - Monolift
              - JammerArms
              - BarbellJack
              - WeightTree
              - PlateStorage
              - DeadliftPlatform
              - Rig
              - StrengthMachinesPlateloaded
              - StrengthMachinesWeightstack
              - StrengthMachinesPneumatic
              - MultiGym
              - LegPressMachine
              - VerticalLegPressMachine
              - LeverageSquatMachine
              - LinearHackSquatMachine
              - BeltSquatMachine
              - PendulumSquatMachine
              - VSquatMachine
              - HackSquatMachine
              - LegExtensionMachine
              - LegCurlMachine
              - SeatedLegCurlMachine
              - LyingLegCurlMachine
              - StandingLegCurlMachine
              - StandingCalfRaiseMachine
              - SeatedCalfRaiseMachine
              - CalfPressMachine
              - HipThrustMachine
              - GluteDriveMachine
              - GluteKickbackMachine
              - HipExtensionMachine
              - HipAbductionMachine
              - HipAdductionMachine
              - ChestPressMachine
              - VerticalChestPressMachine
              - InclineChestPressMachine
              - DeclineChestPressMachine
              - IsoLateralChestPressMachine
              - IsoLateralInclinePressMachine
              - ShoulderPressMachine
              - IsoLateralShoulderPressMachine
              - MultiPressMachine
              - LateralRaiseMachine
              - RearDeltMachine
              - PecDeckMachine
              - PulloverMachine
              - LatPulldownMachine
              - IsoLateralLatPulldownMachine
              - AssistedPullupMachine
              - AssistedDipMachine
              - SeatedDipMachine
              - SeatedRowMachine
              - LowRowMachine
              - HighRowMachine
              - IsoLateralRowMachine
              - ChestSupportedRowMachine
              - TBarRowMachine
              - BicepsCurlMachine
              - PreacherCurlMachine
              - TricepsExtensionMachine
              - AbCrunchMachine
              - AbCoasterMachine
              - RotaryTorsoMachine
              - BackExtensionMachine
              - SeatedBackExtensionMachine
              - HyperextensionBench
              - ReverseHyper
              - GHD
              - Kinesis
              - Pulley
              - CableMachine
              - CableStation
              - CableColumn
              - CableCrossover
              - DualAdjustablePulley
              - SingleCableTower
              - FunctionalTrainer
              - TotalGymGTS
              - Gymstick
              - ViPR
              - RipTrainer
              - Battlerope
              - ProwlerSled
              - FarmersHandles
              - Yoke
              - Tire
              - Sledgehammer
              - TorqueTank
              - SledTrack
              - WallBallTarget
              - AgilityPoles
              - MiniHurdles
              - SprintParachute
              - PullUpBar
              - Parallelbars
              - DipBars
              - Equalizer
              - Suspensiontrainer
              - SuspensionSlingTrainer
              - GymnasticRings
              - MonkeyBars
              - PegBoard
              - RopeClimb
              - Wall
              - StallBars
              - DoorPullUpBar
              - PushUpHandles
              - AbStraps
              - Boxstep
              - SoftPlyoBox
              - Hurdle
              - Speedladder
              - Parallettes
              - NordicBench
              - SissySquatBench
              - Cardio
              - Treadmill
              - CurvedTreadmill
              - AirRunner
              - AssaultRunner
              - StationaryBike
              - UprightBike
              - RecumbentBike
              - BikeErg
              - SpinBike
              - AirBike
              - Rower
              - WaterRower
              - FanRower
              - ArmErgometer
              - SkiErg
              - Elliptical
              - ArcTrainer
              - NuStep
              - StairClimber
              - StepMill
              - JacobsLadder
              - VersaClimber
              - Bosu
              - Balanceball
              - Exerciseball
              - PilatesTennisball
              - PilatesRing
              - YogaMat
              - YogaBlock
              - YogaWheel
              - StretchStrap
              - MobilityStick
              - MassageBall
              - PeanutMassageBall
              - Airpad
              - Balanceboard
              - BalancePad
              - WobbleBoard
              - Glidedisc
              - Foamroller
              - Elasticbands
              - TherapyBand
              - Resistanceband
              - MiniBand
              - PullUpAssistBand
              - Powertube
              - AnkleWeights
              - SlantBoard
              - Vibrationtraining
              - CableRope
              - StraightBarAttachment
              - CurlBarAttachment
              - LatBarAttachment
              - TricepsBarAttachment
              - RowHandle
              - DHandle
              - DoubleDHandle
              - AnkleCuff
              - CableCuff
              - LandmineHandle
              - MagGripAttachment
              - DipBelt
              - AbWheel
              - WristRoller
              - FatGrip
              - Chain
              - DoorAnchor
              - JumpRope
              - SpeedRope
              - WeightedJumpRope
              - SledHarness
              - LiftingStraps
              - LiftingHooks
              - WristWraps
              - WeightliftingBelt
              - Clubbel
              - Stick
              - Bodybow
              - BuddySystem
              - Multinet
              - Flowin
              - Aerialhoop
              - Dancingpole
              - Trapeze
              - HulaHoop
              - Trampoline
              - XCO
              - PilatesReformer
              - PilatesChair
              - PilatesCadillac
              - PilatesBarrel
              - PilatesSpringboard
              - BalanceBeam
              - TreatmentTable
              - RehabTable
              - SlideBoard
        difficulty:
          type: string
          enum:
            - ''
            - Beginner
            - Intermediate
            - Advanced
          example: Intermediate
        intensity:
          type: string
          enum:
            - ''
            - Beginner
            - Below Average
            - Average
            - Above Average
            - High Intensity
          example: Above Average
        visibility:
          type: string
          enum:
            - Everyone
            - Company
            - Fitsociety
          example: Company
        tags:
          type: array
          items:
            type: string
        thumbnail:
          type:
            - string
            - 'null'
          format: uri
          example: https://cdn.example.com/exercises/bench-thumb.jpg
    PublicApiMeta:
      type: object
      additionalProperties: false
      required:
        - requestId
      properties:
        requestId:
          type: string
          description: Stable request correlation id. Mirrors `X-Request-Id` when supplied.
          example: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
        rateLimit:
          $ref: '#/components/schemas/PublicApiRateLimitMeta'
    StandardResponse:
      type: object
      properties:
        status:
          type: integer
          example: 200
        error:
          type: boolean
          example: false
        message:
          type: string
          example: SUCCESS
      required:
        - status
        - error
        - message
    PublicApiRateLimitMeta:
      type: object
      additionalProperties: false
      properties:
        limit:
          type: integer
          example: 10
        remaining:
          type: integer
          example: 9
        resetSeconds:
          type: integer
          description: Seconds until the current rate limit window resets.
          example: 1
        retryAfterSeconds:
          type: integer
          description: Present when the request was rate limited.
          example: 1
  securitySchemes:
    PublicBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: >-
        Public API access token issued by `/public/v1/oauth/token`. Example:
        `Authorization: Bearer fspt_...`. Each resource request rechecks the
        token company's current provider access. Disabling access blocks
        existing tokens with `403 auth.provider_unavailable`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.