{
  "openapi": "3.0.3",
  "info": {
    "title": "Coach Platform API",
    "description": "Coach Platform Public API, authenticated with API keys (`Authorization: Bearer cp_live_...`). Create and manage keys in the dashboard under Settings → Developers.",
    "version": "1.0"
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Key (cp_live_...)"
      }
    },
    "schemas": {}
  },
  "paths": {
    "/api/public/health": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "description": "Public health check. No auth required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "timestamp": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/catalog": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "description": "Public catalog of available scopes, webhook events, payload schemas, and docs URL. No auth required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/llms.txt": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "description": "Plain-text guide for AI agents: auth, conventions, machine-readable references, and the MCP tool list. No auth required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/errors": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "description": "Reference for every error code returned by the API. No auth required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/changelog": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "description": "Changelog of breaking and non-breaking changes to this API. No auth required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/limits": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "description": "Body size, timeout, retry, and pagination limits. No auth required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/me": {
      "get": {
        "tags": [
          "Coach"
        ],
        "description": "Returns the authenticated coach profile (name, email, plan limits).",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phoneNumber": {
                          "type": "string"
                        },
                        "businessName": {
                          "type": "string"
                        },
                        "businessType": {
                          "type": "string"
                        },
                        "workMethod": {
                          "type": "string"
                        },
                        "businessColor": {
                          "type": "string"
                        },
                        "profileImageUrl": {
                          "type": "string"
                        },
                        "activeTraineesCount": {
                          "type": "number"
                        },
                        "traineesLimit": {
                          "type": "number"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees": {
      "get": {
        "tags": [
          "Trainees"
        ],
        "description": "List trainees of the coach, filterable by label/search.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Items per page (1-500, default 25)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Search by name, email, or phone"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "labelId",
            "required": false,
            "description": "Filter to trainees with this label"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "email",
            "required": false,
            "description": "Match by email (case insensitive)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "phone",
            "required": false,
            "description": "Match by phone number"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "pending",
                "archived"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by coaching status. \"active\" = has an active coaching period. \"pending\" = invited but not yet approved by the coach; these trainees are not returned by the other filters, and their activeCoachDetails.pendingCoachDate tells you how long they have been waiting. \"archived\" = removed with DELETE /trainees/{traineeId}; they are excluded from every other filter and from GET /trainees/{traineeId}, which answers 403 for them, so this is the only way to see them. Archived results carry no activeCoachDetails, and support only page, limit, search, email and phone. Bring one back with POST /trainees/{traineeId}/restore."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "phoneNumber": {
                            "type": "string"
                          },
                          "goal": {
                            "type": "string"
                          },
                          "profileImageUrl": {
                            "type": "string"
                          },
                          "personalDetails": {
                            "type": "object",
                            "additionalProperties": true
                          },
                          "labels": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "text": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                },
                                "coachId": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "assignedEmployees": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "activeCoachDetails": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                              "activeEscort": {
                                "type": "string",
                                "nullable": true,
                                "description": "Id of the escort currently in use for this trainee. Fetch the full escort with GET /escorts/{escortId}."
                              },
                              "pendingCoach": {
                                "type": "string",
                                "nullable": true,
                                "description": "Coach id this trainee is pending approval for. Set when the trainee was invited but has not been approved yet; null once approved. Use ?status=pending on GET /trainees to list only these."
                              },
                              "pendingCoachDate": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "description": "When the trainee entered the pending state. Use it to measure how long approval has been waiting."
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Trainees"
        ],
        "description": "Create a new trainee for the coach. Requires name, email, and phoneNumber.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "email",
                  "phoneNumber"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Trainee full name"
                  },
                  "email": {
                    "type": "string",
                    "description": "Trainee email"
                  },
                  "phoneNumber": {
                    "type": "string",
                    "description": "Trainee phone number"
                  },
                  "goal": {
                    "type": "string",
                    "description": "Optional coaching goal"
                  },
                  "passwordAsPhoneNumber": {
                    "type": "boolean",
                    "description": "Set the trainee login password to their phone number instead of a random one. Israeli numbers are normalized to their local 0-prefixed form, so \"+972501234567\", \"972-50-123-4567\" and \"050 123 4567\" all become the password \"0501234567\", and the trainee can log in by typing any of those forms. Numbers from every other country are supported too and keep their international form, so \"+1 415 555 2671\" becomes \"+14155552671\"; a trainee with a non-Israeli number must include the country code when logging in, because the national form (\"415-555-2671\") cannot be mapped back. Send a clean number: any extra digits, such as an extension, become part of the password. The resulting password is always returned in the password field of this response and is not retrievable afterwards. Changing the phone number later with PATCH /trainees/{traineeId} does not change the password. Rejected with 400 only when phoneNumber has no digits at all, or fewer than 6 digits; error.details.reason says which. If the email belongs to an existing trainee account that is merely attached to the coach, that account keeps its current password and a warning is returned."
                  },
                  "labels": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string",
                      "description": "A label id (24-character MongoDB ObjectId), e.g. \"507f1f77bcf86cd799439011\""
                    },
                    "description": "Optional ids of existing labels to attach. Each item must be the label id (24-character MongoDB ObjectId) as returned in the id field of GET /labels — not the label text. Label text is not accepted here and no new label is created; to attach a label by text, or to create one, use POST /trainees/{traineeId}/labels instead. Requires the labels:write scope: without it the trainee is still created and a warning is returned in the warnings array."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phoneNumber": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "profileImageUrl": {
                          "type": "string"
                        },
                        "personalDetails": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "labels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              },
                              "coachId": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "assignedEmployees": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "activeCoachDetails": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeEscort": {
                              "type": "string",
                              "nullable": true,
                              "description": "Id of the escort currently in use for this trainee. Fetch the full escort with GET /escorts/{escortId}."
                            },
                            "pendingCoach": {
                              "type": "string",
                              "nullable": true,
                              "description": "Coach id this trainee is pending approval for. Set when the trainee was invited but has not been approved yet; null once approved. Use ?status=pending on GET /trainees to list only these."
                            },
                            "pendingCoachDate": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "When the trainee entered the pending state. Use it to measure how long approval has been waiting."
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "password": {
                          "type": "string",
                          "description": "Login password, returned only in this create response and never retrievable again. Randomly generated, or the normalized phone number when passwordAsPhoneNumber was sent as true. Present only when a brand-new trainee account was created; absent when an existing trainee was attached to the coach. Calling POST /trainees/{traineeId}/send-credentials resets it."
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}": {
      "get": {
        "tags": [
          "Trainees"
        ],
        "description": "Get a single trainee by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phoneNumber": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "profileImageUrl": {
                          "type": "string"
                        },
                        "personalDetails": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "labels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              },
                              "coachId": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "assignedEmployees": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "activeCoachDetails": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeEscort": {
                              "type": "string",
                              "nullable": true,
                              "description": "Id of the escort currently in use for this trainee. Fetch the full escort with GET /escorts/{escortId}."
                            },
                            "pendingCoach": {
                              "type": "string",
                              "nullable": true,
                              "description": "Coach id this trainee is pending approval for. Set when the trainee was invited but has not been approved yet; null once approved. Use ?status=pending on GET /trainees to list only these."
                            },
                            "pendingCoachDate": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "When the trainee entered the pending state. Use it to measure how long approval has been waiting."
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Trainees"
        ],
        "description": "Update a trainee's personal details. Only supplied fields change.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phoneNumber": {
                    "type": "string"
                  },
                  "goal": {
                    "type": "string"
                  },
                  "height": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Height in cm. Must not be negative."
                  },
                  "dateOfBirth": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}",
                    "description": "Date of birth as an ISO date, for example 1990-04-23."
                  },
                  "gender": {
                    "type": "string",
                    "description": "One of: Male, Female, Other. Matching is case-insensitive, so \"male\" is accepted and stored as \"Male\"."
                  },
                  "activityLevel": {
                    "type": "string",
                    "description": "One of: Sedentary, Lightly Active, Moderately Active, Very Active, Extremely Active. Matching is case-insensitive. Feeds the TDEE calculation, so changing it changes the calorie targets derived for this trainee. Weight is NOT set here: it is a dated history, use POST /trainees/{traineeId}/body-metrics."
                  },
                  "injuries": {
                    "type": "string"
                  },
                  "healthConditions": {
                    "type": "string"
                  },
                  "allergies": {
                    "type": "string"
                  },
                  "foodPreferences": {
                    "type": "string"
                  },
                  "foodDislikes": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phoneNumber": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "profileImageUrl": {
                          "type": "string"
                        },
                        "personalDetails": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "labels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              },
                              "coachId": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "assignedEmployees": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "activeCoachDetails": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeEscort": {
                              "type": "string",
                              "nullable": true,
                              "description": "Id of the escort currently in use for this trainee. Fetch the full escort with GET /escorts/{escortId}."
                            },
                            "pendingCoach": {
                              "type": "string",
                              "nullable": true,
                              "description": "Coach id this trainee is pending approval for. Set when the trainee was invited but has not been approved yet; null once approved. Use ?status=pending on GET /trainees to list only these."
                            },
                            "pendingCoachDate": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "When the trainee entered the pending state. Use it to measure how long approval has been waiting."
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Trainees"
        ],
        "description": "Remove a trainee from the coach account. This ends the active escort, cancels their upcoming meetings, unlinks their training plan and nutrition menu and deletes their gamification profile.\n\nThe trainee is archived rather than erased: their account, history and measurements are kept, they stop counting against your trainee limit, and they disappear from GET /trainees and from GET /trainees/{traineeId}, which answers 403 for them afterwards. List archived trainees with GET /trainees?status=archived and bring one back with POST /trainees/{traineeId}/restore.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "deleted": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/restore": {
      "post": {
        "tags": [
          "Trainees"
        ],
        "description": "Bring a trainee back from the archive, exactly as the dashboard does it. Their last coaching period with you is revived (status Active when its end date is still ahead, Finished when it has passed) and its training plan and nutrition menu are re-linked, so the trainee keeps the history they had before being removed. A trainee with no previous coaching period is simply moved back to the active list.\n\nUse this instead of POST /trainees for a returning trainee: re-creating them by email does attach the same account rather than a duplicate, but it leaves them without a coaching period, plan or menu, which looks like a brand-new empty trainee.\n\nFires the trainee.restored webhook. Returns 404 when the trainee is not in the archive (list it with GET /trainees?status=archived), 422 when restoring would exceed your trainee limit, and 422 when the trainee has since been taken on by another coach.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "phoneNumber": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "profileImageUrl": {
                          "type": "string"
                        },
                        "personalDetails": {
                          "type": "object",
                          "additionalProperties": true
                        },
                        "labels": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              },
                              "coachId": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "assignedEmployees": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "activeCoachDetails": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeEscort": {
                              "type": "string",
                              "nullable": true,
                              "description": "Id of the escort currently in use for this trainee. Fetch the full escort with GET /escorts/{escortId}."
                            },
                            "pendingCoach": {
                              "type": "string",
                              "nullable": true,
                              "description": "Coach id this trainee is pending approval for. Set when the trainee was invited but has not been approved yet; null once approved. Use ?status=pending on GET /trainees to list only these."
                            },
                            "pendingCoachDate": {
                              "type": "string",
                              "format": "date-time",
                              "nullable": true,
                              "description": "When the trainee entered the pending state. Use it to measure how long approval has been waiting."
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/send-credentials": {
      "post": {
        "tags": [
          "Trainees"
        ],
        "description": "Send the trainee their app access details by email. This generates a new password for the trainee and emails it to them, so it doubles as a password reset. Use it after creating a trainee, since POST /trainees does not send access details on its own.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "sent": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/labels": {
      "get": {
        "tags": [
          "Labels"
        ],
        "description": "List all trainee labels (tags) defined by the coach.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "text": {
                            "type": "string"
                          },
                          "color": {
                            "type": "string"
                          },
                          "coachId": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/employees": {
      "get": {
        "tags": [
          "Employees"
        ],
        "description": "List the coach's team members (employees), including name, phone, email, and role. Keys restricted to specific employees only see those.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by employee status (default: active)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "phoneNumber": {
                            "type": "string"
                          },
                          "profileImageUrl": {
                            "type": "string"
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "viewer",
                              "editor",
                              "manager"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "inactive"
                            ]
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/labels": {
      "post": {
        "tags": [
          "Labels"
        ],
        "description": "Add labels to a trainee. Labels are matched by text and created if new; existing labels can be passed by id.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "labels"
                ],
                "properties": {
                  "labels": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Existing label id to attach"
                        },
                        "text": {
                          "type": "string",
                          "description": "Label text; created if new"
                        },
                        "color": {
                          "type": "string",
                          "description": "Tailwind color key, e.g. \"blue-500\""
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/labels/{labelId}": {
      "delete": {
        "tags": [
          "Labels"
        ],
        "description": "Detach a single label from one trainee. The label itself is not deleted and other trainees keep it. Returns journeyOutcome, which reports whether removing this label left the trainee's active journey enrolment without a matching label.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "labelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "journeyOutcome": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true,
                          "properties": {
                            "status": {
                              "type": "string"
                            },
                            "enrollmentId": {
                              "type": "string",
                              "nullable": true
                            },
                            "journeyId": {
                              "type": "string",
                              "nullable": true
                            },
                            "journeyTitle": {
                              "type": "string",
                              "nullable": true
                            },
                            "canAct": {
                              "type": "boolean",
                              "nullable": true
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/labels/{labelId}": {
      "patch": {
        "tags": [
          "Labels"
        ],
        "description": "Rename a label or change its color.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "color": {
                    "type": "string",
                    "description": "Tailwind color key, e.g. \"green-500\""
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "labelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "color": {
                          "type": "string"
                        },
                        "coachId": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Labels"
        ],
        "description": "Delete a label. Trainees that have this label will keep the others.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "labelId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/escorts/{escortId}": {
      "get": {
        "tags": [
          "Escorts"
        ],
        "description": "Get a coaching period by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "escortId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "trainee": {
                          "type": "object",
                          "description": "The escorted trainee. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "phoneNumber": {
                              "type": "string"
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "canceled",
                            "completed",
                            "suspended"
                          ]
                        },
                        "escortType": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "format": "date-time",
                          "description": "When the coaching period ends. null when the escort runs with no time limit, in which case isUnlimited is true."
                        },
                        "months": {
                          "type": [
                            "null",
                            "integer"
                          ],
                          "description": "Duration in months. null when the escort runs with no time limit."
                        },
                        "isUnlimited": {
                          "type": "boolean",
                          "description": "True when the escort has no end date."
                        },
                        "training": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeTrainingPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            },
                            "trainingDays": {}
                          }
                        },
                        "nutrition": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeNutritionPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Escorts"
        ],
        "description": "Update a coaching period. Only supplied fields change. Plan reassignment is not supported here.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "goal": {
                    "type": "string"
                  },
                  "startDate": {
                    "type": "string"
                  },
                  "endDate": {
                    "type": "string"
                  },
                  "months": {
                    "type": "number"
                  },
                  "price": {
                    "type": "number"
                  },
                  "paymentDate": {
                    "type": "string"
                  },
                  "paymentMethod": {
                    "type": "string",
                    "enum": [
                      "Cash",
                      "Credit card",
                      "Bank transfer",
                      "Other"
                    ]
                  },
                  "paymentNumber": {
                    "type": "number"
                  },
                  "escortMeetingType": {
                    "type": "string",
                    "enum": [
                      "Online",
                      "In person"
                    ]
                  },
                  "onlineEscort": {
                    "type": "string"
                  },
                  "inPersonEscort": {
                    "type": "string"
                  },
                  "cardioDays": {
                    "type": "number"
                  },
                  "cardioTime": {
                    "type": "number"
                  },
                  "trainingDays": {
                    "type": "number"
                  },
                  "dailyStepsTarget": {
                    "type": "number"
                  },
                  "note": {
                    "type": "string",
                    "description": "Append a note to the coaching period."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "escortId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "trainee": {
                          "type": "object",
                          "description": "The escorted trainee. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "phoneNumber": {
                              "type": "string"
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "canceled",
                            "completed",
                            "suspended"
                          ]
                        },
                        "escortType": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "format": "date-time",
                          "description": "When the coaching period ends. null when the escort runs with no time limit, in which case isUnlimited is true."
                        },
                        "months": {
                          "type": [
                            "null",
                            "integer"
                          ],
                          "description": "Duration in months. null when the escort runs with no time limit."
                        },
                        "isUnlimited": {
                          "type": "boolean",
                          "description": "True when the escort has no end date."
                        },
                        "training": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeTrainingPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            },
                            "trainingDays": {}
                          }
                        },
                        "nutrition": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeNutritionPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Escorts"
        ],
        "description": "Cancel a coaching period. The trainee keeps their history.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "cancelReason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "escortId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "trainee": {
                          "type": "object",
                          "description": "The escorted trainee. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "phoneNumber": {
                              "type": "string"
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "canceled",
                            "completed",
                            "suspended"
                          ]
                        },
                        "escortType": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "format": "date-time",
                          "description": "When the coaching period ends. null when the escort runs with no time limit, in which case isUnlimited is true."
                        },
                        "months": {
                          "type": [
                            "null",
                            "integer"
                          ],
                          "description": "Duration in months. null when the escort runs with no time limit."
                        },
                        "isUnlimited": {
                          "type": "boolean",
                          "description": "True when the escort has no end date."
                        },
                        "training": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeTrainingPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            },
                            "trainingDays": {}
                          }
                        },
                        "nutrition": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeNutritionPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/escorts": {
      "post": {
        "tags": [
          "Escorts"
        ],
        "description": "Start a new coaching period (escort) for a trainee. The plan ids required depend on escortType: \"Training\" needs trainingPlanId, \"Nutrition\" needs nutritionMenuId, \"Nutrition and training\" needs both, and \"Other\" needs neither. Create the plan or menu first (POST /training-plans, POST /nutrition-menus) and pass its id here. A trainee may only have one active escort at a time.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeId",
                  "escortType",
                  "startDate"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string"
                  },
                  "escortType": {
                    "type": "string",
                    "enum": [
                      "Nutrition",
                      "Training",
                      "Nutrition and training",
                      "Other"
                    ],
                    "description": "Determines which plan ids are required: Training -> trainingPlanId, Nutrition -> nutritionMenuId, Nutrition and training -> both, Other -> none."
                  },
                  "startDate": {
                    "type": "string",
                    "description": "ISO date."
                  },
                  "endDate": {
                    "type": "string",
                    "description": "ISO date. Provide this or months."
                  },
                  "months": {
                    "type": "number",
                    "description": "Duration in months. Provide this or endDate."
                  },
                  "goal": {
                    "type": "string"
                  },
                  "price": {
                    "type": "number"
                  },
                  "paymentDate": {
                    "type": "string"
                  },
                  "paymentMethod": {
                    "type": "string",
                    "enum": [
                      "Cash",
                      "Credit card",
                      "Bank transfer",
                      "Other"
                    ]
                  },
                  "paymentNumber": {
                    "type": "number"
                  },
                  "escortMeetingType": {
                    "type": "string",
                    "enum": [
                      "Online",
                      "In person"
                    ]
                  },
                  "onlineEscort": {
                    "type": "string"
                  },
                  "inPersonEscort": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string",
                    "description": "Optional first note on the coaching period."
                  },
                  "cardioDays": {
                    "type": "number"
                  },
                  "cardioTime": {
                    "type": "number"
                  },
                  "trainingDays": {
                    "type": "number"
                  },
                  "dailyStepsTarget": {
                    "type": "number"
                  },
                  "trainingPlanId": {
                    "type": "string",
                    "description": "Assign an existing training plan. Required when escortType is \"Training\" or \"Nutrition and training\"."
                  },
                  "nutritionMenuId": {
                    "type": "string",
                    "description": "Assign an existing nutrition menu. Required when escortType is \"Nutrition\" or \"Nutrition and training\"."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "trainee": {
                          "type": "object",
                          "description": "The escorted trainee. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "email": {
                              "type": "string"
                            },
                            "phoneNumber": {
                              "type": "string"
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "active",
                            "canceled",
                            "completed",
                            "suspended"
                          ]
                        },
                        "escortType": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": [
                            "null",
                            "string"
                          ],
                          "format": "date-time",
                          "description": "When the coaching period ends. null when the escort runs with no time limit, in which case isUnlimited is true."
                        },
                        "months": {
                          "type": [
                            "null",
                            "integer"
                          ],
                          "description": "Duration in months. null when the escort runs with no time limit."
                        },
                        "isUnlimited": {
                          "type": "boolean",
                          "description": "True when the escort has no end date."
                        },
                        "training": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeTrainingPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            },
                            "trainingDays": {}
                          }
                        },
                        "nutrition": {
                          "type": "object",
                          "additionalProperties": false,
                          "properties": {
                            "activeNutritionPlan": {
                              "type": "object",
                              "additionalProperties": true,
                              "nullable": true,
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "level": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/training-plans": {
      "get": {
        "tags": [
          "Training Plans"
        ],
        "description": "List training plans. Filter by traineeId or escortId.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "escortId",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "coach": {
                            "type": "string"
                          },
                          "escorts": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "title": {
                            "type": "string"
                          },
                          "notes": {
                            "type": "string"
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "Beginner",
                              "Intermediate",
                              "Advanced"
                            ]
                          },
                          "maxDuration": {
                            "type": "number",
                            "description": "Target session length in minutes."
                          },
                          "isTemplate": {
                            "type": "boolean",
                            "description": "True when the plan is a reusable template."
                          },
                          "workouts": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "A single workout day in a training plan.",
                              "properties": {
                                "trainingName": {
                                  "type": "string",
                                  "description": "Display name of the day, e.g. \"Day A — Push\"."
                                },
                                "trainingType": {
                                  "type": "string",
                                  "enum": [
                                    "A",
                                    "B",
                                    "C",
                                    "D",
                                    "E",
                                    "FullBody",
                                    "CrossFit",
                                    "Tabata",
                                    "HIIT",
                                    "EMOM",
                                    "AMRAP",
                                    "Circuit",
                                    "ForTime"
                                  ],
                                  "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                                },
                                "exerciseOrder": {
                                  "type": "string",
                                  "enum": [
                                    "Sequential",
                                    "Circuit",
                                    "Superset",
                                    "Complex"
                                  ],
                                  "description": "How exercises are performed. Defaults to Sequential."
                                },
                                "notes": {
                                  "type": "string",
                                  "description": "Free-text note for the whole day."
                                },
                                "timeBasedDetails": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                                  "properties": {
                                    "totalRounds": {
                                      "type": "number"
                                    },
                                    "timeLimit": {
                                      "type": "number"
                                    },
                                    "workInterval": {
                                      "type": "number"
                                    },
                                    "restInterval": {
                                      "type": "number"
                                    },
                                    "restBetweenRounds": {
                                      "type": "number"
                                    }
                                  }
                                },
                                "exercises": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "description": "A single exercise inside a workout day.",
                                    "properties": {
                                      "exerciseDetails": {
                                        "type": "object",
                                        "additionalProperties": true,
                                        "description": "The exercise catalog entry. On write, pass exerciseDetails as the catalog id string (from GET /exercises).",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        }
                                      },
                                      "setsNumber": {
                                        "type": "string",
                                        "description": "Number of sets, e.g. \"3\"."
                                      },
                                      "repsNumber": {
                                        "type": "string",
                                        "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                                      },
                                      "restTime": {
                                        "type": "string",
                                        "description": "Rest between sets in seconds, e.g. \"90\"."
                                      },
                                      "isDurationBased": {
                                        "type": "boolean",
                                        "description": "True for timed exercises (e.g. plank) instead of reps."
                                      },
                                      "setDuration": {
                                        "type": "string",
                                        "description": "Duration per set in seconds when isDurationBased is true."
                                      },
                                      "weightPercentage": {
                                        "type": "number",
                                        "description": "Working weight as % of 1RM, e.g. 75."
                                      },
                                      "customNotes": {
                                        "type": "string",
                                        "description": "Free-text note shown to the trainee for this exercise."
                                      },
                                      "weight": {
                                        "type": "number",
                                        "description": "Working weight in kg for the exercise."
                                      },
                                      "sets": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                          "properties": {
                                            "setNumber": {
                                              "type": "number",
                                              "description": "1-based position of the set."
                                            },
                                            "reps": {
                                              "type": "string",
                                              "description": "Reps for this set, e.g. \"8\"."
                                            },
                                            "weight": {
                                              "type": "number",
                                              "description": "Working weight for this set."
                                            },
                                            "restTime": {
                                              "type": "string",
                                              "description": "Rest after this set in seconds."
                                            },
                                            "intensityValue": {
                                              "type": "number",
                                              "description": "Intensity for this set, read against intensityType."
                                            },
                                            "dropSet": {
                                              "type": "string",
                                              "enum": [
                                                "DropSet",
                                                "DoubleDropSet",
                                                "TripleDropSet"
                                              ]
                                            },
                                            "isWarmupSet": {
                                              "type": "boolean",
                                              "description": "Warmup sets are not counted towards working volume."
                                            }
                                          }
                                        },
                                        "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                                      },
                                      "superSet": {
                                        "type": "boolean",
                                        "description": "True when this exercise belongs to a superset."
                                      },
                                      "superSetGroup": {
                                        "type": "string",
                                        "description": "Shared identifier grouping the exercises performed together in one superset."
                                      },
                                      "dropSet": {
                                        "type": "string",
                                        "enum": [
                                          "DropSet",
                                          "DoubleDropSet",
                                          "TripleDropSet"
                                        ]
                                      },
                                      "restPause": {
                                        "type": "boolean",
                                        "description": "Rest-pause technique."
                                      },
                                      "cluster": {
                                        "type": "boolean",
                                        "description": "Cluster-set technique."
                                      },
                                      "trackingType": {
                                        "type": "string",
                                        "enum": [
                                          "weight_reps",
                                          "reps_only",
                                          "duration",
                                          "completion"
                                        ],
                                        "description": "What the trainee logs for this exercise."
                                      },
                                      "intensityType": {
                                        "type": "string",
                                        "enum": [
                                          "Percentage",
                                          "RPE",
                                          "RIR"
                                        ],
                                        "description": "How intensityValue is interpreted."
                                      },
                                      "intensityValue": {
                                        "type": "number",
                                        "description": "Intensity target."
                                      },
                                      "tempo": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "Tempo in seconds per phase of the lift.",
                                        "properties": {
                                          "eccentric": {
                                            "type": "number"
                                          },
                                          "hold": {
                                            "type": "number"
                                          },
                                          "concentric": {
                                            "type": "number"
                                          },
                                          "rest": {
                                            "type": "number"
                                          }
                                        }
                                      },
                                      "distance": {
                                        "type": "number",
                                        "description": "Distance for cardio exercises."
                                      },
                                      "distanceUnit": {
                                        "type": "string",
                                        "enum": [
                                          "meters",
                                          "km",
                                          "miles",
                                          "yards"
                                        ]
                                      },
                                      "specificAlternativeExercises": {
                                        "type": "array",
                                        "items": {
                                          "type": "string"
                                        },
                                        "description": "Catalog ids the trainee may swap in for this exercise."
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Training Plans"
        ],
        "description": "Create a training plan. Provide traineeId (or escortId) to attach it to a coaching period, or omit both to leave it unassigned. Set isTemplate to save it as a reusable template. The workouts array holds an ordered list of workout days; each day has a trainingName and an exercises array. Each exercise references a catalog id via exerciseDetails (get ids from GET /exercises).\n\nBREAKING CHANGE: the plan name is now \"title\". The previous \"name\" field has been removed, so a request sending \"name\" is rejected with 400 \"must have required property title\". This matches the field name used in every read response. The same rename applies to PATCH /training-plans/{planId}.\n\nTo build a plan from an existing one, do not read it and re-create it: that silently drops per-set prescriptions, supersets, tempo and intensity. Use POST /training-plans/{planId}/duplicate instead.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Owning trainee id. Omit both traineeId and escortId to leave the plan unassigned."
                  },
                  "isTemplate": {
                    "type": "boolean",
                    "description": "Save as a reusable template. A template cannot be assigned, so omit traineeId and escortId."
                  },
                  "escortId": {
                    "type": "string",
                    "description": "Optional coaching period id"
                  },
                  "title": {
                    "type": "string",
                    "description": "Plan title shown to the trainee"
                  },
                  "description": {
                    "type": "string"
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "Beginner",
                      "Intermediate",
                      "Advanced"
                    ],
                    "description": "Difficulty level of the plan."
                  },
                  "maxDuration": {
                    "type": "number",
                    "description": "Target session length in minutes."
                  },
                  "workouts": {
                    "type": "array",
                    "maxItems": 50,
                    "description": "Ordered workout days (e.g. A/B/C splits)",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "A single workout day in a training plan.",
                      "properties": {
                        "trainingName": {
                          "type": "string",
                          "description": "Display name of the day, e.g. \"Day A — Push\"."
                        },
                        "trainingType": {
                          "type": "string",
                          "enum": [
                            "A",
                            "B",
                            "C",
                            "D",
                            "E",
                            "FullBody",
                            "CrossFit",
                            "Tabata",
                            "HIIT",
                            "EMOM",
                            "AMRAP",
                            "Circuit",
                            "ForTime"
                          ],
                          "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                        },
                        "exerciseOrder": {
                          "type": "string",
                          "enum": [
                            "Sequential",
                            "Circuit",
                            "Superset",
                            "Complex"
                          ],
                          "description": "How exercises are performed. Defaults to Sequential."
                        },
                        "notes": {
                          "type": "string",
                          "description": "Free-text note for the whole day."
                        },
                        "timeBasedDetails": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                          "properties": {
                            "totalRounds": {
                              "type": "number"
                            },
                            "timeLimit": {
                              "type": "number"
                            },
                            "workInterval": {
                              "type": "number"
                            },
                            "restInterval": {
                              "type": "number"
                            },
                            "restBetweenRounds": {
                              "type": "number"
                            }
                          }
                        },
                        "exercises": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "A single exercise inside a workout day.",
                            "properties": {
                              "exerciseDetails": {
                                "type": "string",
                                "description": "Exercise catalog id, taken from GET /exercises."
                              },
                              "setsNumber": {
                                "type": "string",
                                "description": "Number of sets, e.g. \"3\"."
                              },
                              "repsNumber": {
                                "type": "string",
                                "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                              },
                              "restTime": {
                                "type": "string",
                                "description": "Rest between sets in seconds, e.g. \"90\"."
                              },
                              "isDurationBased": {
                                "type": "boolean",
                                "description": "True for timed exercises (e.g. plank) instead of reps."
                              },
                              "setDuration": {
                                "type": "string",
                                "description": "Duration per set in seconds when isDurationBased is true."
                              },
                              "weightPercentage": {
                                "type": "number",
                                "description": "Working weight as % of 1RM, e.g. 75."
                              },
                              "customNotes": {
                                "type": "string",
                                "description": "Free-text note shown to the trainee for this exercise."
                              },
                              "weight": {
                                "type": "number",
                                "description": "Working weight in kg for the exercise."
                              },
                              "sets": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                  "properties": {
                                    "setNumber": {
                                      "type": "number",
                                      "description": "1-based position of the set."
                                    },
                                    "reps": {
                                      "type": "string",
                                      "description": "Reps for this set, e.g. \"8\"."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight for this set."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest after this set in seconds."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity for this set, read against intensityType."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "isWarmupSet": {
                                      "type": "boolean",
                                      "description": "Warmup sets are not counted towards working volume."
                                    }
                                  }
                                },
                                "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                              },
                              "superSet": {
                                "type": "boolean",
                                "description": "True when this exercise belongs to a superset."
                              },
                              "superSetGroup": {
                                "type": "string",
                                "description": "Shared identifier grouping the exercises performed together in one superset."
                              },
                              "dropSet": {
                                "type": "string",
                                "enum": [
                                  "DropSet",
                                  "DoubleDropSet",
                                  "TripleDropSet"
                                ]
                              },
                              "restPause": {
                                "type": "boolean",
                                "description": "Rest-pause technique."
                              },
                              "cluster": {
                                "type": "boolean",
                                "description": "Cluster-set technique."
                              },
                              "trackingType": {
                                "type": "string",
                                "enum": [
                                  "weight_reps",
                                  "reps_only",
                                  "duration",
                                  "completion"
                                ],
                                "description": "What the trainee logs for this exercise."
                              },
                              "intensityType": {
                                "type": "string",
                                "enum": [
                                  "Percentage",
                                  "RPE",
                                  "RIR"
                                ],
                                "description": "How intensityValue is interpreted."
                              },
                              "intensityValue": {
                                "type": "number",
                                "description": "Intensity target."
                              },
                              "tempo": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Tempo in seconds per phase of the lift.",
                                "properties": {
                                  "eccentric": {
                                    "type": "number"
                                  },
                                  "hold": {
                                    "type": "number"
                                  },
                                  "concentric": {
                                    "type": "number"
                                  },
                                  "rest": {
                                    "type": "number"
                                  }
                                }
                              },
                              "distance": {
                                "type": "number",
                                "description": "Distance for cardio exercises."
                              },
                              "distanceUnit": {
                                "type": "string",
                                "enum": [
                                  "meters",
                                  "km",
                                  "miles",
                                  "yards"
                                ]
                              },
                              "specificAlternativeExercises": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Catalog ids the trainee may swap in for this exercise."
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "Beginner",
                            "Intermediate",
                            "Advanced"
                          ]
                        },
                        "maxDuration": {
                          "type": "number",
                          "description": "Target session length in minutes."
                        },
                        "isTemplate": {
                          "type": "boolean",
                          "description": "True when the plan is a reusable template."
                        },
                        "workouts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single workout day in a training plan.",
                            "properties": {
                              "trainingName": {
                                "type": "string",
                                "description": "Display name of the day, e.g. \"Day A — Push\"."
                              },
                              "trainingType": {
                                "type": "string",
                                "enum": [
                                  "A",
                                  "B",
                                  "C",
                                  "D",
                                  "E",
                                  "FullBody",
                                  "CrossFit",
                                  "Tabata",
                                  "HIIT",
                                  "EMOM",
                                  "AMRAP",
                                  "Circuit",
                                  "ForTime"
                                ],
                                "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                              },
                              "exerciseOrder": {
                                "type": "string",
                                "enum": [
                                  "Sequential",
                                  "Circuit",
                                  "Superset",
                                  "Complex"
                                ],
                                "description": "How exercises are performed. Defaults to Sequential."
                              },
                              "notes": {
                                "type": "string",
                                "description": "Free-text note for the whole day."
                              },
                              "timeBasedDetails": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                                "properties": {
                                  "totalRounds": {
                                    "type": "number"
                                  },
                                  "timeLimit": {
                                    "type": "number"
                                  },
                                  "workInterval": {
                                    "type": "number"
                                  },
                                  "restInterval": {
                                    "type": "number"
                                  },
                                  "restBetweenRounds": {
                                    "type": "number"
                                  }
                                }
                              },
                              "exercises": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "description": "A single exercise inside a workout day.",
                                  "properties": {
                                    "exerciseDetails": {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "The exercise catalog entry. On write, pass exerciseDetails as the catalog id string (from GET /exercises).",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "setsNumber": {
                                      "type": "string",
                                      "description": "Number of sets, e.g. \"3\"."
                                    },
                                    "repsNumber": {
                                      "type": "string",
                                      "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest between sets in seconds, e.g. \"90\"."
                                    },
                                    "isDurationBased": {
                                      "type": "boolean",
                                      "description": "True for timed exercises (e.g. plank) instead of reps."
                                    },
                                    "setDuration": {
                                      "type": "string",
                                      "description": "Duration per set in seconds when isDurationBased is true."
                                    },
                                    "weightPercentage": {
                                      "type": "number",
                                      "description": "Working weight as % of 1RM, e.g. 75."
                                    },
                                    "customNotes": {
                                      "type": "string",
                                      "description": "Free-text note shown to the trainee for this exercise."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight in kg for the exercise."
                                    },
                                    "sets": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                        "properties": {
                                          "setNumber": {
                                            "type": "number",
                                            "description": "1-based position of the set."
                                          },
                                          "reps": {
                                            "type": "string",
                                            "description": "Reps for this set, e.g. \"8\"."
                                          },
                                          "weight": {
                                            "type": "number",
                                            "description": "Working weight for this set."
                                          },
                                          "restTime": {
                                            "type": "string",
                                            "description": "Rest after this set in seconds."
                                          },
                                          "intensityValue": {
                                            "type": "number",
                                            "description": "Intensity for this set, read against intensityType."
                                          },
                                          "dropSet": {
                                            "type": "string",
                                            "enum": [
                                              "DropSet",
                                              "DoubleDropSet",
                                              "TripleDropSet"
                                            ]
                                          },
                                          "isWarmupSet": {
                                            "type": "boolean",
                                            "description": "Warmup sets are not counted towards working volume."
                                          }
                                        }
                                      },
                                      "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                                    },
                                    "superSet": {
                                      "type": "boolean",
                                      "description": "True when this exercise belongs to a superset."
                                    },
                                    "superSetGroup": {
                                      "type": "string",
                                      "description": "Shared identifier grouping the exercises performed together in one superset."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "restPause": {
                                      "type": "boolean",
                                      "description": "Rest-pause technique."
                                    },
                                    "cluster": {
                                      "type": "boolean",
                                      "description": "Cluster-set technique."
                                    },
                                    "trackingType": {
                                      "type": "string",
                                      "enum": [
                                        "weight_reps",
                                        "reps_only",
                                        "duration",
                                        "completion"
                                      ],
                                      "description": "What the trainee logs for this exercise."
                                    },
                                    "intensityType": {
                                      "type": "string",
                                      "enum": [
                                        "Percentage",
                                        "RPE",
                                        "RIR"
                                      ],
                                      "description": "How intensityValue is interpreted."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity target."
                                    },
                                    "tempo": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "description": "Tempo in seconds per phase of the lift.",
                                      "properties": {
                                        "eccentric": {
                                          "type": "number"
                                        },
                                        "hold": {
                                          "type": "number"
                                        },
                                        "concentric": {
                                          "type": "number"
                                        },
                                        "rest": {
                                          "type": "number"
                                        }
                                      }
                                    },
                                    "distance": {
                                      "type": "number",
                                      "description": "Distance for cardio exercises."
                                    },
                                    "distanceUnit": {
                                      "type": "string",
                                      "enum": [
                                        "meters",
                                        "km",
                                        "miles",
                                        "yards"
                                      ]
                                    },
                                    "specificAlternativeExercises": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Catalog ids the trainee may swap in for this exercise."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/training-plans/{planId}": {
      "get": {
        "tags": [
          "Training Plans"
        ],
        "description": "Get a training plan by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "planId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "Beginner",
                            "Intermediate",
                            "Advanced"
                          ]
                        },
                        "maxDuration": {
                          "type": "number",
                          "description": "Target session length in minutes."
                        },
                        "isTemplate": {
                          "type": "boolean",
                          "description": "True when the plan is a reusable template."
                        },
                        "workouts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single workout day in a training plan.",
                            "properties": {
                              "trainingName": {
                                "type": "string",
                                "description": "Display name of the day, e.g. \"Day A — Push\"."
                              },
                              "trainingType": {
                                "type": "string",
                                "enum": [
                                  "A",
                                  "B",
                                  "C",
                                  "D",
                                  "E",
                                  "FullBody",
                                  "CrossFit",
                                  "Tabata",
                                  "HIIT",
                                  "EMOM",
                                  "AMRAP",
                                  "Circuit",
                                  "ForTime"
                                ],
                                "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                              },
                              "exerciseOrder": {
                                "type": "string",
                                "enum": [
                                  "Sequential",
                                  "Circuit",
                                  "Superset",
                                  "Complex"
                                ],
                                "description": "How exercises are performed. Defaults to Sequential."
                              },
                              "notes": {
                                "type": "string",
                                "description": "Free-text note for the whole day."
                              },
                              "timeBasedDetails": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                                "properties": {
                                  "totalRounds": {
                                    "type": "number"
                                  },
                                  "timeLimit": {
                                    "type": "number"
                                  },
                                  "workInterval": {
                                    "type": "number"
                                  },
                                  "restInterval": {
                                    "type": "number"
                                  },
                                  "restBetweenRounds": {
                                    "type": "number"
                                  }
                                }
                              },
                              "exercises": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "description": "A single exercise inside a workout day.",
                                  "properties": {
                                    "exerciseDetails": {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "The exercise catalog entry. On write, pass exerciseDetails as the catalog id string (from GET /exercises).",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "setsNumber": {
                                      "type": "string",
                                      "description": "Number of sets, e.g. \"3\"."
                                    },
                                    "repsNumber": {
                                      "type": "string",
                                      "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest between sets in seconds, e.g. \"90\"."
                                    },
                                    "isDurationBased": {
                                      "type": "boolean",
                                      "description": "True for timed exercises (e.g. plank) instead of reps."
                                    },
                                    "setDuration": {
                                      "type": "string",
                                      "description": "Duration per set in seconds when isDurationBased is true."
                                    },
                                    "weightPercentage": {
                                      "type": "number",
                                      "description": "Working weight as % of 1RM, e.g. 75."
                                    },
                                    "customNotes": {
                                      "type": "string",
                                      "description": "Free-text note shown to the trainee for this exercise."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight in kg for the exercise."
                                    },
                                    "sets": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                        "properties": {
                                          "setNumber": {
                                            "type": "number",
                                            "description": "1-based position of the set."
                                          },
                                          "reps": {
                                            "type": "string",
                                            "description": "Reps for this set, e.g. \"8\"."
                                          },
                                          "weight": {
                                            "type": "number",
                                            "description": "Working weight for this set."
                                          },
                                          "restTime": {
                                            "type": "string",
                                            "description": "Rest after this set in seconds."
                                          },
                                          "intensityValue": {
                                            "type": "number",
                                            "description": "Intensity for this set, read against intensityType."
                                          },
                                          "dropSet": {
                                            "type": "string",
                                            "enum": [
                                              "DropSet",
                                              "DoubleDropSet",
                                              "TripleDropSet"
                                            ]
                                          },
                                          "isWarmupSet": {
                                            "type": "boolean",
                                            "description": "Warmup sets are not counted towards working volume."
                                          }
                                        }
                                      },
                                      "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                                    },
                                    "superSet": {
                                      "type": "boolean",
                                      "description": "True when this exercise belongs to a superset."
                                    },
                                    "superSetGroup": {
                                      "type": "string",
                                      "description": "Shared identifier grouping the exercises performed together in one superset."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "restPause": {
                                      "type": "boolean",
                                      "description": "Rest-pause technique."
                                    },
                                    "cluster": {
                                      "type": "boolean",
                                      "description": "Cluster-set technique."
                                    },
                                    "trackingType": {
                                      "type": "string",
                                      "enum": [
                                        "weight_reps",
                                        "reps_only",
                                        "duration",
                                        "completion"
                                      ],
                                      "description": "What the trainee logs for this exercise."
                                    },
                                    "intensityType": {
                                      "type": "string",
                                      "enum": [
                                        "Percentage",
                                        "RPE",
                                        "RIR"
                                      ],
                                      "description": "How intensityValue is interpreted."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity target."
                                    },
                                    "tempo": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "description": "Tempo in seconds per phase of the lift.",
                                      "properties": {
                                        "eccentric": {
                                          "type": "number"
                                        },
                                        "hold": {
                                          "type": "number"
                                        },
                                        "concentric": {
                                          "type": "number"
                                        },
                                        "rest": {
                                          "type": "number"
                                        }
                                      }
                                    },
                                    "distance": {
                                      "type": "number",
                                      "description": "Distance for cardio exercises."
                                    },
                                    "distanceUnit": {
                                      "type": "string",
                                      "enum": [
                                        "meters",
                                        "km",
                                        "miles",
                                        "yards"
                                      ]
                                    },
                                    "specificAlternativeExercises": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Catalog ids the trainee may swap in for this exercise."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Training Plans"
        ],
        "description": "Partially update a training plan. Pass only fields you want to change.\n\nBREAKING CHANGE: the plan name is now \"title\"; the previous \"name\" field has been removed. Unknown fields are dropped during validation, so a PATCH sending only \"name\" is rejected with 400 \"No updatable fields were supplied\" rather than silently doing nothing.\n\nIf the plan is attached to more than one trainee, editing it changes the plan for all of them, so the request returns 409 CONFLICT until you confirm with applyToAllSharedTrainees.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "Beginner",
                      "Intermediate",
                      "Advanced"
                    ]
                  },
                  "maxDuration": {
                    "type": "number"
                  },
                  "workouts": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "A single workout day in a training plan.",
                      "properties": {
                        "trainingName": {
                          "type": "string",
                          "description": "Display name of the day, e.g. \"Day A — Push\"."
                        },
                        "trainingType": {
                          "type": "string",
                          "enum": [
                            "A",
                            "B",
                            "C",
                            "D",
                            "E",
                            "FullBody",
                            "CrossFit",
                            "Tabata",
                            "HIIT",
                            "EMOM",
                            "AMRAP",
                            "Circuit",
                            "ForTime"
                          ],
                          "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                        },
                        "exerciseOrder": {
                          "type": "string",
                          "enum": [
                            "Sequential",
                            "Circuit",
                            "Superset",
                            "Complex"
                          ],
                          "description": "How exercises are performed. Defaults to Sequential."
                        },
                        "notes": {
                          "type": "string",
                          "description": "Free-text note for the whole day."
                        },
                        "timeBasedDetails": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                          "properties": {
                            "totalRounds": {
                              "type": "number"
                            },
                            "timeLimit": {
                              "type": "number"
                            },
                            "workInterval": {
                              "type": "number"
                            },
                            "restInterval": {
                              "type": "number"
                            },
                            "restBetweenRounds": {
                              "type": "number"
                            }
                          }
                        },
                        "exercises": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "description": "A single exercise inside a workout day.",
                            "properties": {
                              "exerciseDetails": {
                                "type": "string",
                                "description": "Exercise catalog id, taken from GET /exercises."
                              },
                              "setsNumber": {
                                "type": "string",
                                "description": "Number of sets, e.g. \"3\"."
                              },
                              "repsNumber": {
                                "type": "string",
                                "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                              },
                              "restTime": {
                                "type": "string",
                                "description": "Rest between sets in seconds, e.g. \"90\"."
                              },
                              "isDurationBased": {
                                "type": "boolean",
                                "description": "True for timed exercises (e.g. plank) instead of reps."
                              },
                              "setDuration": {
                                "type": "string",
                                "description": "Duration per set in seconds when isDurationBased is true."
                              },
                              "weightPercentage": {
                                "type": "number",
                                "description": "Working weight as % of 1RM, e.g. 75."
                              },
                              "customNotes": {
                                "type": "string",
                                "description": "Free-text note shown to the trainee for this exercise."
                              },
                              "weight": {
                                "type": "number",
                                "description": "Working weight in kg for the exercise."
                              },
                              "sets": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                  "properties": {
                                    "setNumber": {
                                      "type": "number",
                                      "description": "1-based position of the set."
                                    },
                                    "reps": {
                                      "type": "string",
                                      "description": "Reps for this set, e.g. \"8\"."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight for this set."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest after this set in seconds."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity for this set, read against intensityType."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "isWarmupSet": {
                                      "type": "boolean",
                                      "description": "Warmup sets are not counted towards working volume."
                                    }
                                  }
                                },
                                "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                              },
                              "superSet": {
                                "type": "boolean",
                                "description": "True when this exercise belongs to a superset."
                              },
                              "superSetGroup": {
                                "type": "string",
                                "description": "Shared identifier grouping the exercises performed together in one superset."
                              },
                              "dropSet": {
                                "type": "string",
                                "enum": [
                                  "DropSet",
                                  "DoubleDropSet",
                                  "TripleDropSet"
                                ]
                              },
                              "restPause": {
                                "type": "boolean",
                                "description": "Rest-pause technique."
                              },
                              "cluster": {
                                "type": "boolean",
                                "description": "Cluster-set technique."
                              },
                              "trackingType": {
                                "type": "string",
                                "enum": [
                                  "weight_reps",
                                  "reps_only",
                                  "duration",
                                  "completion"
                                ],
                                "description": "What the trainee logs for this exercise."
                              },
                              "intensityType": {
                                "type": "string",
                                "enum": [
                                  "Percentage",
                                  "RPE",
                                  "RIR"
                                ],
                                "description": "How intensityValue is interpreted."
                              },
                              "intensityValue": {
                                "type": "number",
                                "description": "Intensity target."
                              },
                              "tempo": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Tempo in seconds per phase of the lift.",
                                "properties": {
                                  "eccentric": {
                                    "type": "number"
                                  },
                                  "hold": {
                                    "type": "number"
                                  },
                                  "concentric": {
                                    "type": "number"
                                  },
                                  "rest": {
                                    "type": "number"
                                  }
                                }
                              },
                              "distance": {
                                "type": "number",
                                "description": "Distance for cardio exercises."
                              },
                              "distanceUnit": {
                                "type": "string",
                                "enum": [
                                  "meters",
                                  "km",
                                  "miles",
                                  "yards"
                                ]
                              },
                              "specificAlternativeExercises": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Catalog ids the trainee may swap in for this exercise."
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      }
                    }
                  },
                  "applyToAllSharedTrainees": {
                    "type": "boolean",
                    "description": "Required (true) to edit a plan shared by multiple trainees; the change then applies to all of them. Without it, a shared plan returns 409."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "planId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "Beginner",
                            "Intermediate",
                            "Advanced"
                          ]
                        },
                        "maxDuration": {
                          "type": "number",
                          "description": "Target session length in minutes."
                        },
                        "isTemplate": {
                          "type": "boolean",
                          "description": "True when the plan is a reusable template."
                        },
                        "workouts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single workout day in a training plan.",
                            "properties": {
                              "trainingName": {
                                "type": "string",
                                "description": "Display name of the day, e.g. \"Day A — Push\"."
                              },
                              "trainingType": {
                                "type": "string",
                                "enum": [
                                  "A",
                                  "B",
                                  "C",
                                  "D",
                                  "E",
                                  "FullBody",
                                  "CrossFit",
                                  "Tabata",
                                  "HIIT",
                                  "EMOM",
                                  "AMRAP",
                                  "Circuit",
                                  "ForTime"
                                ],
                                "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                              },
                              "exerciseOrder": {
                                "type": "string",
                                "enum": [
                                  "Sequential",
                                  "Circuit",
                                  "Superset",
                                  "Complex"
                                ],
                                "description": "How exercises are performed. Defaults to Sequential."
                              },
                              "notes": {
                                "type": "string",
                                "description": "Free-text note for the whole day."
                              },
                              "timeBasedDetails": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                                "properties": {
                                  "totalRounds": {
                                    "type": "number"
                                  },
                                  "timeLimit": {
                                    "type": "number"
                                  },
                                  "workInterval": {
                                    "type": "number"
                                  },
                                  "restInterval": {
                                    "type": "number"
                                  },
                                  "restBetweenRounds": {
                                    "type": "number"
                                  }
                                }
                              },
                              "exercises": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "description": "A single exercise inside a workout day.",
                                  "properties": {
                                    "exerciseDetails": {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "The exercise catalog entry. On write, pass exerciseDetails as the catalog id string (from GET /exercises).",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "setsNumber": {
                                      "type": "string",
                                      "description": "Number of sets, e.g. \"3\"."
                                    },
                                    "repsNumber": {
                                      "type": "string",
                                      "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest between sets in seconds, e.g. \"90\"."
                                    },
                                    "isDurationBased": {
                                      "type": "boolean",
                                      "description": "True for timed exercises (e.g. plank) instead of reps."
                                    },
                                    "setDuration": {
                                      "type": "string",
                                      "description": "Duration per set in seconds when isDurationBased is true."
                                    },
                                    "weightPercentage": {
                                      "type": "number",
                                      "description": "Working weight as % of 1RM, e.g. 75."
                                    },
                                    "customNotes": {
                                      "type": "string",
                                      "description": "Free-text note shown to the trainee for this exercise."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight in kg for the exercise."
                                    },
                                    "sets": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                        "properties": {
                                          "setNumber": {
                                            "type": "number",
                                            "description": "1-based position of the set."
                                          },
                                          "reps": {
                                            "type": "string",
                                            "description": "Reps for this set, e.g. \"8\"."
                                          },
                                          "weight": {
                                            "type": "number",
                                            "description": "Working weight for this set."
                                          },
                                          "restTime": {
                                            "type": "string",
                                            "description": "Rest after this set in seconds."
                                          },
                                          "intensityValue": {
                                            "type": "number",
                                            "description": "Intensity for this set, read against intensityType."
                                          },
                                          "dropSet": {
                                            "type": "string",
                                            "enum": [
                                              "DropSet",
                                              "DoubleDropSet",
                                              "TripleDropSet"
                                            ]
                                          },
                                          "isWarmupSet": {
                                            "type": "boolean",
                                            "description": "Warmup sets are not counted towards working volume."
                                          }
                                        }
                                      },
                                      "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                                    },
                                    "superSet": {
                                      "type": "boolean",
                                      "description": "True when this exercise belongs to a superset."
                                    },
                                    "superSetGroup": {
                                      "type": "string",
                                      "description": "Shared identifier grouping the exercises performed together in one superset."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "restPause": {
                                      "type": "boolean",
                                      "description": "Rest-pause technique."
                                    },
                                    "cluster": {
                                      "type": "boolean",
                                      "description": "Cluster-set technique."
                                    },
                                    "trackingType": {
                                      "type": "string",
                                      "enum": [
                                        "weight_reps",
                                        "reps_only",
                                        "duration",
                                        "completion"
                                      ],
                                      "description": "What the trainee logs for this exercise."
                                    },
                                    "intensityType": {
                                      "type": "string",
                                      "enum": [
                                        "Percentage",
                                        "RPE",
                                        "RIR"
                                      ],
                                      "description": "How intensityValue is interpreted."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity target."
                                    },
                                    "tempo": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "description": "Tempo in seconds per phase of the lift.",
                                      "properties": {
                                        "eccentric": {
                                          "type": "number"
                                        },
                                        "hold": {
                                          "type": "number"
                                        },
                                        "concentric": {
                                          "type": "number"
                                        },
                                        "rest": {
                                          "type": "number"
                                        }
                                      }
                                    },
                                    "distance": {
                                      "type": "number",
                                      "description": "Distance for cardio exercises."
                                    },
                                    "distanceUnit": {
                                      "type": "string",
                                      "enum": [
                                        "meters",
                                        "km",
                                        "miles",
                                        "yards"
                                      ]
                                    },
                                    "specificAlternativeExercises": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Catalog ids the trainee may swap in for this exercise."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Training Plans"
        ],
        "description": "Delete a training plan permanently.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "planId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/active-training-plan": {
      "get": {
        "tags": [
          "Training Plans"
        ],
        "description": "Get a trainee's currently active training plan (resolved via the active coaching period). 404 if the trainee has no active plan.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "Beginner",
                            "Intermediate",
                            "Advanced"
                          ]
                        },
                        "maxDuration": {
                          "type": "number",
                          "description": "Target session length in minutes."
                        },
                        "isTemplate": {
                          "type": "boolean",
                          "description": "True when the plan is a reusable template."
                        },
                        "workouts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single workout day in a training plan.",
                            "properties": {
                              "trainingName": {
                                "type": "string",
                                "description": "Display name of the day, e.g. \"Day A — Push\"."
                              },
                              "trainingType": {
                                "type": "string",
                                "enum": [
                                  "A",
                                  "B",
                                  "C",
                                  "D",
                                  "E",
                                  "FullBody",
                                  "CrossFit",
                                  "Tabata",
                                  "HIIT",
                                  "EMOM",
                                  "AMRAP",
                                  "Circuit",
                                  "ForTime"
                                ],
                                "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                              },
                              "exerciseOrder": {
                                "type": "string",
                                "enum": [
                                  "Sequential",
                                  "Circuit",
                                  "Superset",
                                  "Complex"
                                ],
                                "description": "How exercises are performed. Defaults to Sequential."
                              },
                              "notes": {
                                "type": "string",
                                "description": "Free-text note for the whole day."
                              },
                              "timeBasedDetails": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                                "properties": {
                                  "totalRounds": {
                                    "type": "number"
                                  },
                                  "timeLimit": {
                                    "type": "number"
                                  },
                                  "workInterval": {
                                    "type": "number"
                                  },
                                  "restInterval": {
                                    "type": "number"
                                  },
                                  "restBetweenRounds": {
                                    "type": "number"
                                  }
                                }
                              },
                              "exercises": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "description": "A single exercise inside a workout day.",
                                  "properties": {
                                    "exerciseDetails": {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "The exercise catalog entry. On write, pass exerciseDetails as the catalog id string (from GET /exercises).",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "setsNumber": {
                                      "type": "string",
                                      "description": "Number of sets, e.g. \"3\"."
                                    },
                                    "repsNumber": {
                                      "type": "string",
                                      "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest between sets in seconds, e.g. \"90\"."
                                    },
                                    "isDurationBased": {
                                      "type": "boolean",
                                      "description": "True for timed exercises (e.g. plank) instead of reps."
                                    },
                                    "setDuration": {
                                      "type": "string",
                                      "description": "Duration per set in seconds when isDurationBased is true."
                                    },
                                    "weightPercentage": {
                                      "type": "number",
                                      "description": "Working weight as % of 1RM, e.g. 75."
                                    },
                                    "customNotes": {
                                      "type": "string",
                                      "description": "Free-text note shown to the trainee for this exercise."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight in kg for the exercise."
                                    },
                                    "sets": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                        "properties": {
                                          "setNumber": {
                                            "type": "number",
                                            "description": "1-based position of the set."
                                          },
                                          "reps": {
                                            "type": "string",
                                            "description": "Reps for this set, e.g. \"8\"."
                                          },
                                          "weight": {
                                            "type": "number",
                                            "description": "Working weight for this set."
                                          },
                                          "restTime": {
                                            "type": "string",
                                            "description": "Rest after this set in seconds."
                                          },
                                          "intensityValue": {
                                            "type": "number",
                                            "description": "Intensity for this set, read against intensityType."
                                          },
                                          "dropSet": {
                                            "type": "string",
                                            "enum": [
                                              "DropSet",
                                              "DoubleDropSet",
                                              "TripleDropSet"
                                            ]
                                          },
                                          "isWarmupSet": {
                                            "type": "boolean",
                                            "description": "Warmup sets are not counted towards working volume."
                                          }
                                        }
                                      },
                                      "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                                    },
                                    "superSet": {
                                      "type": "boolean",
                                      "description": "True when this exercise belongs to a superset."
                                    },
                                    "superSetGroup": {
                                      "type": "string",
                                      "description": "Shared identifier grouping the exercises performed together in one superset."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "restPause": {
                                      "type": "boolean",
                                      "description": "Rest-pause technique."
                                    },
                                    "cluster": {
                                      "type": "boolean",
                                      "description": "Cluster-set technique."
                                    },
                                    "trackingType": {
                                      "type": "string",
                                      "enum": [
                                        "weight_reps",
                                        "reps_only",
                                        "duration",
                                        "completion"
                                      ],
                                      "description": "What the trainee logs for this exercise."
                                    },
                                    "intensityType": {
                                      "type": "string",
                                      "enum": [
                                        "Percentage",
                                        "RPE",
                                        "RIR"
                                      ],
                                      "description": "How intensityValue is interpreted."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity target."
                                    },
                                    "tempo": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "description": "Tempo in seconds per phase of the lift.",
                                      "properties": {
                                        "eccentric": {
                                          "type": "number"
                                        },
                                        "hold": {
                                          "type": "number"
                                        },
                                        "concentric": {
                                          "type": "number"
                                        },
                                        "rest": {
                                          "type": "number"
                                        }
                                      }
                                    },
                                    "distance": {
                                      "type": "number",
                                      "description": "Distance for cardio exercises."
                                    },
                                    "distanceUnit": {
                                      "type": "string",
                                      "enum": [
                                        "meters",
                                        "km",
                                        "miles",
                                        "yards"
                                      ]
                                    },
                                    "specificAlternativeExercises": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Catalog ids the trainee may swap in for this exercise."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/training-plans/{planId}/duplicate": {
      "post": {
        "tags": [
          "Training Plans"
        ],
        "description": "Copy an existing training plan, including every exercise detail (per-set prescriptions, supersets, tempo, intensity, drop sets, alternatives). This is the supported way to turn a template into a trainee plan, because a template itself can never be assigned: you assign the copy, not the template. The copy is always created with isTemplate=false and isEditable=true. Returns the new plan, including its id, so no follow-up lookup is needed.\n\nAssignment is optional. Send neither traineeId nor escortId to get an unassigned copy; send one of them to duplicate and assign in a single call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "nullable": true,
                "additionalProperties": false,
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Assign the copy to this trainee by resolving their coaching period automatically. Picks the trainee's most recently created Active escort. Returns 400 'No active escort found for this trainee' when the trainee has no Active escort, which is the case for Pending, Suspended, or not-yet-started periods; use escortId for those. Omit both ids to leave the copy unassigned."
                  },
                  "escortId": {
                    "type": "string",
                    "description": "Assign the copy to this exact coaching period, whatever its status. Use this instead of traineeId when the target period is not Active (Pending, Suspended, or scheduled for the future), or when the trainee has more than one period and you must not rely on automatic selection. When both ids are sent, escortId decides the target and traineeId is only validated against it: a mismatch returns 400 \"escortId does not belong to the provided traineeId\", which is a useful safety check when the two ids come from an external system."
                  },
                  "title": {
                    "type": "string",
                    "description": "Title for the copy. Defaults to the source title with a copy suffix. The copy stays in the same plan group as its source, so duplicates do not scatter the plans list."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "planId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "Beginner",
                            "Intermediate",
                            "Advanced"
                          ]
                        },
                        "maxDuration": {
                          "type": "number",
                          "description": "Target session length in minutes."
                        },
                        "isTemplate": {
                          "type": "boolean",
                          "description": "True when the plan is a reusable template."
                        },
                        "workouts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single workout day in a training plan.",
                            "properties": {
                              "trainingName": {
                                "type": "string",
                                "description": "Display name of the day, e.g. \"Day A — Push\"."
                              },
                              "trainingType": {
                                "type": "string",
                                "enum": [
                                  "A",
                                  "B",
                                  "C",
                                  "D",
                                  "E",
                                  "FullBody",
                                  "CrossFit",
                                  "Tabata",
                                  "HIIT",
                                  "EMOM",
                                  "AMRAP",
                                  "Circuit",
                                  "ForTime"
                                ],
                                "description": "Day label, e.g. \"A\", \"B\", \"FullBody\"."
                              },
                              "exerciseOrder": {
                                "type": "string",
                                "enum": [
                                  "Sequential",
                                  "Circuit",
                                  "Superset",
                                  "Complex"
                                ],
                                "description": "How exercises are performed. Defaults to Sequential."
                              },
                              "notes": {
                                "type": "string",
                                "description": "Free-text note for the whole day."
                              },
                              "timeBasedDetails": {
                                "type": "object",
                                "additionalProperties": false,
                                "description": "Timing configuration for circuit-style days (Tabata, HIIT, EMOM, AMRAP). Seconds unless noted.",
                                "properties": {
                                  "totalRounds": {
                                    "type": "number"
                                  },
                                  "timeLimit": {
                                    "type": "number"
                                  },
                                  "workInterval": {
                                    "type": "number"
                                  },
                                  "restInterval": {
                                    "type": "number"
                                  },
                                  "restBetweenRounds": {
                                    "type": "number"
                                  }
                                }
                              },
                              "exercises": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "description": "A single exercise inside a workout day.",
                                  "properties": {
                                    "exerciseDetails": {
                                      "type": "object",
                                      "additionalProperties": true,
                                      "description": "The exercise catalog entry. On write, pass exerciseDetails as the catalog id string (from GET /exercises).",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        }
                                      }
                                    },
                                    "setsNumber": {
                                      "type": "string",
                                      "description": "Number of sets, e.g. \"3\"."
                                    },
                                    "repsNumber": {
                                      "type": "string",
                                      "description": "Reps per set, e.g. \"10\" or \"8-12\"."
                                    },
                                    "restTime": {
                                      "type": "string",
                                      "description": "Rest between sets in seconds, e.g. \"90\"."
                                    },
                                    "isDurationBased": {
                                      "type": "boolean",
                                      "description": "True for timed exercises (e.g. plank) instead of reps."
                                    },
                                    "setDuration": {
                                      "type": "string",
                                      "description": "Duration per set in seconds when isDurationBased is true."
                                    },
                                    "weightPercentage": {
                                      "type": "number",
                                      "description": "Working weight as % of 1RM, e.g. 75."
                                    },
                                    "customNotes": {
                                      "type": "string",
                                      "description": "Free-text note shown to the trainee for this exercise."
                                    },
                                    "weight": {
                                      "type": "number",
                                      "description": "Working weight in kg for the exercise."
                                    },
                                    "sets": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single prescribed set. Use this when sets differ from each other; otherwise setsNumber/repsNumber describe them uniformly.",
                                        "properties": {
                                          "setNumber": {
                                            "type": "number",
                                            "description": "1-based position of the set."
                                          },
                                          "reps": {
                                            "type": "string",
                                            "description": "Reps for this set, e.g. \"8\"."
                                          },
                                          "weight": {
                                            "type": "number",
                                            "description": "Working weight for this set."
                                          },
                                          "restTime": {
                                            "type": "string",
                                            "description": "Rest after this set in seconds."
                                          },
                                          "intensityValue": {
                                            "type": "number",
                                            "description": "Intensity for this set, read against intensityType."
                                          },
                                          "dropSet": {
                                            "type": "string",
                                            "enum": [
                                              "DropSet",
                                              "DoubleDropSet",
                                              "TripleDropSet"
                                            ]
                                          },
                                          "isWarmupSet": {
                                            "type": "boolean",
                                            "description": "Warmup sets are not counted towards working volume."
                                          }
                                        }
                                      },
                                      "description": "Per-set prescription. Takes precedence over setsNumber/repsNumber when present."
                                    },
                                    "superSet": {
                                      "type": "boolean",
                                      "description": "True when this exercise belongs to a superset."
                                    },
                                    "superSetGroup": {
                                      "type": "string",
                                      "description": "Shared identifier grouping the exercises performed together in one superset."
                                    },
                                    "dropSet": {
                                      "type": "string",
                                      "enum": [
                                        "DropSet",
                                        "DoubleDropSet",
                                        "TripleDropSet"
                                      ]
                                    },
                                    "restPause": {
                                      "type": "boolean",
                                      "description": "Rest-pause technique."
                                    },
                                    "cluster": {
                                      "type": "boolean",
                                      "description": "Cluster-set technique."
                                    },
                                    "trackingType": {
                                      "type": "string",
                                      "enum": [
                                        "weight_reps",
                                        "reps_only",
                                        "duration",
                                        "completion"
                                      ],
                                      "description": "What the trainee logs for this exercise."
                                    },
                                    "intensityType": {
                                      "type": "string",
                                      "enum": [
                                        "Percentage",
                                        "RPE",
                                        "RIR"
                                      ],
                                      "description": "How intensityValue is interpreted."
                                    },
                                    "intensityValue": {
                                      "type": "number",
                                      "description": "Intensity target."
                                    },
                                    "tempo": {
                                      "type": "object",
                                      "additionalProperties": false,
                                      "description": "Tempo in seconds per phase of the lift.",
                                      "properties": {
                                        "eccentric": {
                                          "type": "number"
                                        },
                                        "hold": {
                                          "type": "number"
                                        },
                                        "concentric": {
                                          "type": "number"
                                        },
                                        "rest": {
                                          "type": "number"
                                        }
                                      }
                                    },
                                    "distance": {
                                      "type": "number",
                                      "description": "Distance for cardio exercises."
                                    },
                                    "distanceUnit": {
                                      "type": "string",
                                      "enum": [
                                        "meters",
                                        "km",
                                        "miles",
                                        "yards"
                                      ]
                                    },
                                    "specificAlternativeExercises": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Catalog ids the trainee may swap in for this exercise."
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/workout-logs": {
      "get": {
        "tags": [
          "Workout Logs"
        ],
        "description": "List workout logs for a single trainee. traineeId is required.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "from",
            "required": false,
            "description": "ISO date — earliest workoutDate"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "to",
            "required": false,
            "description": "ISO date — latest workoutDate"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "workout": {
                            "type": "string",
                            "description": "Id of the workout day this log belongs to."
                          },
                          "workoutName": {
                            "type": "string"
                          },
                          "completedAt": {
                            "type": "string",
                            "description": "When the workout was completed."
                          },
                          "totalVolume": {
                            "type": "number"
                          },
                          "totalSets": {
                            "type": "number"
                          },
                          "duration": {
                            "type": "number"
                          },
                          "exerciseCount": {
                            "type": "number"
                          },
                          "personalRecords": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": true
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/weekly-activity": {
      "get": {
        "tags": [
          "Trainees"
        ],
        "description": "Day-by-day activity for the week containing the given date (workouts, cardio, nutrition logging, water, measurements, form submissions). The full cross-domain \"what the trainee did\" view.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Any date in the target week, YYYY-MM-DD. Defaults to current week."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/measurements": {
      "get": {
        "tags": [
          "Trainees"
        ],
        "description": "A trainee's body measurements: weight history, body-fat history, circumference history, and custom measurement types. Every series is returned in full unless you narrow it with from/to or latest, which apply to all series at once. Not paginated: the response is many parallel dated series rather than one list, so a page number has no coherent meaning across them.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "from",
            "required": false,
            "description": "Only entries measured on or after this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "to",
            "required": false,
            "description": "Only entries measured on or before this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "latest",
            "required": false,
            "description": "Keep only the most recent N entries of each series, applied after from/to. Use it to ask for a recent trend without pulling years of history."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/body-metrics": {
      "post": {
        "tags": [
          "Trainees"
        ],
        "description": "Record a weigh-in for a trainee: weight, body fat, and/or body measurements. This is the only way to write weight through the API, because weight is kept as a dated history rather than a single field: the previous value is moved into the history and the new one becomes current. PATCH /trainees/{traineeId} therefore does NOT accept weight.\n\nEvery field is optional, but send at least one. Send only what was actually measured; omitted fields are left untouched, and each measurement field keeps its own dated history. Measurements are in cm, weight in kg, bodyFat in percent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "weight": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Body weight in kg. Becomes the current weight; the previous one is pushed onto the weight history."
                  },
                  "bodyFat": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Body fat percentage. Kept as a dated history, exactly like weight."
                  },
                  "date": {
                    "type": "string",
                    "description": "ISO date this measurement was taken. Defaults to now. Use it to backfill an earlier weigh-in."
                  },
                  "chest": {
                    "type": "number",
                    "minimum": 0,
                    "description": "chest in cm."
                  },
                  "waist": {
                    "type": "number",
                    "minimum": 0,
                    "description": "waist in cm."
                  },
                  "rightArm": {
                    "type": "number",
                    "minimum": 0,
                    "description": "rightArm in cm."
                  },
                  "leftArm": {
                    "type": "number",
                    "minimum": 0,
                    "description": "leftArm in cm."
                  },
                  "rightThigh": {
                    "type": "number",
                    "minimum": 0,
                    "description": "rightThigh in cm."
                  },
                  "leftThigh": {
                    "type": "number",
                    "minimum": 0,
                    "description": "leftThigh in cm."
                  },
                  "rightCalf": {
                    "type": "number",
                    "minimum": 0,
                    "description": "rightCalf in cm."
                  },
                  "leftCalf": {
                    "type": "number",
                    "minimum": 0,
                    "description": "leftCalf in cm."
                  },
                  "neck": {
                    "type": "number",
                    "minimum": 0,
                    "description": "neck in cm."
                  },
                  "butt": {
                    "type": "number",
                    "minimum": 0,
                    "description": "butt in cm."
                  },
                  "navel": {
                    "type": "number",
                    "minimum": 0,
                    "description": "navel in cm."
                  },
                  "lowerAbdomen": {
                    "type": "number",
                    "minimum": 0,
                    "description": "lowerAbdomen in cm."
                  },
                  "upperAbdomen": {
                    "type": "number",
                    "minimum": 0,
                    "description": "upperAbdomen in cm."
                  },
                  "upperHip": {
                    "type": "number",
                    "minimum": 0,
                    "description": "upperHip in cm."
                  },
                  "lowerHip": {
                    "type": "number",
                    "minimum": 0,
                    "description": "lowerHip in cm."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "traineeId": {
                          "type": "string"
                        },
                        "date": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "weight": {
                          "type": "number",
                          "nullable": true
                        },
                        "bodyFat": {
                          "type": "number",
                          "nullable": true
                        },
                        "measurements": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The measurement fields recorded by this request, in cm."
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/nutrition-log": {
      "get": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "What a trainee actually ate on ONE day: the food log for that date, per-meal and per-day calorie/macro totals, and the times of day the food was logged. Returns a single day, never a range, so call it once per date to build a range. Distinct from the assigned nutrition menu/plan, which is the target rather than what was eaten.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "date",
            "required": false,
            "description": "The day to fetch, YYYY-MM-DD. Defaults to today (Israel time)."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/exercise-notes": {
      "get": {
        "tags": [
          "Workout Logs"
        ],
        "description": "Per-exercise notes and video replies from a trainee's workout logs.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/photos": {
      "get": {
        "tags": [
          "Trainees"
        ],
        "description": "A trainee's progress photos as temporary viewable image URLs (valid a few minutes). Optionally filter by month with date=YYYY-MM.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Filter to a month, YYYY-MM."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/exercises": {
      "get": {
        "tags": [
          "Exercises"
        ],
        "description": "Search the exercises catalog (name, muscle group).",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "muscleGroup",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "muscleGroup": {
                            "type": "string"
                          },
                          "equipment": {
                            "type": "string"
                          },
                          "instructions": {
                            "type": "string"
                          },
                          "videoUrl": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/nutrition-menus": {
      "get": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "List nutrition menus. Filter by traineeId.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "coach": {
                            "type": "string"
                          },
                          "escorts": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "goal": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "totalCalories": {
                            "type": "number"
                          },
                          "totalProtein": {
                            "type": "number"
                          },
                          "totalCarbs": {
                            "type": "number"
                          },
                          "totalFat": {
                            "type": "number"
                          },
                          "meals": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "description": "A meal in the menu with its food items and totals.",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                                },
                                "title": {
                                  "type": "string",
                                  "description": "Meal name, e.g. \"Breakfast\"."
                                },
                                "foodItems": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "description": "Food name, e.g. \"Chicken breast\"."
                                      },
                                      "quantity": {
                                        "type": "number",
                                        "description": "Amount in the given unit, e.g. 150."
                                      },
                                      "unit": {
                                        "type": "string",
                                        "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                      },
                                      "unitWeight": {
                                        "type": "number",
                                        "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                      },
                                      "productCode": {
                                        "type": "number",
                                        "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                      },
                                      "caloriesPer100g": {
                                        "type": "number"
                                      },
                                      "proteinPer100g": {
                                        "type": "number"
                                      },
                                      "carbsPer100g": {
                                        "type": "number"
                                      },
                                      "fatPer100g": {
                                        "type": "number"
                                      }
                                    }
                                  }
                                },
                                "calories": {
                                  "type": "number",
                                  "description": "Total calories for the meal."
                                },
                                "protein": {
                                  "type": "number"
                                },
                                "carbs": {
                                  "type": "number"
                                },
                                "fat": {
                                  "type": "number"
                                },
                                "notes": {
                                  "type": "string"
                                },
                                "alternatives": {
                                  "type": "array",
                                  "maxItems": 20,
                                  "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                                      },
                                      "title": {
                                        "type": "string",
                                        "description": "Alternative name, e.g. \"Omelette instead\"."
                                      },
                                      "foodItems": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                          "properties": {
                                            "name": {
                                              "type": "string",
                                              "description": "Food name, e.g. \"Chicken breast\"."
                                            },
                                            "quantity": {
                                              "type": "number",
                                              "description": "Amount in the given unit, e.g. 150."
                                            },
                                            "unit": {
                                              "type": "string",
                                              "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                            },
                                            "unitWeight": {
                                              "type": "number",
                                              "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                            },
                                            "productCode": {
                                              "type": "number",
                                              "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                            },
                                            "caloriesPer100g": {
                                              "type": "number"
                                            },
                                            "proteinPer100g": {
                                              "type": "number"
                                            },
                                            "carbsPer100g": {
                                              "type": "number"
                                            },
                                            "fatPer100g": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      },
                                      "calories": {
                                        "type": "number",
                                        "description": "Total calories for the alternative."
                                      },
                                      "protein": {
                                        "type": "number"
                                      },
                                      "carbs": {
                                        "type": "number"
                                      },
                                      "fat": {
                                        "type": "number"
                                      },
                                      "notes": {
                                        "type": "string"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Create a nutrition menu. Provide traineeId (or escortId) to attach it to a coaching period, or omit both to leave it unassigned. Set isTemplate to save it as a reusable template. The daily macro totals (totalCalories/totalProtein/totalCarbs/totalFat) are required. Optionally add a meals breakdown: each meal has a title and a foodItems array, and each food carries per-100g macros so the app can scale by quantity.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "totalCalories",
                  "totalProtein",
                  "totalCarbs",
                  "totalFat"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Owning trainee id. Omit both traineeId and escortId to leave the menu unassigned."
                  },
                  "isTemplate": {
                    "type": "boolean",
                    "description": "Save as a reusable template. A template cannot be assigned, so omit traineeId and escortId."
                  },
                  "escortId": {
                    "type": "string",
                    "description": "Optional coaching period id"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "goal": {
                    "type": "string",
                    "enum": [
                      "Weight Loss",
                      "Muscle Gain",
                      "Weight Maintenance",
                      "Other"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Vegetarian",
                      "Vegan",
                      "Keto",
                      "Paleo",
                      "Low Carbs",
                      "Gluten Free",
                      "Mediterranean"
                    ]
                  },
                  "totalCalories": {
                    "type": "number",
                    "description": "Calories/day. Required."
                  },
                  "totalProtein": {
                    "type": "number",
                    "description": "Grams of protein/day. Required."
                  },
                  "totalCarbs": {
                    "type": "number",
                    "description": "Grams of carbs/day. Required."
                  },
                  "totalFat": {
                    "type": "number",
                    "description": "Grams of fat/day. Required."
                  },
                  "meals": {
                    "type": "array",
                    "maxItems": 100,
                    "description": "Daily meals (breakfast/lunch/dinner/snacks).",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "A meal in the menu with its food items and totals.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                        },
                        "title": {
                          "type": "string",
                          "description": "Meal name, e.g. \"Breakfast\"."
                        },
                        "foodItems": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Food name, e.g. \"Chicken breast\"."
                              },
                              "quantity": {
                                "type": "number",
                                "description": "Amount in the given unit, e.g. 150."
                              },
                              "unit": {
                                "type": "string",
                                "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                              },
                              "unitWeight": {
                                "type": "number",
                                "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                              },
                              "productCode": {
                                "type": "number",
                                "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                              },
                              "caloriesPer100g": {
                                "type": "number"
                              },
                              "proteinPer100g": {
                                "type": "number"
                              },
                              "carbsPer100g": {
                                "type": "number"
                              },
                              "fatPer100g": {
                                "type": "number"
                              }
                            }
                          }
                        },
                        "calories": {
                          "type": "number",
                          "description": "Total calories for the meal."
                        },
                        "protein": {
                          "type": "number"
                        },
                        "carbs": {
                          "type": "number"
                        },
                        "fat": {
                          "type": "number"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "alternatives": {
                          "type": "array",
                          "maxItems": 20,
                          "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                              },
                              "title": {
                                "type": "string",
                                "description": "Alternative name, e.g. \"Omelette instead\"."
                              },
                              "foodItems": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Food name, e.g. \"Chicken breast\"."
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "description": "Amount in the given unit, e.g. 150."
                                    },
                                    "unit": {
                                      "type": "string",
                                      "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                    },
                                    "unitWeight": {
                                      "type": "number",
                                      "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                    },
                                    "productCode": {
                                      "type": "number",
                                      "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                    },
                                    "caloriesPer100g": {
                                      "type": "number"
                                    },
                                    "proteinPer100g": {
                                      "type": "number"
                                    },
                                    "carbsPer100g": {
                                      "type": "number"
                                    },
                                    "fatPer100g": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              "calories": {
                                "type": "number",
                                "description": "Total calories for the alternative."
                              },
                              "protein": {
                                "type": "number"
                              },
                              "carbs": {
                                "type": "number"
                              },
                              "fat": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "totalCalories": {
                          "type": "number"
                        },
                        "totalProtein": {
                          "type": "number"
                        },
                        "totalCarbs": {
                          "type": "number"
                        },
                        "totalFat": {
                          "type": "number"
                        },
                        "meals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A meal in the menu with its food items and totals.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                              },
                              "title": {
                                "type": "string",
                                "description": "Meal name, e.g. \"Breakfast\"."
                              },
                              "foodItems": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Food name, e.g. \"Chicken breast\"."
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "description": "Amount in the given unit, e.g. 150."
                                    },
                                    "unit": {
                                      "type": "string",
                                      "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                    },
                                    "unitWeight": {
                                      "type": "number",
                                      "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                    },
                                    "productCode": {
                                      "type": "number",
                                      "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                    },
                                    "caloriesPer100g": {
                                      "type": "number"
                                    },
                                    "proteinPer100g": {
                                      "type": "number"
                                    },
                                    "carbsPer100g": {
                                      "type": "number"
                                    },
                                    "fatPer100g": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              "calories": {
                                "type": "number",
                                "description": "Total calories for the meal."
                              },
                              "protein": {
                                "type": "number"
                              },
                              "carbs": {
                                "type": "number"
                              },
                              "fat": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "alternatives": {
                                "type": "array",
                                "maxItems": 20,
                                "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Alternative name, e.g. \"Omelette instead\"."
                                    },
                                    "foodItems": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "description": "Food name, e.g. \"Chicken breast\"."
                                          },
                                          "quantity": {
                                            "type": "number",
                                            "description": "Amount in the given unit, e.g. 150."
                                          },
                                          "unit": {
                                            "type": "string",
                                            "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                          },
                                          "unitWeight": {
                                            "type": "number",
                                            "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                          },
                                          "productCode": {
                                            "type": "number",
                                            "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                          },
                                          "caloriesPer100g": {
                                            "type": "number"
                                          },
                                          "proteinPer100g": {
                                            "type": "number"
                                          },
                                          "carbsPer100g": {
                                            "type": "number"
                                          },
                                          "fatPer100g": {
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "calories": {
                                      "type": "number",
                                      "description": "Total calories for the alternative."
                                    },
                                    "protein": {
                                      "type": "number"
                                    },
                                    "carbs": {
                                      "type": "number"
                                    },
                                    "fat": {
                                      "type": "number"
                                    },
                                    "notes": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/nutrition-menus/{menuId}": {
      "get": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Get a nutrition menu by id (with full meals breakdown).",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "menuId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "totalCalories": {
                          "type": "number"
                        },
                        "totalProtein": {
                          "type": "number"
                        },
                        "totalCarbs": {
                          "type": "number"
                        },
                        "totalFat": {
                          "type": "number"
                        },
                        "meals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A meal in the menu with its food items and totals.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                              },
                              "title": {
                                "type": "string",
                                "description": "Meal name, e.g. \"Breakfast\"."
                              },
                              "foodItems": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Food name, e.g. \"Chicken breast\"."
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "description": "Amount in the given unit, e.g. 150."
                                    },
                                    "unit": {
                                      "type": "string",
                                      "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                    },
                                    "unitWeight": {
                                      "type": "number",
                                      "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                    },
                                    "productCode": {
                                      "type": "number",
                                      "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                    },
                                    "caloriesPer100g": {
                                      "type": "number"
                                    },
                                    "proteinPer100g": {
                                      "type": "number"
                                    },
                                    "carbsPer100g": {
                                      "type": "number"
                                    },
                                    "fatPer100g": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              "calories": {
                                "type": "number",
                                "description": "Total calories for the meal."
                              },
                              "protein": {
                                "type": "number"
                              },
                              "carbs": {
                                "type": "number"
                              },
                              "fat": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "alternatives": {
                                "type": "array",
                                "maxItems": 20,
                                "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Alternative name, e.g. \"Omelette instead\"."
                                    },
                                    "foodItems": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "description": "Food name, e.g. \"Chicken breast\"."
                                          },
                                          "quantity": {
                                            "type": "number",
                                            "description": "Amount in the given unit, e.g. 150."
                                          },
                                          "unit": {
                                            "type": "string",
                                            "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                          },
                                          "unitWeight": {
                                            "type": "number",
                                            "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                          },
                                          "productCode": {
                                            "type": "number",
                                            "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                          },
                                          "caloriesPer100g": {
                                            "type": "number"
                                          },
                                          "proteinPer100g": {
                                            "type": "number"
                                          },
                                          "carbsPer100g": {
                                            "type": "number"
                                          },
                                          "fatPer100g": {
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "calories": {
                                      "type": "number",
                                      "description": "Total calories for the alternative."
                                    },
                                    "protein": {
                                      "type": "number"
                                    },
                                    "carbs": {
                                      "type": "number"
                                    },
                                    "fat": {
                                      "type": "number"
                                    },
                                    "notes": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Partially update a nutrition menu. Does not cascade: copies duplicated from this menu are left untouched, unlike the dashboard which offers to push the edit down to them.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "goal": {
                    "type": "string",
                    "enum": [
                      "Weight Loss",
                      "Muscle Gain",
                      "Weight Maintenance",
                      "Other"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Vegetarian",
                      "Vegan",
                      "Keto",
                      "Paleo",
                      "Low Carbs",
                      "Gluten Free",
                      "Mediterranean"
                    ]
                  },
                  "totalCalories": {
                    "type": "number"
                  },
                  "totalProtein": {
                    "type": "number"
                  },
                  "totalCarbs": {
                    "type": "number"
                  },
                  "totalFat": {
                    "type": "number"
                  },
                  "meals": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "A meal in the menu with its food items and totals.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                        },
                        "title": {
                          "type": "string",
                          "description": "Meal name, e.g. \"Breakfast\"."
                        },
                        "foodItems": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Food name, e.g. \"Chicken breast\"."
                              },
                              "quantity": {
                                "type": "number",
                                "description": "Amount in the given unit, e.g. 150."
                              },
                              "unit": {
                                "type": "string",
                                "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                              },
                              "unitWeight": {
                                "type": "number",
                                "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                              },
                              "productCode": {
                                "type": "number",
                                "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                              },
                              "caloriesPer100g": {
                                "type": "number"
                              },
                              "proteinPer100g": {
                                "type": "number"
                              },
                              "carbsPer100g": {
                                "type": "number"
                              },
                              "fatPer100g": {
                                "type": "number"
                              }
                            }
                          }
                        },
                        "calories": {
                          "type": "number",
                          "description": "Total calories for the meal."
                        },
                        "protein": {
                          "type": "number"
                        },
                        "carbs": {
                          "type": "number"
                        },
                        "fat": {
                          "type": "number"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "alternatives": {
                          "type": "array",
                          "maxItems": 20,
                          "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                              },
                              "title": {
                                "type": "string",
                                "description": "Alternative name, e.g. \"Omelette instead\"."
                              },
                              "foodItems": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Food name, e.g. \"Chicken breast\"."
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "description": "Amount in the given unit, e.g. 150."
                                    },
                                    "unit": {
                                      "type": "string",
                                      "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                    },
                                    "unitWeight": {
                                      "type": "number",
                                      "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                    },
                                    "productCode": {
                                      "type": "number",
                                      "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                    },
                                    "caloriesPer100g": {
                                      "type": "number"
                                    },
                                    "proteinPer100g": {
                                      "type": "number"
                                    },
                                    "carbsPer100g": {
                                      "type": "number"
                                    },
                                    "fatPer100g": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              "calories": {
                                "type": "number",
                                "description": "Total calories for the alternative."
                              },
                              "protein": {
                                "type": "number"
                              },
                              "carbs": {
                                "type": "number"
                              },
                              "fat": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "applyToAllSharedTrainees": {
                    "type": "boolean",
                    "description": "Required (true) to edit a menu shared by multiple trainees; the change then applies to all of them. Without it, a shared menu returns 409."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "menuId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "totalCalories": {
                          "type": "number"
                        },
                        "totalProtein": {
                          "type": "number"
                        },
                        "totalCarbs": {
                          "type": "number"
                        },
                        "totalFat": {
                          "type": "number"
                        },
                        "meals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A meal in the menu with its food items and totals.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                              },
                              "title": {
                                "type": "string",
                                "description": "Meal name, e.g. \"Breakfast\"."
                              },
                              "foodItems": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Food name, e.g. \"Chicken breast\"."
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "description": "Amount in the given unit, e.g. 150."
                                    },
                                    "unit": {
                                      "type": "string",
                                      "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                    },
                                    "unitWeight": {
                                      "type": "number",
                                      "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                    },
                                    "productCode": {
                                      "type": "number",
                                      "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                    },
                                    "caloriesPer100g": {
                                      "type": "number"
                                    },
                                    "proteinPer100g": {
                                      "type": "number"
                                    },
                                    "carbsPer100g": {
                                      "type": "number"
                                    },
                                    "fatPer100g": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              "calories": {
                                "type": "number",
                                "description": "Total calories for the meal."
                              },
                              "protein": {
                                "type": "number"
                              },
                              "carbs": {
                                "type": "number"
                              },
                              "fat": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "alternatives": {
                                "type": "array",
                                "maxItems": 20,
                                "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Alternative name, e.g. \"Omelette instead\"."
                                    },
                                    "foodItems": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "description": "Food name, e.g. \"Chicken breast\"."
                                          },
                                          "quantity": {
                                            "type": "number",
                                            "description": "Amount in the given unit, e.g. 150."
                                          },
                                          "unit": {
                                            "type": "string",
                                            "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                          },
                                          "unitWeight": {
                                            "type": "number",
                                            "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                          },
                                          "productCode": {
                                            "type": "number",
                                            "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                          },
                                          "caloriesPer100g": {
                                            "type": "number"
                                          },
                                          "proteinPer100g": {
                                            "type": "number"
                                          },
                                          "carbsPer100g": {
                                            "type": "number"
                                          },
                                          "fatPer100g": {
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "calories": {
                                      "type": "number",
                                      "description": "Total calories for the alternative."
                                    },
                                    "protein": {
                                      "type": "number"
                                    },
                                    "carbs": {
                                      "type": "number"
                                    },
                                    "fat": {
                                      "type": "number"
                                    },
                                    "notes": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Delete a nutrition menu permanently.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "menuId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/active-nutrition-menu": {
      "get": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Get a trainee's currently active nutrition menu (resolved via the active coaching period). 404 if the trainee has no active menu.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "escorts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "goal": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "totalCalories": {
                          "type": "number"
                        },
                        "totalProtein": {
                          "type": "number"
                        },
                        "totalCarbs": {
                          "type": "number"
                        },
                        "totalFat": {
                          "type": "number"
                        },
                        "meals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A meal in the menu with its food items and totals.",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Meal id. Not stable: saving the menu from the dashboard rewrites every meal with a new id, so re-read this endpoint before each write instead of caching it. Ignored on create; resend it on PATCH to keep the meal and its alternatives instead of replacing it with a new one."
                              },
                              "title": {
                                "type": "string",
                                "description": "Meal name, e.g. \"Breakfast\"."
                              },
                              "foodItems": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Food name, e.g. \"Chicken breast\"."
                                    },
                                    "quantity": {
                                      "type": "number",
                                      "description": "Amount in the given unit, e.g. 150."
                                    },
                                    "unit": {
                                      "type": "string",
                                      "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                    },
                                    "unitWeight": {
                                      "type": "number",
                                      "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                    },
                                    "productCode": {
                                      "type": "number",
                                      "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                    },
                                    "caloriesPer100g": {
                                      "type": "number"
                                    },
                                    "proteinPer100g": {
                                      "type": "number"
                                    },
                                    "carbsPer100g": {
                                      "type": "number"
                                    },
                                    "fatPer100g": {
                                      "type": "number"
                                    }
                                  }
                                }
                              },
                              "calories": {
                                "type": "number",
                                "description": "Total calories for the meal."
                              },
                              "protein": {
                                "type": "number"
                              },
                              "carbs": {
                                "type": "number"
                              },
                              "fat": {
                                "type": "number"
                              },
                              "notes": {
                                "type": "string"
                              },
                              "alternatives": {
                                "type": "array",
                                "maxItems": 20,
                                "description": "Alternatives the trainee may eat instead of this meal. Manage them one at a time with POST/DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives, or send the whole array here.",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Alternative name, e.g. \"Omelette instead\"."
                                    },
                                    "foodItems": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "additionalProperties": false,
                                        "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                                        "properties": {
                                          "name": {
                                            "type": "string",
                                            "description": "Food name, e.g. \"Chicken breast\"."
                                          },
                                          "quantity": {
                                            "type": "number",
                                            "description": "Amount in the given unit, e.g. 150."
                                          },
                                          "unit": {
                                            "type": "string",
                                            "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                                          },
                                          "unitWeight": {
                                            "type": "number",
                                            "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                                          },
                                          "productCode": {
                                            "type": "number",
                                            "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                                          },
                                          "caloriesPer100g": {
                                            "type": "number"
                                          },
                                          "proteinPer100g": {
                                            "type": "number"
                                          },
                                          "carbsPer100g": {
                                            "type": "number"
                                          },
                                          "fatPer100g": {
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "calories": {
                                      "type": "number",
                                      "description": "Total calories for the alternative."
                                    },
                                    "protein": {
                                      "type": "number"
                                    },
                                    "carbs": {
                                      "type": "number"
                                    },
                                    "fat": {
                                      "type": "number"
                                    },
                                    "notes": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives": {
      "post": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Add an alternative meal to one meal of a menu — the same \"add alternative meal\" the dashboard offers. Take mealId from the meals array of GET /nutrition-menus/{menuId}. The alternative carries its own foods and macros and does not change the menu totals. Returns the alternative including its id. Does not cascade: copies duplicated from this menu keep their own alternatives — repeat the call against the menuId of each copy to update them.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title",
                  "calories",
                  "protein",
                  "carbs",
                  "fat"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Alternative name, e.g. \"Omelette instead\"."
                  },
                  "foodItems": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                      "properties": {
                        "name": {
                          "type": "string",
                          "description": "Food name, e.g. \"Chicken breast\"."
                        },
                        "quantity": {
                          "type": "number",
                          "description": "Amount in the given unit, e.g. 150."
                        },
                        "unit": {
                          "type": "string",
                          "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                        },
                        "unitWeight": {
                          "type": "number",
                          "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                        },
                        "productCode": {
                          "type": "number",
                          "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                        },
                        "caloriesPer100g": {
                          "type": "number"
                        },
                        "proteinPer100g": {
                          "type": "number"
                        },
                        "carbsPer100g": {
                          "type": "number"
                        },
                        "fatPer100g": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  "calories": {
                    "type": "number",
                    "description": "Total calories for the alternative. Required."
                  },
                  "protein": {
                    "type": "number",
                    "description": "Grams of protein. Required."
                  },
                  "carbs": {
                    "type": "number",
                    "description": "Grams of carbs. Required."
                  },
                  "fat": {
                    "type": "number",
                    "description": "Grams of fat. Required."
                  },
                  "notes": {
                    "type": "string"
                  },
                  "applyToAllSharedTrainees": {
                    "type": "boolean",
                    "description": "Required (true) to edit a menu shared by multiple trainees; the alternative is then added for all of them. Without it, a shared menu returns 409."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "menuId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "mealId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": false,
                      "description": "An alternative the trainee may eat instead of the meal it belongs to. Its macros do not count towards the menu totals.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Alternative id. Read-only; pass it to DELETE /nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}. Not stable: saving the menu from the dashboard gives every alternative a new id, so read it fresh rather than caching it."
                        },
                        "title": {
                          "type": "string",
                          "description": "Alternative name, e.g. \"Omelette instead\"."
                        },
                        "foodItems": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "A single food in a meal. Per-100g macros let the app scale by quantity.",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Food name, e.g. \"Chicken breast\"."
                              },
                              "quantity": {
                                "type": "number",
                                "description": "Amount in the given unit, e.g. 150."
                              },
                              "unit": {
                                "type": "string",
                                "description": "Unit of the quantity, e.g. \"g\", \"ml\", \"unit\"."
                              },
                              "unitWeight": {
                                "type": "number",
                                "description": "Grams in one unit. The app scales macros as quantity * unitWeight / 100 * the per-100g values, so send it whenever unit is not grams. Take it from the matching entry in the units array of GET /food-items. Defaults to 100."
                              },
                              "productCode": {
                                "type": "number",
                                "description": "Food database code, from GET /food-items. Send it to link the food to its catalog entry so replacements and portion data behave like they do in the dashboard."
                              },
                              "caloriesPer100g": {
                                "type": "number"
                              },
                              "proteinPer100g": {
                                "type": "number"
                              },
                              "carbsPer100g": {
                                "type": "number"
                              },
                              "fatPer100g": {
                                "type": "number"
                              }
                            }
                          }
                        },
                        "calories": {
                          "type": "number",
                          "description": "Total calories for the alternative."
                        },
                        "protein": {
                          "type": "number"
                        },
                        "carbs": {
                          "type": "number"
                        },
                        "fat": {
                          "type": "number"
                        },
                        "notes": {
                          "type": "string"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/nutrition-menus/{menuId}/meals/{mealId}/alternatives/{alternativeId}": {
      "delete": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Remove one alternative meal from a meal. Take mealId and alternativeId from GET /nutrition-menus/{menuId}. Does not cascade: copies duplicated from this menu keep their own alternatives.",
        "parameters": [
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "applyToAllSharedTrainees",
            "required": false,
            "description": "Required (true) to edit a menu shared by multiple trainees; the alternative is then removed for all of them. Without it, a shared menu returns 409."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "menuId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "mealId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "alternativeId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/food-items": {
      "get": {
        "tags": [
          "Nutrition Menus"
        ],
        "description": "Search the food database the dashboard searches: the shared catalog plus the coach's own items. Use it to build meals with real nutrition data — copy productCode, the per-100g macros and a unit/unitWeight pair onto each meal food item. Omit search and barcode to browse the catalog.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Food name to search for. Matches anywhere in the name, best matches first."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "barcode",
            "required": false,
            "description": "Exact barcode lookup. Takes precedence over search."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "description": "An entry in the food database the dashboard search reads from: the shared catalog plus the coach's own items. Macros are per 100g, matching the per-100g fields of a meal food item.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "productCode": {
                            "type": "number",
                            "description": "Send this as productCode on a meal food item to link it to this entry."
                          },
                          "name": {
                            "type": "string"
                          },
                          "manufacturer": {
                            "type": "string"
                          },
                          "barcode": {
                            "type": "string"
                          },
                          "caloriesPer100g": {
                            "type": "number"
                          },
                          "proteinPer100g": {
                            "type": "number"
                          },
                          "carbsPer100g": {
                            "type": "number"
                          },
                          "fatPer100g": {
                            "type": "number"
                          },
                          "isFavorite": {
                            "type": "boolean"
                          },
                          "isCustom": {
                            "type": "boolean",
                            "description": "True when the coach created this item, false when it comes from the shared database."
                          },
                          "units": {
                            "type": "array",
                            "description": "Units this food can be measured in. unitWeight is how many grams one unit weighs — copy the pair onto a meal food item as unit + unitWeight.",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "unit": {
                                  "type": "string"
                                },
                                "unitWeight": {
                                  "type": "number"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/meetings": {
      "get": {
        "tags": [
          "Meetings"
        ],
        "description": "List meetings in a time window. Filter by traineeId.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "from",
            "required": false,
            "description": "ISO date — earliest startDate"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "to",
            "required": false,
            "description": "ISO date — latest startDate"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "coach": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "startDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "endDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "duration": {
                            "type": "number"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "Online",
                              "In person"
                            ]
                          },
                          "meetingType": {
                            "type": "string",
                            "enum": [
                              "Individual",
                              "Group"
                            ]
                          },
                          "onlineLink": {
                            "type": "string"
                          },
                          "address": {
                            "type": "string"
                          },
                          "notes": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "capacity": {
                            "type": "number"
                          },
                          "trainees": {
                            "type": "array",
                            "description": "Meeting attendees. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "name": {
                                  "type": "string"
                                },
                                "email": {
                                  "type": "string"
                                },
                                "phoneNumber": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Meetings"
        ],
        "description": "Schedule a meeting. \"type\" is the location (Online or In person). \"meetingType\" is the format (Individual or Group).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title",
                  "startDate",
                  "endDate",
                  "type"
                ],
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "startDate": {
                    "type": "string",
                    "description": "ISO date-time"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "ISO date-time"
                  },
                  "duration": {
                    "type": "number",
                    "description": "Minutes (optional)"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Online",
                      "In person"
                    ]
                  },
                  "meetingType": {
                    "type": "string",
                    "enum": [
                      "Individual",
                      "Group"
                    ]
                  },
                  "onlineLink": {
                    "type": "string",
                    "description": "Zoom/Meet URL"
                  },
                  "address": {
                    "type": "string",
                    "description": "Physical address"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "trainees": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "string"
                    },
                    "description": "Array of trainee ids"
                  },
                  "capacity": {
                    "type": "number",
                    "description": "For group meetings"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "duration": {
                          "type": "number"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "Online",
                            "In person"
                          ]
                        },
                        "meetingType": {
                          "type": "string",
                          "enum": [
                            "Individual",
                            "Group"
                          ]
                        },
                        "onlineLink": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "capacity": {
                          "type": "number"
                        },
                        "trainees": {
                          "type": "array",
                          "description": "Meeting attendees. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "phoneNumber": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/meetings/{meetingId}": {
      "get": {
        "tags": [
          "Meetings"
        ],
        "description": "Get a meeting by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "meetingId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "duration": {
                          "type": "number"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "Online",
                            "In person"
                          ]
                        },
                        "meetingType": {
                          "type": "string",
                          "enum": [
                            "Individual",
                            "Group"
                          ]
                        },
                        "onlineLink": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "capacity": {
                          "type": "number"
                        },
                        "trainees": {
                          "type": "array",
                          "description": "Meeting attendees. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "phoneNumber": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Meetings"
        ],
        "description": "Update a meeting (time, title, attendees, notes, status). Only provided fields change.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "startDate": {
                    "type": "string",
                    "description": "ISO date-time"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "ISO date-time"
                  },
                  "duration": {
                    "type": "number",
                    "description": "Minutes"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Online",
                      "In person"
                    ]
                  },
                  "meetingType": {
                    "type": "string",
                    "enum": [
                      "Individual",
                      "Group"
                    ]
                  },
                  "onlineLink": {
                    "type": "string"
                  },
                  "address": {
                    "type": "string"
                  },
                  "notes": {
                    "type": "string"
                  },
                  "trainees": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "string"
                    },
                    "description": "Replaces the attendee list"
                  },
                  "capacity": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "Active",
                      "Canceled",
                      "Completed"
                    ]
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "meetingId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "startDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "endDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "duration": {
                          "type": "number"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "Online",
                            "In person"
                          ]
                        },
                        "meetingType": {
                          "type": "string",
                          "enum": [
                            "Individual",
                            "Group"
                          ]
                        },
                        "onlineLink": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "capacity": {
                          "type": "number"
                        },
                        "trainees": {
                          "type": "array",
                          "description": "Meeting attendees. email and phoneNumber are returned only when the key also has the trainees:read scope.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              },
                              "phoneNumber": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Meetings"
        ],
        "description": "Delete a meeting permanently.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "meetingId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response"
          }
        }
      }
    },
    "/api/public/forms": {
      "get": {
        "tags": [
          "Forms"
        ],
        "description": "List forms (questionnaires) created by the coach. Returns each form's metadata only; the questions are NOT included here. To read the questions of a form, call GET /forms/{formId}. Use type=registration for the intake questionnaire trainees fill in when they join, and type=update for recurring check-in forms.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "registration",
                "update"
              ]
            },
            "in": "query",
            "name": "type",
            "required": false,
            "description": "Filter by form kind. \"registration\" is the join-time intake questionnaire; \"update\" is a recurring check-in form. Omit for both."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "Form metadata as returned by the list endpoint. The questions are not included here; fetch GET /forms/{formId} for those.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "coach": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "update"
                            ],
                            "description": "registration = the join-time intake questionnaire. update = a recurring check-in form."
                          },
                          "isActive": {
                            "type": "boolean"
                          },
                          "registrationOrder": {
                            "type": "integer",
                            "description": "Order this form is presented in during registration, when several registration forms exist."
                          },
                          "openAt": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "When and how often the form opens for trainees.",
                            "properties": {
                              "date": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "recurrence": {
                                "type": "string",
                                "enum": [
                                  "weekly",
                                  "bi-weekly",
                                  "tri-weekly",
                                  "monthly"
                                ],
                                "description": "How often the form reopens."
                              },
                              "openDays": {
                                "type": "integer",
                                "description": "How many days the form stays open once it opens."
                              }
                            }
                          },
                          "target": {
                            "type": "string",
                            "enum": [
                              "allTrainees",
                              "males",
                              "females",
                              "byLabels"
                            ],
                            "description": "Who the form is shown to. byLabels targets trainees carrying at least one of targetLabels."
                          },
                          "targetLabels": {
                            "type": "array",
                            "description": "Labels this form targets. Only present when target is byLabels.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string"
                                },
                                "text": {
                                  "type": "string"
                                },
                                "color": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/forms/registration": {
      "get": {
        "tags": [
          "Forms"
        ],
        "description": "List submitted registration (intake) form responses across every registration form, newest first. This is the questionnaire a trainee fills in when joining. Pass traineeId to read one trainee's intake answers. Each answer carries its question label and field type alongside the value. Trainee personal details and phone number are included only when the key also has trainees:read.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false,
            "description": "Only responses submitted by this trainee."
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "includeAnswers",
            "required": false,
            "description": "Embed each response's answers instead of returning metadata only, so one call gives both the questions and what the trainee replied. Every answer carries its question label, field type and value, and file, photo and signature answers also carry a temporary presignedUrl. Requires traineeId, which keeps the number of answers bounded."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "Pending",
                "Handled"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by handling status."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Search the trainee name or the form title."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females",
                "allTrainees"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter by trainee gender."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Comma-separated label ids the trainee must carry."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateFrom",
            "required": false,
            "description": "Only responses submitted on or after this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateTo",
            "required": false,
            "description": "Only responses submitted on or before this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "One submitted form response as it appears in a cross-form listing. The answers are NOT included here; fetch GET /forms/{formId}/response/{responseId} to read them.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "formId": {
                            "type": "string",
                            "description": "Id of the form that was submitted."
                          },
                          "formTitle": {
                            "type": "string"
                          },
                          "formType": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "update"
                            ]
                          },
                          "traineeInfo": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The trainee who submitted it.",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "gender": {
                                "type": "string"
                              }
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Pending",
                              "Handled"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/updates": {
      "get": {
        "tags": [
          "Forms"
        ],
        "description": "List submitted update (check-in) form responses across every update form, newest first. Pass traineeId to read one trainee's check-in history. Registration forms are not included here; use GET /forms/registration for those. Trainee personal details and phone number are included only when the key also has trainees:read.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false,
            "description": "Only responses submitted by this trainee."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "escortId",
            "required": false,
            "description": "Only responses from this coaching period."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "Pending",
                "Handled"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by handling status."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Search the trainee name or the form title."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females",
                "allTrainees"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter by trainee gender."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Comma-separated label ids the trainee must carry."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "formTargetLabels",
            "required": false,
            "description": "Comma-separated label ids the form targets."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "update",
                "dynamic"
              ]
            },
            "in": "query",
            "name": "type",
            "required": false,
            "description": "Restrict to a form kind."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "in": "query",
            "name": "sort",
            "required": false,
            "description": "Order by submission date. Defaults to desc."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateFrom",
            "required": false,
            "description": "Only responses submitted on or after this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateTo",
            "required": false,
            "description": "Only responses submitted on or before this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "One submitted form response as it appears in a cross-form listing. The answers are NOT included here; fetch GET /forms/{formId}/response/{responseId} to read them.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "formId": {
                            "type": "string",
                            "description": "Id of the form that was submitted."
                          },
                          "formTitle": {
                            "type": "string"
                          },
                          "formType": {
                            "type": "string",
                            "enum": [
                              "registration",
                              "update"
                            ]
                          },
                          "traineeInfo": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The trainee who submitted it.",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "gender": {
                                "type": "string"
                              }
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Pending",
                              "Handled"
                            ]
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/forms/{formId}": {
      "get": {
        "tags": [
          "Forms"
        ],
        "description": "Get one form including its full question set. Questions are grouped into steps: each entry of steps[] has a title and a fields[] array, and each field carries its label, fieldType, whether it is required, and its options where relevant. This is the endpoint that tells you what a trainee was actually asked; GET /forms only lists metadata.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "formId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "A single form including its questions. Questions live under steps[].fields[], not at the top level.",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coach": {
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "registration",
                            "update"
                          ],
                          "description": "registration = the join-time intake questionnaire. update = a recurring check-in form."
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "registrationOrder": {
                          "type": "integer",
                          "description": "Order this form is presented in during registration, when several registration forms exist."
                        },
                        "openAt": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "When and how often the form opens for trainees.",
                          "properties": {
                            "date": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "recurrence": {
                              "type": "string",
                              "enum": [
                                "weekly",
                                "bi-weekly",
                                "tri-weekly",
                                "monthly"
                              ],
                              "description": "How often the form reopens."
                            },
                            "openDays": {
                              "type": "integer",
                              "description": "How many days the form stays open once it opens."
                            }
                          }
                        },
                        "target": {
                          "type": "string",
                          "enum": [
                            "allTrainees",
                            "males",
                            "females",
                            "byLabels"
                          ],
                          "description": "Who the form is shown to. byLabels targets trainees carrying at least one of targetLabels."
                        },
                        "targetLabels": {
                          "type": "array",
                          "description": "Labels this form targets. Only present when target is byLabels.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "text": {
                                "type": "string"
                              },
                              "color": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "steps": {
                          "type": "array",
                          "description": "The form’s pages, in order. Each holds the questions asked on that page.",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "properties": {
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "additionalProperties": true,
                                  "description": "One question on the form.",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string",
                                      "description": "The question text shown to the trainee."
                                    },
                                    "fieldType": {
                                      "type": "string",
                                      "description": "How the question is answered, e.g. text, textarea, number, date, dropdown, checkbox, rating, slider, file, signature, weight, height, measurements, bodyFat, gender, dateOfBirth, activityLevel. contentBlock is not a question but static copy shown to the trainee."
                                    },
                                    "isRequired": {
                                      "type": "boolean"
                                    },
                                    "placeholder": {
                                      "type": "string"
                                    },
                                    "options": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      },
                                      "description": "Selectable values, for dropdown and similar field types."
                                    },
                                    "multiple": {
                                      "type": "boolean"
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/notifications": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "description": "Send an in-app notification to one trainee, immediately or on a schedule. Requires the notifications:send scope, which is separate from messaging:send (WhatsApp). Each trainee accepts at most 10 API-sent notifications per day; over that the endpoint returns 429. High-risk — anyone with the key can deliver push notifications to your trainees.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeId",
                  "title",
                  "message"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string",
                    "description": "Short notification title"
                  },
                  "message": {
                    "type": "string",
                    "description": "Body text"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "push",
                      "popup",
                      "both"
                    ],
                    "description": "Delivery style. \"push\" (default) is a standard push notification, \"popup\" shows an in-app popup card, \"both\" sends a push and shows the popup. Never sends WhatsApp."
                  },
                  "popupData": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Content of the in-app popup card. Only used when type is \"popup\" or \"both\".",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "videoLink": {
                        "type": "string"
                      },
                      "actionLink": {
                        "type": "string",
                        "description": "URL opened when the call-to-action button is pressed"
                      },
                      "buttonText": {
                        "type": "string",
                        "description": "Call-to-action button label"
                      },
                      "imageUrl": {
                        "type": "string"
                      },
                      "dismissible": {
                        "type": "boolean",
                        "description": "Whether the trainee can dismiss the popup. Defaults to true."
                      }
                    }
                  },
                  "scheduledAt": {
                    "type": "string",
                    "description": "Shorthand for a single future delivery: an ISO date-time. Use schedule instead for recurring sends. Cannot be combined with schedule."
                  },
                  "schedule": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "startDate",
                      "timeOfDay"
                    ],
                    "description": "Deliver later, optionally repeating. Omit both schedule and scheduledAt to send immediately. Cannot be combined with scheduledAt.",
                    "properties": {
                      "startDate": {
                        "type": "string",
                        "description": "First send date, ISO-8601. Either a date (\"2026-06-15\") or a full date-time."
                      },
                      "timeOfDay": {
                        "type": "string",
                        "pattern": "^([01]?[0-9]|2[0-3]):[0-5][0-9]$",
                        "description": "Local time of day in 24h \"HH:mm\" format, e.g. \"09:30\""
                      },
                      "frequency": {
                        "type": "string",
                        "enum": [
                          "once",
                          "daily",
                          "weekly",
                          "biweekly",
                          "triweekly",
                          "monthly"
                        ],
                        "description": "Defaults to \"once\" (a single future send). Any other value repeats until endDate."
                      },
                      "weeklyDays": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 6
                        },
                        "description": "0=Sunday..6=Saturday. Required for weekly, biweekly and triweekly."
                      },
                      "monthlyMode": {
                        "type": "string",
                        "enum": [
                          "byDate",
                          "byWeekday"
                        ],
                        "description": "For monthly: byDate uses monthlyDays, byWeekday uses monthlyWeekday plus monthlyWeekOfMonth. Defaults to byDate."
                      },
                      "monthlyDays": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 31
                        },
                        "description": "Days of the month for monthly byDate"
                      },
                      "monthlyWeekday": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 6,
                        "description": "0=Sunday..6=Saturday for monthly byWeekday"
                      },
                      "monthlyWeekOfMonth": {
                        "type": "number",
                        "enum": [
                          1,
                          2,
                          3,
                          4,
                          -1
                        ],
                        "description": "1-4, or -1 for the last week of the month"
                      },
                      "endDate": {
                        "type": "string",
                        "description": "Optional ISO date that stops a recurring schedule"
                      },
                      "timezone": {
                        "type": "string",
                        "description": "IANA timezone. Defaults to Asia/Jerusalem."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "nullable": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "push",
                            "popup",
                            "both"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "scheduled"
                          ]
                        },
                        "recipients": {
                          "type": "number",
                          "description": "How many trainees the notification was delivered to"
                        },
                        "scheduledFor": {
                          "type": "string",
                          "nullable": true,
                          "description": "ISO date-time of the first delivery when scheduled"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/notifications/bulk": {
      "post": {
        "tags": [
          "Notifications"
        ],
        "description": "Send the same in-app notification to up to 100 trainees, immediately or on a schedule. Requires the notifications:send scope, which is separate from messaging:send (WhatsApp). Trainees this key may not reach are returned in skipped, and trainees over the 10-per-day cap in rateLimited; both are excluded from the send, and a 429 is returned only when no recipient remains. High-risk — send an Idempotency-Key so a retry cannot double-notify.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeIds",
                  "title",
                  "message"
                ],
                "properties": {
                  "traineeIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Between 1 and 100 trainee ids"
                  },
                  "title": {
                    "type": "string",
                    "description": "Short notification title"
                  },
                  "message": {
                    "type": "string",
                    "description": "Body text"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "push",
                      "popup",
                      "both"
                    ],
                    "description": "Delivery style. \"push\" (default) is a standard push notification, \"popup\" shows an in-app popup card, \"both\" sends a push and shows the popup. Never sends WhatsApp."
                  },
                  "popupData": {
                    "type": "object",
                    "additionalProperties": false,
                    "description": "Content of the in-app popup card. Only used when type is \"popup\" or \"both\".",
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "videoLink": {
                        "type": "string"
                      },
                      "actionLink": {
                        "type": "string",
                        "description": "URL opened when the call-to-action button is pressed"
                      },
                      "buttonText": {
                        "type": "string",
                        "description": "Call-to-action button label"
                      },
                      "imageUrl": {
                        "type": "string"
                      },
                      "dismissible": {
                        "type": "boolean",
                        "description": "Whether the trainee can dismiss the popup. Defaults to true."
                      }
                    }
                  },
                  "scheduledAt": {
                    "type": "string",
                    "description": "Shorthand for a single future delivery: an ISO date-time. Use schedule instead for recurring sends. Cannot be combined with schedule."
                  },
                  "schedule": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "startDate",
                      "timeOfDay"
                    ],
                    "description": "Deliver later, optionally repeating. Omit both schedule and scheduledAt to send immediately. Cannot be combined with scheduledAt.",
                    "properties": {
                      "startDate": {
                        "type": "string",
                        "description": "First send date, ISO-8601. Either a date (\"2026-06-15\") or a full date-time."
                      },
                      "timeOfDay": {
                        "type": "string",
                        "pattern": "^([01]?[0-9]|2[0-3]):[0-5][0-9]$",
                        "description": "Local time of day in 24h \"HH:mm\" format, e.g. \"09:30\""
                      },
                      "frequency": {
                        "type": "string",
                        "enum": [
                          "once",
                          "daily",
                          "weekly",
                          "biweekly",
                          "triweekly",
                          "monthly"
                        ],
                        "description": "Defaults to \"once\" (a single future send). Any other value repeats until endDate."
                      },
                      "weeklyDays": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 6
                        },
                        "description": "0=Sunday..6=Saturday. Required for weekly, biweekly and triweekly."
                      },
                      "monthlyMode": {
                        "type": "string",
                        "enum": [
                          "byDate",
                          "byWeekday"
                        ],
                        "description": "For monthly: byDate uses monthlyDays, byWeekday uses monthlyWeekday plus monthlyWeekOfMonth. Defaults to byDate."
                      },
                      "monthlyDays": {
                        "type": "array",
                        "items": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 31
                        },
                        "description": "Days of the month for monthly byDate"
                      },
                      "monthlyWeekday": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 6,
                        "description": "0=Sunday..6=Saturday for monthly byWeekday"
                      },
                      "monthlyWeekOfMonth": {
                        "type": "number",
                        "enum": [
                          1,
                          2,
                          3,
                          4,
                          -1
                        ],
                        "description": "1-4, or -1 for the last week of the month"
                      },
                      "endDate": {
                        "type": "string",
                        "description": "Optional ISO date that stops a recurring schedule"
                      },
                      "timezone": {
                        "type": "string",
                        "description": "IANA timezone. Defaults to Asia/Jerusalem."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "nullable": true
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "push",
                            "popup",
                            "both"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "scheduled"
                          ]
                        },
                        "recipients": {
                          "type": "number",
                          "description": "How many trainees the notification was delivered to"
                        },
                        "scheduledFor": {
                          "type": "string",
                          "nullable": true,
                          "description": "ISO date-time of the first delivery when scheduled"
                        },
                        "skipped": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Trainee ids the key may not reach. They were left out of the send."
                        },
                        "skippedCount": {
                          "type": "number"
                        },
                        "rateLimited": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Trainee ids that already hit their daily notification cap. They were left out of the send."
                        },
                        "rateLimitedCount": {
                          "type": "number"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "description": "List webhook subscriptions for the current key's coach",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "active": {
                            "type": "boolean"
                          },
                          "includeCoachLoggedWorkouts": {
                            "type": "boolean"
                          },
                          "description": {
                            "type": "string"
                          },
                          "failureCount": {
                            "type": "number"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "description": "List the current key's coach products. Filter by productType, isActive or name.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "SINGLE",
                "PUNCH_CARD",
                "MEMBERSHIP"
              ]
            },
            "in": "query",
            "name": "productType",
            "required": false
          },
          {
            "schema": {
              "type": "boolean"
            },
            "in": "query",
            "name": "isActive",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "name",
            "required": false,
            "description": "Case-insensitive name filter"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "coachId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "price": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "ILS",
                              "USD",
                              "EUR",
                              "GBP"
                            ]
                          },
                          "productType": {
                            "type": "string",
                            "enum": [
                              "SINGLE",
                              "PUNCH_CARD",
                              "MEMBERSHIP"
                            ]
                          },
                          "productCategory": {
                            "type": "string"
                          },
                          "credits": {
                            "type": "number",
                            "nullable": true
                          },
                          "isActive": {
                            "type": "boolean"
                          },
                          "hidePriceInApp": {
                            "type": "boolean"
                          },
                          "membershipDetails": {
                            "type": "object",
                            "nullable": true,
                            "additionalProperties": false,
                            "properties": {
                              "duration": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "DAY",
                                      "WEEK",
                                      "MONTH",
                                      "YEAR"
                                    ]
                                  }
                                }
                              },
                              "recurrence": {
                                "type": "string",
                                "enum": [
                                  "DAILY",
                                  "WEEKLY",
                                  "MONTHLY",
                                  "YEARLY",
                                  "ONE_TIME"
                                ]
                              },
                              "limitations": {
                                "type": "object",
                                "additionalProperties": false,
                                "properties": {
                                  "isUnlimited": {
                                    "type": "boolean"
                                  },
                                  "periodicalUsage": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "usagesPerPeriod": {
                                        "type": "number"
                                      },
                                      "periodType": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "allowedHours": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "from": {
                                        "type": "string"
                                      },
                                      "to": {
                                        "type": "string"
                                      }
                                    }
                                  },
                                  "allowedDays": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/products/{productId}": {
      "get": {
        "tags": [
          "Products"
        ],
        "description": "Get a product by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "productId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coachId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "price": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "ILS",
                            "USD",
                            "EUR",
                            "GBP"
                          ]
                        },
                        "productType": {
                          "type": "string",
                          "enum": [
                            "SINGLE",
                            "PUNCH_CARD",
                            "MEMBERSHIP"
                          ]
                        },
                        "productCategory": {
                          "type": "string"
                        },
                        "credits": {
                          "type": "number",
                          "nullable": true
                        },
                        "isActive": {
                          "type": "boolean"
                        },
                        "hidePriceInApp": {
                          "type": "boolean"
                        },
                        "membershipDetails": {
                          "type": "object",
                          "nullable": true,
                          "additionalProperties": false,
                          "properties": {
                            "duration": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "value": {
                                  "type": "number"
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "DAY",
                                    "WEEK",
                                    "MONTH",
                                    "YEAR"
                                  ]
                                }
                              }
                            },
                            "recurrence": {
                              "type": "string",
                              "enum": [
                                "DAILY",
                                "WEEKLY",
                                "MONTHLY",
                                "YEARLY",
                                "ONE_TIME"
                              ]
                            },
                            "limitations": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "isUnlimited": {
                                  "type": "boolean"
                                },
                                "periodicalUsage": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "usagesPerPeriod": {
                                      "type": "number"
                                    },
                                    "periodType": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "allowedHours": {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "properties": {
                                    "from": {
                                      "type": "string"
                                    },
                                    "to": {
                                      "type": "string"
                                    }
                                  }
                                },
                                "allowedDays": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          }
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/purchases": {
      "get": {
        "tags": [
          "Purchases"
        ],
        "description": "List customer purchases. Filter by status, traineeId or productId.",
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "EXPIRED",
                "CANCELLED",
                "PENDING",
                "WAITING_FOR_PAYMENT"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "productId",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "coachId": {
                            "type": "string"
                          },
                          "traineeId": {
                            "type": "string"
                          },
                          "productId": {
                            "type": "string"
                          },
                          "purchaseDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "expirationDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "purchaseAmount": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string",
                            "enum": [
                              "ILS",
                              "USD",
                              "EUR",
                              "GBP"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ACTIVE",
                              "EXPIRED",
                              "CANCELLED",
                              "PENDING",
                              "WAITING_FOR_PAYMENT"
                            ]
                          },
                          "initialCredits": {
                            "type": "number"
                          },
                          "remainingCredits": {
                            "type": "number"
                          },
                          "membershipStartDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "membershipEndDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "currentPeriodUsages": {
                            "type": "number"
                          },
                          "periodResetDate": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Purchases"
        ],
        "description": "Record a product purchase for a trainee. Credits, expiration and membership dates are derived from the product when omitted: a punch card opens with the product credits and a one-year expiration, a membership starts immediately for the product duration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeId",
                  "productId"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Trainee buying the product"
                  },
                  "productId": {
                    "type": "string",
                    "description": "Product to purchase. Must be active."
                  },
                  "purchaseAmount": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Amount actually charged. Defaults to the product price."
                  },
                  "currency": {
                    "type": "string",
                    "enum": [
                      "ILS",
                      "USD",
                      "EUR",
                      "GBP"
                    ],
                    "description": "Defaults to ILS"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "EXPIRED",
                      "CANCELLED",
                      "PENDING",
                      "WAITING_FOR_PAYMENT"
                    ],
                    "description": "Defaults to ACTIVE. Use WAITING_FOR_PAYMENT to record a purchase before payment clears."
                  },
                  "purchaseDate": {
                    "type": "string",
                    "description": "Purchase date as YYYY-MM-DD or a full ISO-8601 date-time. Defaults to now. Use it to backdate an imported purchase."
                  },
                  "expirationDate": {
                    "type": "string",
                    "description": "Expiration as YYYY-MM-DD or a full ISO-8601 date-time, and never before purchaseDate. Defaults to one year from now for punch cards. A date in the past is accepted for history imports; the purchase flips to EXPIRED the first time its credits are used."
                  },
                  "initialCredits": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Punch card credits granted. PUNCH_CARD products only. Defaults to the product credits."
                  },
                  "remainingCredits": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Credits still available, and never more than initialCredits. PUNCH_CARD products only. Defaults to initialCredits; set it lower to import a partly used card."
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coachId": {
                          "type": "string"
                        },
                        "traineeId": {
                          "type": "string"
                        },
                        "productId": {
                          "type": "string"
                        },
                        "purchaseDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expirationDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "purchaseAmount": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "ILS",
                            "USD",
                            "EUR",
                            "GBP"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ACTIVE",
                            "EXPIRED",
                            "CANCELLED",
                            "PENDING",
                            "WAITING_FOR_PAYMENT"
                          ]
                        },
                        "initialCredits": {
                          "type": "number"
                        },
                        "remainingCredits": {
                          "type": "number"
                        },
                        "membershipStartDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "membershipEndDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "currentPeriodUsages": {
                          "type": "number"
                        },
                        "periodResetDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/purchases/{purchaseId}": {
      "get": {
        "tags": [
          "Purchases"
        ],
        "description": "Get a customer purchase by id.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "purchaseId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "coachId": {
                          "type": "string"
                        },
                        "traineeId": {
                          "type": "string"
                        },
                        "productId": {
                          "type": "string"
                        },
                        "purchaseDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "expirationDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "purchaseAmount": {
                          "type": "number"
                        },
                        "currency": {
                          "type": "string",
                          "enum": [
                            "ILS",
                            "USD",
                            "EUR",
                            "GBP"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ACTIVE",
                            "EXPIRED",
                            "CANCELLED",
                            "PENDING",
                            "WAITING_FOR_PAYMENT"
                          ]
                        },
                        "initialCredits": {
                          "type": "number"
                        },
                        "remainingCredits": {
                          "type": "number"
                        },
                        "membershipStartDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "membershipEndDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "currentPeriodUsages": {
                          "type": "number"
                        },
                        "periodResetDate": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/overview": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Monitoring overview: counts of trainees inactive in training, nutrition, water and weight, plus adherence graph data.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "trainingDays",
            "required": false,
            "description": "Days without training before a trainee counts as inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "nutritionDays",
            "required": false,
            "description": "Days without nutrition logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "waterDays",
            "required": false,
            "description": "Days without water logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "weightDays",
            "required": false,
            "description": "Days without a weight entry before inactive (default 7)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/training": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Trainees who have not logged training within the inactivity window.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "trainingDays",
            "required": false,
            "description": "Days without training before a trainee counts as inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "nutritionDays",
            "required": false,
            "description": "Days without nutrition logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "waterDays",
            "required": false,
            "description": "Days without water logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "weightDays",
            "required": false,
            "description": "Days without a weight entry before inactive (default 7)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/steps": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Trainees who logged fewer steps than their daily step target on the target day (default today). Paginated.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Target day in YYYY-MM-DD (Israel time). Defaults to today when omitted."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number, 1-based (default 1)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Results per page, max 100 (default 20)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/nutrition": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Trainees who have not logged nutrition within the inactivity window.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "trainingDays",
            "required": false,
            "description": "Days without training before a trainee counts as inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "nutritionDays",
            "required": false,
            "description": "Days without nutrition logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "waterDays",
            "required": false,
            "description": "Days without water logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "weightDays",
            "required": false,
            "description": "Days without a weight entry before inactive (default 7)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/nutrition/logged-today": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Trainees who logged nutrition on the target day (default today), with logged calories and protein against target. Rows include hasMealPhoto (boolean; the row carries no photo URL) and the response includes per-bucket counts. Paginated.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Target day in YYYY-MM-DD (Israel time). Defaults to today when omitted."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number, 1-based (default 1)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Results per page, max 100 (default 20)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "proteinHit",
                "proteinUnder",
                "calorieHit",
                "calorieUnder",
                "calorieOver"
              ]
            },
            "in": "query",
            "name": "bucket",
            "required": false,
            "description": "Filter to a target-attainment bucket (protein/calorie hit, under, or over). Omit for all."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/nutrition/not-logged": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Trainees who did NOT log nutrition on the target day (default today). Use daysThreshold to require a longer gap (e.g. 3 = no logging for 3+ days). Paginated.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "date",
            "required": false,
            "description": "Target day in YYYY-MM-DD (Israel time). Defaults to today when omitted."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number, 1-based (default 1)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Results per page, max 100 (default 20)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "daysThreshold",
            "required": false,
            "description": "Minimum days without a nutrition log to include a trainee (default 1 = did not log on the target day)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/weight": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Weight monitoring: weight-inactive trainees, significant weight changes vs an aged baseline (with daysBetweenWeights), trend vs goal, plateaus, and broken weekly weigh-in streaks (streakBroken).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "trainingDays",
            "required": false,
            "description": "Days without training before a trainee counts as inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "nutritionDays",
            "required": false,
            "description": "Days without nutrition logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "waterDays",
            "required": false,
            "description": "Days without water logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "weightDays",
            "required": false,
            "description": "Days without a weight entry before inactive (default 7)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/water": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Trainees who have not logged water within the inactivity window.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "trainingDays",
            "required": false,
            "description": "Days without training before a trainee counts as inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "nutritionDays",
            "required": false,
            "description": "Days without nutrition logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "waterDays",
            "required": false,
            "description": "Days without water logging before inactive (default 3)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "weightDays",
            "required": false,
            "description": "Days without a weight entry before inactive (default 7)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/updates": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Weekly trainee updates (check-ins) for monitoring, filterable by form/label/gender.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "form",
            "required": false,
            "description": "Filter by form id"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,5}$"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/incomplete-updates": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Updates submitted with missing measurements or photos.",
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "Exercises where trainees stopped progressing (no improvement over the configured window).",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "males",
                "females"
              ]
            },
            "in": "query",
            "name": "gender",
            "required": false,
            "description": "Filter trainees by gender"
          },
          {
            "schema": {
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "string"
              }
            },
            "in": "query",
            "name": "labels",
            "required": false,
            "description": "Filter to trainees that have all of these label ids"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "maxWeight",
                "avgWeight",
                "volume"
              ]
            },
            "in": "query",
            "name": "progressionMetric",
            "required": false,
            "description": "Metric used to judge progression (default volume)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "minWorkouts",
            "required": false,
            "description": "Minimum workouts to consider (default 4)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "stalledDays",
            "required": false,
            "description": "Days of no progress to count as stalled (default 30)"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "in": "query",
            "name": "showDismissed",
            "required": false,
            "description": "Include dismissed exercises"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "minStalledDays",
            "required": false,
            "description": "Only exercises stalled at least this many days"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "minStalledExercises",
            "required": false,
            "description": "Only trainees with at least this many stalled exercises"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "minRecentWorkouts",
            "required": false,
            "description": "Only exercises with at least this many recent workouts"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "minTraineesPerExercise",
            "required": false,
            "description": "Only exercises stalled for at least this many trainees"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "minDropPercent",
            "required": false,
            "description": "Only exercises whose metric dropped at least this percent"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,5}$"
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "string",
              "pattern": "^[1-9][0-9]{0,2}$"
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Items per page (1-999, default 50)"
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/incomplete-updates/read": {
      "patch": {
        "tags": [
          "Monitoring"
        ],
        "description": "Mark a set of incomplete updates as read.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "updates"
                ],
                "properties": {
                  "updates": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "_id",
                        "type"
                      ],
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "update",
                            "formResponse"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises/dismiss": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "description": "Dismiss a single stalled exercise for a trainee.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeId",
                  "exerciseId"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Trainee id"
                  },
                  "exerciseId": {
                    "type": "string",
                    "description": "Exercise (catalog) id"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises/dismiss-all": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "description": "Dismiss many stalled exercises at once.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pairs"
                ],
                "properties": {
                  "pairs": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "traineeId",
                        "exerciseId"
                      ],
                      "properties": {
                        "traineeId": {
                          "type": "string",
                          "description": "Trainee id"
                        },
                        "exerciseId": {
                          "type": "string",
                          "description": "Exercise (catalog) id"
                        }
                      }
                    },
                    "description": "Up to 500 { traineeId, exerciseId } pairs"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises/undismiss": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "description": "Undismiss a single stalled exercise for a trainee.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeId",
                  "exerciseId"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Trainee id"
                  },
                  "exerciseId": {
                    "type": "string",
                    "description": "Exercise (catalog) id"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises/undismiss-all": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "description": "Undismiss many stalled exercises at once.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pairs"
                ],
                "properties": {
                  "pairs": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "traineeId",
                        "exerciseId"
                      ],
                      "properties": {
                        "traineeId": {
                          "type": "string",
                          "description": "Trainee id"
                        },
                        "exerciseId": {
                          "type": "string",
                          "description": "Exercise (catalog) id"
                        }
                      }
                    },
                    "description": "Up to 500 { traineeId, exerciseId } pairs"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises/handle": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "description": "Mark a single stalled exercise as handled.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "traineeId",
                  "exerciseId"
                ],
                "properties": {
                  "traineeId": {
                    "type": "string",
                    "description": "Trainee id"
                  },
                  "exerciseId": {
                    "type": "string",
                    "description": "Exercise (catalog) id"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/monitoring/stalled-exercises/handle-all": {
      "post": {
        "tags": [
          "Monitoring"
        ],
        "description": "Mark many stalled exercises as handled at once.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pairs"
                ],
                "properties": {
                  "pairs": {
                    "type": "array",
                    "maxItems": 500,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "traineeId",
                        "exerciseId"
                      ],
                      "properties": {
                        "traineeId": {
                          "type": "string",
                          "description": "Trainee id"
                        },
                        "exerciseId": {
                          "type": "string",
                          "description": "Exercise (catalog) id"
                        }
                      }
                    },
                    "description": "Up to 500 { traineeId, exerciseId } pairs"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "success": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/personal-records": {
      "get": {
        "tags": [
          "Trainees"
        ],
        "description": "A trainee's personal records per exercise: best weight, estimated 1RM, top-set reps, max reps, set and total volume, and max duration, each with the value achieved, the previous record and when it was set.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "exerciseIds",
            "required": false,
            "description": "Optional comma-separated exercise (catalog) ids to filter to."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/journeys": {
      "get": {
        "tags": [
          "Journeys"
        ],
        "description": "List customer journeys (automation templates) with search and pagination, including how many trainees are actively enrolled in each.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "in": "query",
            "name": "isActive",
            "required": false,
            "description": "Filter by active status."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Search journey title and description (min 2 chars)."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Journeys"
        ],
        "description": "Create a customer journey. The journey is created without steps; add and order its steps in the Coach UI, then activate it. Trainees are only enrolled once the journey is active.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "title"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Journey name shown to the coach."
                  },
                  "description": {
                    "type": "string"
                  },
                  "autoAssign": {
                    "type": "boolean",
                    "description": "Automatically enroll trainees that match the filters below."
                  },
                  "autoAssignPriority": {
                    "type": "integer",
                    "description": "Lower runs first when several journeys match."
                  },
                  "anchorType": {
                    "type": "string",
                    "enum": [
                      "escort_start",
                      "enrollment"
                    ],
                    "description": "Whether day counting starts from the escort start date or from the moment the trainee is enrolled."
                  },
                  "filterLabels": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    },
                    "description": "Only auto-enroll trainees with these label ids."
                  },
                  "filterEscortTypes": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "filterGender": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "durationWeeks": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "matchByDuration": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Created",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "warnings": {
                      "type": "array",
                      "description": "Non-fatal problems with follow-up writes. The resource was created, but each listed field was not applied.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/journeys/enrollments": {
      "get": {
        "tags": [
          "Journeys"
        ],
        "description": "List trainee enrollments across journeys, filterable by journey, escort and status, with trainee, escort and journey resolved.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "journeyId",
            "required": false
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "escortId",
            "required": false
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "paused",
                "completed",
                "cancelled"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/journeys/{journeyId}": {
      "get": {
        "tags": [
          "Journeys"
        ],
        "description": "Get a single customer journey with its full step structure: triggers, timing and the actions each step runs.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "journeyId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Journeys"
        ],
        "description": "Update a customer journey's settings. Steps cannot be edited through the API: editing steps re-schedules pending sends for enrolled trainees, so it is only available in the Coach UI.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "isActive": {
                    "type": "boolean",
                    "description": "Activate or pause the journey."
                  },
                  "autoAssign": {
                    "type": "boolean"
                  },
                  "autoAssignPriority": {
                    "type": "integer"
                  },
                  "anchorType": {
                    "type": "string",
                    "enum": [
                      "escort_start",
                      "enrollment"
                    ]
                  },
                  "filterLabels": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "filterEscortTypes": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "filterGender": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "string"
                    }
                  },
                  "durationWeeks": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "matchByDuration": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "journeyId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "description": "Optional. Send a unique key (e.g. a UUID) to make this POST safe to retry. The same key within 24h returns the original result instead of creating a duplicate."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/journeys/{journeyId}/analytics": {
      "get": {
        "tags": [
          "Journeys"
        ],
        "description": "Enrollment and completion statistics for a single customer journey.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "journeyId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/forms/{formId}/response/{responseId}": {
      "get": {
        "tags": [
          "Forms"
        ],
        "description": "Get a single submitted form response with its answers. Each answer carries the question label and field type alongside the value, so this alone shows what was asked and what was replied; questions the trainee skipped are absent, so compare with GET /forms/{formId} to see what went unanswered. Trainee personal details and phone number are included only when the key also has trainees:read.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "formId",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "responseId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true,
                      "description": "A submitted form response. Trainee personal details and phone number are included only when the key also has trainees:read; coach private notes are never returned.",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "form": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The form this response belongs to.",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "title": {
                              "type": "string"
                            },
                            "type": {
                              "type": "string"
                            }
                          }
                        },
                        "trainee": {
                          "type": "object",
                          "additionalProperties": true,
                          "description": "The trainee who submitted the response.",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "fullName": {
                              "type": "string"
                            }
                          }
                        },
                        "responses": {
                          "type": "array",
                          "description": "The submitted answers, one entry per form field.",
                          "items": {
                            "type": "object",
                            "additionalProperties": true,
                            "properties": {
                              "field": {
                                "type": "string",
                                "description": "Field id from the form definition."
                              },
                              "label": {
                                "type": "string",
                                "description": "Field label shown to the trainee."
                              },
                              "fieldType": {
                                "type": "string",
                                "description": "Field type, e.g. text, number, file."
                              }
                            }
                          }
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "Pending",
                            "Handled"
                          ],
                          "description": "Whether the coach has handled this response."
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "update",
                            "registration"
                          ],
                          "description": "Whether this is a periodic update or a registration submission."
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "updatedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/forms/{formId}/responses": {
      "get": {
        "tags": [
          "Forms"
        ],
        "description": "List submitted responses for a form, newest first. Trainee personal details and phone number are included only when the key also has trainees:read; coach private notes are never returned.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "traineeId",
            "required": false,
            "description": "Only responses submitted by this trainee. Use it to read one trainee's answers directly instead of searching by name."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "Pending",
                "Handled"
              ]
            },
            "in": "query",
            "name": "status",
            "required": false,
            "description": "Filter by handling status."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Search the trainee name."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateFrom",
            "required": false,
            "description": "Only responses submitted on or after this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "dateTo",
            "required": false,
            "description": "Only responses submitted on or before this date (YYYY-MM-DD)."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "in": "query",
            "name": "page",
            "required": false,
            "description": "Page number (1-based, default 1)"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Number of items to return (default 25, max 500)"
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "formId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "A submitted form response. Trainee personal details and phone number are included only when the key also has trainees:read; coach private notes are never returned.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "form": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The form this response belongs to.",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              },
                              "type": {
                                "type": "string"
                              }
                            }
                          },
                          "trainee": {
                            "type": "object",
                            "additionalProperties": true,
                            "description": "The trainee who submitted the response.",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "fullName": {
                                "type": "string"
                              }
                            }
                          },
                          "responses": {
                            "type": "array",
                            "description": "The submitted answers, one entry per form field.",
                            "items": {
                              "type": "object",
                              "additionalProperties": true,
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "description": "Field id from the form definition."
                                },
                                "label": {
                                  "type": "string",
                                  "description": "Field label shown to the trainee."
                                },
                                "fieldType": {
                                  "type": "string",
                                  "description": "Field type, e.g. text, number, file."
                                }
                              }
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "Pending",
                              "Handled"
                            ],
                            "description": "Whether the coach has handled this response."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "update",
                              "registration"
                            ],
                            "description": "Whether this is a periodic update or a registration submission."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "updatedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number"
                        },
                        "limit": {
                          "type": "number"
                        },
                        "total": {
                          "type": "number",
                          "nullable": true,
                          "description": "Total number of matching items. null when the underlying source cannot report an exact count for this page; use hasMore to keep paging."
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "truncated": {
                          "type": "boolean",
                          "description": "Present and true when the result set exceeded the in-memory scan cap and was truncated. Narrow your filters to page through all items."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/quick-wins": {
      "get": {
        "tags": [
          "Monitoring"
        ],
        "description": "List automatically detected positive moments for your trainees (new personal record, consistency streak, measurement progress, coaching milestone), newest first. Uses cursor pagination: pass the returned nextCursor to fetch the next page.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "cursor",
            "required": false,
            "description": "Cursor from the previous response (nextCursor)."
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "in": "query",
            "name": "limit",
            "required": false,
            "description": "Items per page. Defaults to 15."
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "handled"
              ]
            },
            "in": "query",
            "name": "filter",
            "required": false,
            "description": "Return wins still awaiting action, or ones already handled. Defaults to active."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "query",
            "name": "search",
            "required": false,
            "description": "Search the trainee name."
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "A positive moment automatically detected for a trainee (new personal record, consistency streak, measurement progress, coaching milestone).",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "trainee": {
                            "type": "object",
                            "additionalProperties": true,
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "fullName": {
                                "type": "string"
                              }
                            }
                          },
                          "category": {
                            "type": "string",
                            "description": "Win category, e.g. personalRecord, streak, measurement."
                          },
                          "title": {
                            "type": "string",
                            "description": "Short human-readable summary of the win."
                          },
                          "description": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "description": "active or handled."
                          },
                          "createdAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "nextCursor": {
                      "type": "string",
                      "nullable": true,
                      "description": "Pass as cursor to fetch the next page. Null when there are no more results."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/trainees/{traineeId}/journey-progress": {
      "get": {
        "tags": [
          "Journeys"
        ],
        "description": "Where a trainee stands in their customer journey(s): current effective day and week, completed versus upcoming steps, and each journey's status.",
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "traineeId",
            "required": true
          }
        ],
        "security": [
          {
            "apiKeyAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Successful response",
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "fix": {
                          "type": "string",
                          "nullable": true
                        },
                        "details": {
                          "type": "object",
                          "additionalProperties": true,
                          "nullable": true
                        },
                        "retryAfterMs": {
                          "type": "number",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "http://localhost:4000",
      "description": "Coach Platform API"
    }
  ],
  "tags": [
    {
      "name": "Discovery",
      "description": "Unauthenticated discovery and reference endpoints."
    },
    {
      "name": "Coach",
      "description": "The authenticated coach profile."
    },
    {
      "name": "Trainees",
      "description": "Create, read, and update trainees."
    },
    {
      "name": "Labels",
      "description": "Trainee labels."
    },
    {
      "name": "Escorts",
      "description": "Coaching periods linking a coach and a trainee."
    },
    {
      "name": "Training Plans",
      "description": "Workout plans and their workout days."
    },
    {
      "name": "Workout Logs",
      "description": "Completed workout logs."
    },
    {
      "name": "Exercises",
      "description": "The exercise catalog."
    },
    {
      "name": "Nutrition Menus",
      "description": "Nutrition menus and meals."
    },
    {
      "name": "Meetings",
      "description": "Scheduled meetings."
    },
    {
      "name": "Forms",
      "description": "Coach forms."
    },
    {
      "name": "Notifications",
      "description": "Send notifications to trainees."
    },
    {
      "name": "Monitoring",
      "description": "Trainee adherence monitoring and stalled-exercise tracking."
    },
    {
      "name": "Journeys",
      "description": "Customer journeys and trainee enrollment progress."
    },
    {
      "name": "Employees",
      "description": "Team members."
    },
    {
      "name": "Products",
      "description": "The coach product catalog and pricing."
    },
    {
      "name": "Purchases",
      "description": "Customer purchase records and membership status."
    },
    {
      "name": "Webhooks",
      "description": "Read configured webhooks."
    }
  ]
}