{
  "openapi": "3.1.0",
  "info": {
    "title": "Hapana API",
    "version": "2026-01-10",
    "description": "The Hapana API provides programmatic access to fitness business management data.\n\n## Authentication\n\nAll API requests require authentication using either:\n- **API Key**: Include in the `X-Hapana-API-Key` header\n- **OAuth 2.0**: Include Bearer token in the `Authorization` header\n\n## Versioning\n\nThe API uses date-based versioning (e.g., `2026-01-10`). Include the version in:\n- URL path: `/v2/...`\n- Header: `X-Hapana-Version: 2026-01-10` (for per-request override)\n\n## Pagination\n\nList endpoints support cursor-based pagination with:\n- `limit`: Number of results (1-100, default 10)\n- `starting_after`: Cursor for next page\n- `ending_before`: Cursor for previous page\n\n## Expanding Objects\n\nUse the `expand[]` query parameter to include related objects inline.\nExample: `?expand[]=client&expand[]=session`\n\n## Rate Limits\n\nRate limits vary by plan tier. Check response headers:\n- `X-RateLimit-Limit`: Requests allowed per minute\n- `X-RateLimit-Remaining`: Requests remaining\n- `X-RateLimit-Reset`: Unix timestamp when limit resets\n",
    "contact": {
      "name": "Hapana API Support",
      "url": "https://docs.hapana.com",
      "email": "api-support@hapana.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://hapana.com/terms"
    },
    "x-logo": {
      "url": "https://s3.us-west-2.amazonaws.com/hf-files-oregon/hdphapana_user_customized/2023/10-04/0834af51-0911-4e93-9d30-2acb64dd8a7d/Hapana-Logo-Green-Full.png",
      "altText": "Hapana Logo"
    }
  },
  "servers": [
    {
      "url": "https://api.hapana-app.com/v2",
      "description": "Production API"
    },
    {
      "url": "https://api.sandbox.hapana-app.com/v2",
      "description": "Sandbox environment for testing"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Health",
      "description": "API health and status endpoints"
    },
    {
      "name": "Webhooks",
      "description": "Webhook endpoint management and delivery history"
    },
    {
      "name": "Clients",
      "description": "Client (member) management"
    },
    {
      "name": "Bookings",
      "description": "Class booking management"
    },
    {
      "name": "Sessions",
      "description": "Class session management"
    },
    {
      "name": "Payments",
      "description": "Payment and transaction management"
    },
    {
      "name": "Packages",
      "description": "Credit package management"
    },
    {
      "name": "Check-ins",
      "description": "Location check-in management"
    },
    {
      "name": "Sites",
      "description": "Site (location/studio) management"
    },
    {
      "name": "Staff",
      "description": "Staff member management"
    },
    {
      "name": "Instructors",
      "description": "Instructor management (specialized staff view)"
    },
    {
      "name": "Schedules",
      "description": "Recurring session schedule management"
    },
    {
      "name": "Settings",
      "description": "Site settings management"
    },
    {
      "name": "Content",
      "description": "Content catalog and CMS endpoints"
    },
    {
      "name": "Challenges",
      "description": "Member challenge enrollment and progress tracking"
    },
    {
      "name": "Metrics",
      "description": "Performance tracking and metric entry management"
    },
    {
      "name": "Leaderboards",
      "description": "Leaderboard rankings and member positions"
    },
    {
      "name": "Awards",
      "description": "Awards, streaks, and milestone tracking"
    },
    {
      "name": "Video",
      "description": "Video playback session tracking and watch history"
    },
    {
      "name": "Notifications",
      "description": "Member notification preference management"
    },
    {
      "name": "Media",
      "description": "Media asset catalog (images, videos, documents)"
    },
    {
      "name": "Experience",
      "description": "Experience theme entitlement and status"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getApiInfo",
        "summary": "Get API information",
        "description": "Returns basic information about the API including version and status.",
        "tags": [
          "Health"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "API information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiInfo"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Health check",
        "description": "Returns the health status of the API service.\nUsed by load balancers and monitoring systems.\n",
        "tags": [
          "Health"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "summary": "List webhook endpoints",
        "description": "Returns a list of webhook endpoints for the authenticated customer.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookStatusFilter"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhook endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createWebhook",
        "summary": "Create webhook endpoint",
        "description": "Creates a new webhook endpoint. The signing secret is only returned once\nin the response; store it securely.\n",
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook endpoint created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/webhooks/{id}": {
      "get": {
        "operationId": "getWebhook",
        "summary": "Get webhook endpoint",
        "description": "Retrieves a specific webhook endpoint by ID.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook endpoint details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateWebhook",
        "summary": "Update webhook endpoint",
        "description": "Updates a webhook endpoint's configuration.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook endpoint updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhook",
        "summary": "Delete webhook endpoint",
        "description": "Deletes a webhook endpoint. This action is irreversible.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook endpoint deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhooks/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "summary": "Rotate webhook secret",
        "description": "Generates a new signing secret for the webhook endpoint.\nThe new secret is only returned once; store it securely.\n",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Secret rotated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/webhooks/{id}/enable": {
      "post": {
        "operationId": "enableWebhook",
        "summary": "Re-enable disabled webhook",
        "description": "Re-enables a webhook endpoint that was auto-disabled due to consecutive failures.\nOnly applicable to webhooks with status \"disabled\".\n",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook re-enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Webhook is not disabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "summary": "List webhook deliveries",
        "description": "Returns the delivery history for a webhook endpoint.\nHistory is retained for 7 days.\n",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/DeliveryStatusFilter"
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Filter deliveries created on or after this date (ISO-8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Filter deliveries created before this date (ISO-8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhook deliveries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhooks/{id}/deliveries/{deliveryId}": {
      "get": {
        "operationId": "getWebhookDelivery",
        "summary": "Get webhook delivery",
        "description": "Retrieves details of a specific webhook delivery attempt.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/DeliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook delivery details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/webhooks/{id}/deliveries/{deliveryId}/redeliver": {
      "post": {
        "operationId": "redeliverWebhook",
        "summary": "Redeliver webhook event",
        "description": "Manually triggers redelivery of a webhook event.\nCreates a new delivery with a new ID and regenerated signature.\nUses the original event payload.\n",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookId"
          },
          {
            "$ref": "#/components/parameters/DeliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Redelivery successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "202": {
            "description": "Redelivery attempted but failed (logged for debugging)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/clients": {
      "get": {
        "operationId": "listClients",
        "summary": "List clients",
        "description": "Returns a paginated list of clients.",
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Filter by email address",
            "schema": {
              "type": "string",
              "format": "email"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or email",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of clients",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createClient",
        "summary": "Create client",
        "description": "Creates a new client record.",
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateClientRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Client created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Client with this email already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/clients/{id}": {
      "get": {
        "operationId": "getClient",
        "summary": "Get client",
        "description": "Retrieves a specific client by ID.",
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ClientId"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Client details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateClient",
        "summary": "Update client",
        "description": "Updates a client's information.",
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ClientId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateClientRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Client updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "archiveClient",
        "summary": "Archive client",
        "description": "Archives (soft-deletes) a client record.",
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ClientId"
          }
        ],
        "responses": {
          "200": {
            "description": "Client archived",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/bookings": {
      "get": {
        "operationId": "listBookings",
        "summary": "List bookings",
        "description": "Returns a paginated list of bookings.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Filter by client ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session_id",
            "in": "query",
            "description": "Filter by session ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by booking status",
            "schema": {
              "type": "string",
              "enum": [
                "confirmed",
                "waitlisted",
                "cancelled",
                "attended",
                "noshow"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of bookings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createBooking",
        "summary": "Create booking",
        "description": "Creates a new booking for a client.",
        "tags": [
          "Bookings"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookingRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Booking created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Session is full or already booked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}": {
      "get": {
        "operationId": "getBooking",
        "summary": "Get booking",
        "description": "Retrieves a specific booking by ID.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/bookings/{id}/cancel": {
      "post": {
        "operationId": "cancelBooking",
        "summary": "Cancel booking",
        "description": "Cancels a booking.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Booking already cancelled or session started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/checkin": {
      "post": {
        "operationId": "checkinBooking",
        "summary": "Check in booking",
        "description": "Records a check-in for a booking.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking checked in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Booking already checked in or cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/bookings/{id}/noshow": {
      "post": {
        "operationId": "noshowBooking",
        "summary": "Mark booking as no-show",
        "description": "Marks a booking as a no-show.",
        "tags": [
          "Bookings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/BookingId"
          }
        ],
        "responses": {
          "200": {
            "description": "Booking marked as no-show",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Booking"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Booking already processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/sessions": {
      "get": {
        "operationId": "listSessions",
        "summary": "List sessions",
        "description": "Returns a paginated list of sessions.",
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "location_id",
            "in": "query",
            "description": "Filter by location ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instructor_id",
            "in": "query",
            "description": "Filter by instructor ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_time_gte",
            "in": "query",
            "description": "Filter sessions starting on or after this time (ISO-8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "start_time_lte",
            "in": "query",
            "description": "Filter sessions starting on or before this time (ISO-8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of sessions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/sessions/{id}": {
      "get": {
        "operationId": "getSession",
        "summary": "Get session",
        "description": "Retrieves a specific session by ID.",
        "tags": [
          "Sessions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SessionId"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Session details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/payments": {
      "get": {
        "operationId": "listPayments",
        "summary": "List payments",
        "description": "Returns a paginated list of payments.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Filter by client ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by payment status",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "completed",
                "failed",
                "refunded",
                "partially_refunded"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of payments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/payments/{id}": {
      "get": {
        "operationId": "getPayment",
        "summary": "Get payment",
        "description": "Retrieves a specific payment by ID.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PaymentId"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Payment details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/payments/{id}/refund": {
      "post": {
        "operationId": "refundPayment",
        "summary": "Refund payment",
        "description": "Creates a refund for a payment.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PaymentId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundPaymentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Refund processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Payment already refunded or refund amount exceeds balance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/packages": {
      "get": {
        "operationId": "listPackages",
        "summary": "List packages",
        "description": "Returns a paginated list of client packages.",
        "tags": [
          "Packages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Filter by client ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by package status",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "expired",
                "depleted",
                "cancelled"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of packages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackageList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/packages/{id}": {
      "get": {
        "operationId": "getPackage",
        "summary": "Get package",
        "description": "Retrieves a specific package by ID.",
        "tags": [
          "Packages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PackageId"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Package details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Package"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/packages/{id}/cancel": {
      "post": {
        "operationId": "cancelPackage",
        "summary": "Cancel package",
        "description": "Cancels a package.",
        "tags": [
          "Packages"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PackageId"
          }
        ],
        "responses": {
          "200": {
            "description": "Package cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Package"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Package already cancelled or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/checkins": {
      "get": {
        "operationId": "listCheckins",
        "summary": "List check-ins",
        "description": "Returns a paginated list of check-ins.",
        "tags": [
          "Check-ins"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "client_id",
            "in": "query",
            "description": "Filter by client ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location_id",
            "in": "query",
            "description": "Filter by location ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of check-ins",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckinList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createCheckin",
        "summary": "Create check-in",
        "description": "Records a client check-in at a location.",
        "tags": [
          "Check-ins"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCheckinRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Check-in created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkin"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/checkins/{id}": {
      "get": {
        "operationId": "getCheckin",
        "summary": "Get check-in",
        "description": "Retrieves a specific check-in by ID.",
        "tags": [
          "Check-ins"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/CheckinId"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "Check-in details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Checkin"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/sites": {
      "get": {
        "operationId": "listSites",
        "summary": "List sites",
        "description": "Returns a paginated list of sites (locations/studios) for the brand.",
        "tags": [
          "Sites"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by site status",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by site name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "isDigital",
            "in": "query",
            "description": "Filter by digital/physical location",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of sites",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createSite",
        "summary": "Create site",
        "description": "Creates a new site (location/studio) for the brand.",
        "tags": [
          "Sites"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSiteRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Site created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/sites/{id}": {
      "get": {
        "operationId": "getSite",
        "summary": "Get site",
        "description": "Retrieves a specific site by ID.",
        "tags": [
          "Sites"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "200": {
            "description": "Site details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateSite",
        "summary": "Update site",
        "description": "Updates a site's details.",
        "tags": [
          "Sites"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSiteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Site updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Site"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteSite",
        "summary": "Delete site",
        "description": "Archives a site. This is a soft delete operation.",
        "tags": [
          "Sites"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SiteId"
          }
        ],
        "responses": {
          "200": {
            "description": "Site deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/staff": {
      "get": {
        "operationId": "listStaff",
        "summary": "List staff members",
        "description": "Returns a paginated list of staff members.",
        "tags": [
          "Staff"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "description": "Filter by site ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "description": "Filter by location ID (alias for siteId)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "role",
            "in": "query",
            "description": "Filter by staff role",
            "schema": {
              "type": "string",
              "enum": [
                "owner",
                "manager",
                "front_desk",
                "instructor"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by staff status",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "suspended"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or email",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Pagination cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of staff members",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StaffList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createStaff",
        "summary": "Create staff member",
        "description": "Creates a new staff member.",
        "tags": [
          "Staff"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateStaffRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Staff member created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Staff"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Staff member with this email already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/staff/{id}": {
      "get": {
        "operationId": "getStaff",
        "summary": "Get staff member",
        "description": "Retrieves a specific staff member by ID.",
        "tags": [
          "Staff"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StaffId"
          }
        ],
        "responses": {
          "200": {
            "description": "Staff member details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Staff"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateStaff",
        "summary": "Update staff member",
        "description": "Updates a staff member's information.",
        "tags": [
          "Staff"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StaffId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStaffRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Staff member updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Staff"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteStaff",
        "summary": "Delete staff member",
        "description": "Deactivates (soft-deletes) a staff member.",
        "tags": [
          "Staff"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/StaffId"
          }
        ],
        "responses": {
          "204": {
            "description": "Staff member deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/instructors": {
      "get": {
        "operationId": "listInstructors",
        "summary": "List instructors",
        "description": "Returns a paginated list of instructors.\nInstructors are staff users with instructor privileges.\n",
        "tags": [
          "Instructors"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "description": "Filter by site ID",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "description": "Filter by location ID (alias for siteId)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by instructor status",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "on_leave"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or email",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Pagination cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of instructors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstructorList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "operationId": "createInstructor",
        "summary": "Create instructor",
        "description": "Creates a new instructor.",
        "tags": [
          "Instructors"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInstructorRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Instructor created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instructor"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Instructor with this email already exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/instructors/{id}": {
      "get": {
        "operationId": "getInstructor",
        "summary": "Get instructor",
        "description": "Retrieves a specific instructor by ID.",
        "tags": [
          "Instructors"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstructorId"
          }
        ],
        "responses": {
          "200": {
            "description": "Instructor details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instructor"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateInstructor",
        "summary": "Update instructor",
        "description": "Updates an instructor's information.",
        "tags": [
          "Instructors"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstructorId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateInstructorRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Instructor updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Instructor"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteInstructor",
        "summary": "Delete instructor",
        "description": "Deactivates (soft-deletes) an instructor.",
        "tags": [
          "Instructors"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/InstructorId"
          }
        ],
        "responses": {
          "204": {
            "description": "Instructor deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/schedules": {
      "get": {
        "operationId": "listSchedules",
        "summary": "List schedules",
        "description": "**Not implemented.** Listing schedules is not available.\nQuery individual sessions instead using GET /v2/sessions.\n",
        "tags": [
          "Schedules"
        ],
        "responses": {
          "501": {
            "description": "Not implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "object": "error",
                  "status": 501,
                  "type": "api_error",
                  "code": "NOT_IMPLEMENTED",
                  "message": "Listing schedules is not available. Query individual sessions instead.",
                  "suggestion": "Use GET /v2/sessions to see scheduled class instances."
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSchedule",
        "summary": "Create schedule",
        "description": "Creates a new recurring schedule pattern. This will generate\nindividual session instances based on the recurrence rules.\n",
        "tags": [
          "Schedules"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Schedule created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/schedules/{id}": {
      "get": {
        "operationId": "getSchedule",
        "summary": "Get schedule",
        "description": "**Not implemented.** Getting schedules by ID is not available.\nQuery the session instead using GET /v2/sessions/:id.\n",
        "tags": [
          "Schedules"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          }
        ],
        "responses": {
          "501": {
            "description": "Not implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "updateSchedule",
        "summary": "Update schedule",
        "description": "**Not implemented.** Schedule updates are done through session edits.\nUse PATCH /v2/sessions/:id with scope parameter (single, future, or all).\n",
        "tags": [
          "Schedules"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateScheduleRequest"
              }
            }
          }
        },
        "responses": {
          "501": {
            "description": "Not implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "object": "error",
                  "status": 501,
                  "type": "api_error",
                  "code": "NOT_IMPLEMENTED",
                  "message": "Schedule updates are done through session edits. Use PATCH /v2/sessions/:id with scope parameter.",
                  "suggestion": "When editing a session, specify scope=single, scope=future, or scope=all to apply changes."
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSchedule",
        "summary": "Delete schedule",
        "description": "**Not implemented.** Schedule deletes are done through session deletes.\nUse DELETE /v2/sessions/:id with scope parameter (single, future, or all).\n",
        "tags": [
          "Schedules"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ScheduleId"
          }
        ],
        "responses": {
          "501": {
            "description": "Not implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/settings": {
      "get": {
        "operationId": "getSettings",
        "summary": "Get site settings",
        "description": "Retrieves the current settings for a site including booking,\npayment, notification, and membership configuration.\n",
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "required": true,
            "description": "The site ID to get settings for",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "in": "query",
            "description": "Optional location ID for location-specific settings",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Site settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Settings"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "patch": {
        "operationId": "updateSettings",
        "summary": "Update site settings",
        "description": "**Not yet implemented.** Settings update requires multiple GraphQL mutations.\nUse the GraphQL API directly to update specific settings categories.\n",
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "required": true,
            "description": "The site ID to update settings for",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSettingsRequest"
              }
            }
          }
        },
        "responses": {
          "501": {
            "description": "Not implemented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "object": "error",
                  "status": 501,
                  "type": "api_error",
                  "code": "NOT_IMPLEMENTED",
                  "message": "Settings update is not yet implemented via GraphQL.",
                  "suggestion": "Use the GraphQL API directly to update specific settings categories."
                }
              }
            }
          }
        }
      }
    },
    "/content/entries": {
      "get": {
        "operationId": "listContentEntries",
        "summary": "List content entries",
        "description": "Returns a paginated list of published content entries filtered by type,\ntags, category, site targeting, and full-text search.\nSupports ETag caching based on CmsContentChangeVersion.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "$ref": "#/components/parameters/ContentLimit"
          },
          {
            "$ref": "#/components/parameters/ContentTypeFilter"
          },
          {
            "$ref": "#/components/parameters/ContentTagsFilter"
          },
          {
            "$ref": "#/components/parameters/ContentTagsMatchFilter"
          },
          {
            "$ref": "#/components/parameters/ContentCategoryFilter"
          },
          {
            "$ref": "#/components/parameters/ContentStatusFilter"
          },
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          },
          {
            "$ref": "#/components/parameters/ContentSearchFilter"
          },
          {
            "$ref": "#/components/parameters/ContentInstructorFilter"
          },
          {
            "$ref": "#/components/parameters/ContentPackageFilter"
          },
          {
            "$ref": "#/components/parameters/ContentCreatedAtLevelFilter"
          },
          {
            "$ref": "#/components/parameters/ContentCreatedAtSiteIdFilter"
          },
          {
            "$ref": "#/components/parameters/ContentSortFilter"
          },
          {
            "$ref": "#/components/parameters/ContentPreviewFilter"
          },
          {
            "$ref": "#/components/parameters/Expand"
          }
        ],
        "responses": {
          "200": {
            "description": "List of content entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentEntryList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/content/entries/{id}": {
      "get": {
        "operationId": "getContentEntry",
        "summary": "Get content entry",
        "description": "Retrieves a single content entry with all resolved references\nincluding full body HTML, instructor, category, and tags.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          },
          {
            "$ref": "#/components/parameters/ContentPreviewFilter"
          }
        ],
        "responses": {
          "200": {
            "description": "Content entry details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentEntry"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/content/categories": {
      "get": {
        "operationId": "listContentCategories",
        "summary": "List content categories",
        "description": "Returns the category tree with subcategories and content counts.\nEmpty categories are excluded by default.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          },
          {
            "name": "includeEmpty",
            "in": "query",
            "description": "Include categories with 0 published entries",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "$ref": "#/components/parameters/ContentPreviewFilter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of content categories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentCategoryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/banners": {
      "get": {
        "operationId": "listContentBanners",
        "summary": "List content banners",
        "description": "Returns banners filtered by placement, site, and package context.\nSupports carousel grouping and tag-based filtering.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "name": "placement",
            "in": "query",
            "description": "Banner type filter",
            "schema": {
              "type": "string",
              "enum": [
                "home_banner",
                "more_banner",
                "package_banner",
                "cms_banner"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          },
          {
            "$ref": "#/components/parameters/ContentPackageFilter"
          },
          {
            "$ref": "#/components/parameters/ContentTagsFilter"
          },
          {
            "name": "group",
            "in": "query",
            "description": "Carousel group filter",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Max results (1-50, default 10)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "$ref": "#/components/parameters/ContentPreviewFilter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of banners",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentBannerList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/tags": {
      "get": {
        "operationId": "listContentTags",
        "summary": "List content tags",
        "description": "Returns all tags available for content filtering. Tags are derived\nfrom Packages and Membership Categories that are referenced by at\nleast one published content entry.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Filter by tag source type",
            "schema": {
              "type": "string",
              "enum": [
                "package",
                "category"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search tag titles",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/ContentLimit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of content tags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTagList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/types": {
      "get": {
        "operationId": "listContentTypes",
        "summary": "List content types",
        "description": "Returns enabled content type definitions.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "responses": {
          "200": {
            "description": "List of content types",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentTypeList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/search": {
      "get": {
        "operationId": "searchContent",
        "summary": "Search content",
        "description": "Full-text search across published content titles and tags.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query (minimum 2 characters)",
            "schema": {
              "type": "string",
              "minLength": 2
            }
          },
          {
            "$ref": "#/components/parameters/ContentTypeFilter"
          },
          {
            "$ref": "#/components/parameters/ContentTagsFilter"
          },
          {
            "$ref": "#/components/parameters/ContentCategoryFilter"
          },
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Results per page (1-50, default 10)",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentEntryList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/features": {
      "get": {
        "operationId": "listContentFeatures",
        "summary": "List feature content",
        "description": "Feature content (challenges, metrics, awards) filtered by site.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          },
          {
            "name": "type",
            "in": "query",
            "description": "Feature type filter",
            "schema": {
              "type": "string",
              "enum": [
                "challenge",
                "metric",
                "award",
                "headline_message",
                "walkthrough"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of feature content entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentEntryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/media": {
      "get": {
        "operationId": "listMediaAssets",
        "summary": "List media assets",
        "description": "Returns a paginated list of media assets (images, videos, documents)\nvisible to the requesting context.\n",
        "tags": [
          "Media"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "name": "mediaType",
            "in": "query",
            "description": "Filter by media type",
            "schema": {
              "type": "string",
              "enum": [
                "IMAGE",
                "VIDEO",
                "DOCUMENT"
              ]
            }
          },
          {
            "name": "folder",
            "in": "query",
            "description": "Virtual folder path (e.g., banners/hero)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tags",
            "in": "query",
            "description": "Comma-separated free-form media tags",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search across title, filename, altText",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          }
        ],
        "responses": {
          "200": {
            "description": "List of media assets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAssetList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/content/media/{contentMediaId}": {
      "get": {
        "operationId": "getMediaAsset",
        "summary": "Get media asset",
        "description": "Retrieves a single media asset with full metadata and processing\nstatus for videos.\n",
        "tags": [
          "Media"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentMediaId"
          }
        ],
        "responses": {
          "200": {
            "description": "Media asset details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaAsset"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/content/media/{contentMediaId}/playback": {
      "get": {
        "operationId": "getMediaPlayback",
        "summary": "Get video playback URLs",
        "description": "Returns signed HLS manifest and MP4 fallback URLs with 24-hour expiry.\nIncludes available quality levels for the video player.\n",
        "tags": [
          "Media"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentMediaId"
          }
        ],
        "responses": {
          "200": {
            "description": "Video playback URLs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPlayback"
                }
              }
            }
          },
          "400": {
            "description": "Video upload incomplete",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Video is still processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/content/media/{contentMediaId}/variants": {
      "get": {
        "operationId": "getMediaVariants",
        "summary": "Get image variants",
        "description": "Returns all generated image variants (thumbnail, small, medium, large)\nwith dimensions for an image asset.\n",
        "tags": [
          "Media"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentMediaId"
          }
        ],
        "responses": {
          "200": {
            "description": "Image variant URLs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaVariants"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/content/{id}/status": {
      "get": {
        "operationId": "getContentStatus",
        "summary": "Get content viewing status",
        "description": "Returns the member's viewing/completion status for a single content item.\nReturns status with progressPercent 0 if the member has never accessed the content.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Content status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "put": {
        "operationId": "updateContentStatus",
        "summary": "Update content viewing progress",
        "description": "Update viewing progress for a content item.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateContentStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated content status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/content/status/bulk": {
      "get": {
        "operationId": "bulkGetContentStatus",
        "summary": "Bulk content status lookup",
        "description": "Returns viewing/completion status for up to 100 content IDs.\nIDs without a status record are omitted from the response.\n",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "bulk"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "ids",
            "in": "query",
            "required": true,
            "description": "Comma-separated content entry IDs (max 100)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bulk content status list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentStatusList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/content/my-list": {
      "get": {
        "operationId": "listFavorites",
        "summary": "List favorites (My List)",
        "description": "Returns the member's saved/favorited content items.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of favorites",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentFavoriteList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/content/{id}/favorite": {
      "post": {
        "operationId": "addFavorite",
        "summary": "Add to favorites",
        "description": "Adds a content item to the member's favorites list.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          }
        ],
        "responses": {
          "201": {
            "description": "Content added to favorites",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContentFavorite"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "removeFavorite",
        "summary": "Remove from favorites",
        "description": "Removes a content item from the member's favorites list.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed from favorites"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/content/{id}/watch-later": {
      "post": {
        "operationId": "addWatchLater",
        "summary": "Add to Watch Later",
        "description": "Adds a content item to the member's Watch Later queue.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          }
        ],
        "responses": {
          "201": {
            "description": "Added to Watch Later queue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchLaterEntry"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "removeWatchLater",
        "summary": "Remove from Watch Later",
        "description": "Removes a content item from the member's Watch Later queue.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentEntryId"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed from Watch Later"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/content/watch-later": {
      "get": {
        "operationId": "listWatchLater",
        "summary": "List Watch Later queue",
        "description": "Returns the member's Watch Later list, most recent first.",
        "tags": [
          "Content"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Watch Later list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatchLaterEntryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/challenges": {
      "get": {
        "operationId": "listChallenges",
        "summary": "List challenges",
        "description": "Returns available and enrolled challenges for the member's site.\nRequires Experience theme to be enabled.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Filter by enrollment status",
            "schema": {
              "type": "string",
              "enum": [
                "available",
                "enrolled",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of challenges",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/history": {
      "get": {
        "operationId": "listChallengeHistory",
        "summary": "List past challenges",
        "description": "Returns completed, withdrawn, and expired challenge enrollments.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of past challenges",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}": {
      "get": {
        "operationId": "getChallenge",
        "summary": "Get challenge",
        "description": "Single challenge detail with enrollment status.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "responses": {
          "200": {
            "description": "Challenge details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Challenge"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/challenges/{id}/enroll": {
      "post": {
        "operationId": "enrollInChallenge",
        "summary": "Enroll in challenge",
        "description": "Join a challenge. Validates package eligibility and enrollment window.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChallengeEnrollRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeEnrollment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Package required or theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Already enrolled, not started, ended, or enrollment closed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "withdrawFromChallenge",
        "summary": "Withdraw from challenge",
        "description": "Withdraw from an enrolled challenge.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "responses": {
          "200": {
            "description": "Withdrawn from challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeEnrollment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/goals": {
      "get": {
        "operationId": "getChallengeGoals",
        "summary": "Get committed goals",
        "description": "Returns committed goals and daily progress for a challenge.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          },
          {
            "name": "day",
            "in": "query",
            "description": "Filter to specific day number",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Goal commitment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeGoalCommitment"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled or goals not committed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/goals/commit": {
      "post": {
        "operationId": "commitChallengeGoals",
        "summary": "Commit to goals",
        "description": "Commit to goals for a challenge enrollment. This is a one-time action\nand cannot be changed after submission.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChallengeGoalCommitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Goals committed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeGoalCommitment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled, already committed, or exceeds max goals",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/goals/submit": {
      "post": {
        "operationId": "submitChallengeGoalLog",
        "summary": "Submit daily goal completion",
        "description": "Submit daily goal completion status for committed goals.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChallengeGoalSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Goal log recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeGoalLog"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled or goals not committed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/goals/history": {
      "get": {
        "operationId": "listChallengeGoalHistory",
        "summary": "List goal history",
        "description": "Daily goal log history across all days.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 30
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Goal log history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeGoalLogList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled or goals not committed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/assessments": {
      "get": {
        "operationId": "listChallengeAssessments",
        "summary": "List assessment schedule",
        "description": "Returns assessment schedule with submitted values for each assessment day.\nEmpty assessments array indicates a pending assessment day.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "responses": {
          "200": {
            "description": "Assessment schedule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeAssessmentList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/assessments/submit": {
      "post": {
        "operationId": "submitChallengeAssessment",
        "summary": "Submit assessment",
        "description": "Submit assessment measurements for a scheduled assessment day.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChallengeAssessmentSubmitRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Assessment submitted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeAssessment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled, invalid assessment day, or grace period expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/assessments/{assessmentId}": {
      "put": {
        "operationId": "updateChallengeAssessment",
        "summary": "Edit assessment",
        "description": "Edit a previously submitted assessment value.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          },
          {
            "name": "assessmentId",
            "in": "path",
            "required": true,
            "description": "Assessment ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChallengeAssessmentUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Assessment updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeAssessment"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled or invalid assessment day",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/attendance": {
      "get": {
        "operationId": "getChallengeAttendance",
        "summary": "Get attendance progress",
        "description": "Returns attendance progress and recent event timeline for a challenge.\nAttendance is recorded automatically via check-in reconciliation.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "responses": {
          "200": {
            "description": "Attendance progress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeAttendance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/articles": {
      "get": {
        "operationId": "listChallengeArticles",
        "summary": "List challenge articles",
        "description": "Returns challenge articles with read/unread status.",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "responses": {
          "200": {
            "description": "Challenge articles with status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeArticleStatusList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/articles/{articleId}/read": {
      "post": {
        "operationId": "markChallengeArticleRead",
        "summary": "Mark article as read",
        "description": "Marks a challenge article as read. Idempotent — calling again on\nan already-read article returns the same result.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          },
          {
            "name": "articleId",
            "in": "path",
            "required": true,
            "description": "Article content entry ID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Article marked as read",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeArticleStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Not enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/challenges/{id}/progress": {
      "get": {
        "operationId": "getChallengeProgress",
        "summary": "Get challenge progress",
        "description": "Returns combined progress summary across all challenge dimensions\nincluding attendance, goals, assessments, and articles.\n",
        "tags": [
          "Challenges"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ChallengeId"
          }
        ],
        "responses": {
          "200": {
            "description": "Challenge progress summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChallengeProgress"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "409": {
            "description": "Not enrolled in challenge",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/metrics": {
      "get": {
        "operationId": "listMetrics",
        "summary": "List metrics",
        "description": "Returns available metrics with the member's personal best summary.\nRequires Experience theme to be enabled.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "description": "Filter by metric category",
            "schema": {
              "type": "string",
              "enum": [
                "STRENGTH",
                "CARDIO",
                "MOBILITY",
                "ENDURANCE",
                "POWER"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Title search (case-insensitive prefix)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of metrics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/metrics/{contentEntryId}": {
      "get": {
        "operationId": "getMetric",
        "summary": "Get metric detail",
        "description": "Returns metric detail with per-variable personal bests and recent history.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MetricContentEntryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Metric details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metric"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/metrics/entries": {
      "post": {
        "operationId": "createMetricEntry",
        "summary": "Log metric entry",
        "description": "Log a new metric result. Triggers personal best recalculation\nwithin the same Spanner transaction.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMetricEntryRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Metric entry created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricEntry"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/metrics/entries/{metricEntryId}": {
      "put": {
        "operationId": "updateMetricEntry",
        "summary": "Update metric entry",
        "description": "Update an existing metric entry. Triggers personal best recalculation.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MetricEntryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMetricEntryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Metric entry updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricEntry"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "delete": {
        "operationId": "deleteMetricEntry",
        "summary": "Delete metric entry",
        "description": "Soft-delete a metric entry. Triggers personal best recalculation\nfrom remaining active entries.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MetricEntryId"
          }
        ],
        "responses": {
          "204": {
            "description": "Metric entry deleted"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/metrics/{contentEntryId}/history": {
      "get": {
        "operationId": "getMetricHistory",
        "summary": "Get metric history",
        "description": "Paginated time-series for a metric with chart-ready data points.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MetricContentEntryId"
          },
          {
            "name": "variable",
            "in": "query",
            "description": "Filter by variable name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Metric history with chart data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricHistoryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/metrics/personal-bests": {
      "get": {
        "operationId": "listPersonalBests",
        "summary": "List personal bests",
        "description": "Returns all personal best records for the authenticated member.",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "List of personal bests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricPersonalBestList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/metrics/entries/{metricEntryId}/share": {
      "post": {
        "operationId": "shareMetricEntry",
        "summary": "Generate share link",
        "description": "Generates a shareable link for a metric entry.",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/MetricEntryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Share link generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetricShare"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/preferences/units": {
      "get": {
        "operationId": "getUnitPreference",
        "summary": "Get unit preference",
        "description": "Returns the member's unit system preference (METRIC or IMPERIAL).",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Unit preference",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitPreference"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "put": {
        "operationId": "updateUnitPreference",
        "summary": "Set unit preference",
        "description": "Set the member's unit system preference. When set to IMPERIAL,\nall displayValue fields in metric responses are converted.\n",
        "tags": [
          "Metrics"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUnitPreferenceRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Unit preference updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnitPreference"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/leaderboards": {
      "get": {
        "operationId": "listLeaderboards",
        "summary": "List leaderboards",
        "description": "Returns active leaderboards visible to the member at their current site.\nRequires Experience theme to be enabled.\n",
        "tags": [
          "Leaderboards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Filter by leaderboard type",
            "schema": {
              "type": "string",
              "enum": [
                "ATTENDANCE",
                "CHALLENGE",
                "METRIC",
                "STREAK"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of leaderboards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/leaderboards/summary": {
      "get": {
        "operationId": "getLeaderboardSummary",
        "summary": "Get leaderboard summary",
        "description": "Returns the member's best rankings across all leaderboards.",
        "tags": [
          "Leaderboards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Leaderboard summary",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardSummary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/leaderboards/{id}": {
      "get": {
        "operationId": "getLeaderboard",
        "summary": "Get leaderboard with rankings",
        "description": "Returns a single leaderboard with paginated ranking entries.\n",
        "tags": [
          "Leaderboards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LeaderboardId"
          },
          {
            "name": "period",
            "in": "query",
            "description": "Period key (e.g., 2026-03, 2026-W12, ALL_TIME)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Leaderboard with rankings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Leaderboard"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "503": {
            "description": "Leaderboard rankings not yet computed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/leaderboards/{id}/my-rank": {
      "get": {
        "operationId": "getMyLeaderboardRank",
        "summary": "Get my rank",
        "description": "Returns the member's position with surrounding entries for context.\nReturns null if the member is not ranked.\n",
        "tags": [
          "Leaderboards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LeaderboardId"
          },
          {
            "name": "period",
            "in": "query",
            "description": "Period key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "above",
            "in": "query",
            "description": "Number of entries above to include",
            "schema": {
              "type": "integer",
              "default": 2
            }
          },
          {
            "name": "below",
            "in": "query",
            "description": "Number of entries below to include",
            "schema": {
              "type": "integer",
              "default": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Member rank with surrounding entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardMyRank"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/leaderboards/{id}/top": {
      "get": {
        "operationId": "getLeaderboardTop",
        "summary": "Get top entries",
        "description": "Top N entries for widget/card display.",
        "tags": [
          "Leaderboards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LeaderboardId"
          },
          {
            "name": "period",
            "in": "query",
            "description": "Period key",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top leaderboard entries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardEntryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/leaderboards/{id}/periods": {
      "get": {
        "operationId": "listLeaderboardPeriods",
        "summary": "List available periods",
        "description": "Returns available periods for a leaderboard.",
        "tags": [
          "Leaderboards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/LeaderboardId"
          }
        ],
        "responses": {
          "200": {
            "description": "List of periods",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardPeriodList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/awards": {
      "get": {
        "operationId": "listAwards",
        "summary": "List awards",
        "description": "Returns all published awards for the member's site with earned/locked status.\nRequires Experience theme to be enabled.\n",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "required": true,
            "description": "Filter awards targeted to this site",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "awardType",
            "in": "query",
            "description": "Filter by award type",
            "schema": {
              "type": "string",
              "enum": [
                "ATTENDANCE_MILESTONE",
                "ATTENDANCE_TOTAL",
                "STREAK",
                "CUSTOM"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of awards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwardList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/awards/earned": {
      "get": {
        "operationId": "listEarnedAwards",
        "summary": "List earned awards",
        "description": "Only earned awards (PENDING or ACHIEVED status).",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "required": true,
            "description": "Filter awards targeted to this site",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "awardType",
            "in": "query",
            "description": "Filter by award type",
            "schema": {
              "type": "string",
              "enum": [
                "ATTENDANCE_MILESTONE",
                "ATTENDANCE_TOTAL",
                "STREAK",
                "CUSTOM"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of earned awards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwardList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/awards/{awardId}": {
      "get": {
        "operationId": "getAward",
        "summary": "Get award detail",
        "description": "Returns a single award detail with progress.",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AwardId"
          }
        ],
        "responses": {
          "200": {
            "description": "Award details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Award"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/awards/banner": {
      "get": {
        "operationId": "getAwardBanner",
        "summary": "Get pending award banner",
        "description": "Returns the oldest pending award banner (FIFO). Mobile app calls\nthis on launch and after check-in. Returns 204 when no pending banners.\n",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Pending award banner",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AwardBanner"
                }
              }
            }
          },
          "204": {
            "description": "No pending banners"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/awards/banner/{awardId}/dismiss": {
      "put": {
        "operationId": "dismissAwardBanner",
        "summary": "Dismiss award banner",
        "description": "Dismiss a pending award banner, transitioning the award status\nfrom PENDING to ACHIEVED.\n",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AwardId"
          }
        ],
        "responses": {
          "200": {
            "description": "Award banner dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Award"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Award banner already dismissed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/streaks": {
      "get": {
        "operationId": "listStreaks",
        "summary": "List attendance streaks",
        "description": "Returns current streak info per site. Requires Experience theme.\n",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of streaks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StreakList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/milestones": {
      "get": {
        "operationId": "listMilestones",
        "summary": "List milestones",
        "description": "Returns lifetime attendance milestones with progress toward\nnext threshold. Requires Experience theme.\n",
        "tags": [
          "Awards"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentSiteIdFilter"
          }
        ],
        "responses": {
          "200": {
            "description": "List of milestones",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MilestoneList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Experience theme not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/video/sessions": {
      "post": {
        "operationId": "createVideoSession",
        "summary": "Start video playback session",
        "description": "Start a new video playback session. Returns a session ID and the\nresume position from a previous session (if any).\n",
        "tags": [
          "Video"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVideoSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Playback session started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPlaybackSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "description": "Video is still processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/member/video/sessions/{sessionId}/heartbeat": {
      "put": {
        "operationId": "sendVideoHeartbeat",
        "summary": "Update playback progress",
        "description": "Update playback progress. Called every 10-15 seconds during active\nplayback. Accepts a single heartbeat or batched array.\n",
        "tags": [
          "Video"
        ],
        "x-rate-limit": {
          "category": "write",
          "limit": 30,
          "window": 60
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VideoSessionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/VideoHeartbeat"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/VideoHeartbeat"
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Progress updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPlaybackSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/video/sessions/{sessionId}/complete": {
      "put": {
        "operationId": "completeVideoSession",
        "summary": "Mark session as completed",
        "description": "Mark a playback session as completed. Triggers content status\nupdate and analytics event.\n",
        "tags": [
          "Video"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VideoSessionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Session marked as completed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPlaybackSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/video/sessions/{sessionId}/end": {
      "put": {
        "operationId": "endVideoSession",
        "summary": "End playback session",
        "description": "End a playback session (pause/close). Saves the final position\nfor future resume. Sets status to PAUSED.\n",
        "tags": [
          "Video"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/VideoSessionId"
          }
        ],
        "responses": {
          "200": {
            "description": "Session ended",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoPlaybackSession"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/video/resume/{contentMediaId}": {
      "get": {
        "operationId": "getVideoResumePosition",
        "summary": "Get resume position",
        "description": "Returns the resume position for a specific video based on the\nlatest playback session.\n",
        "tags": [
          "Video"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ContentMediaId"
          }
        ],
        "responses": {
          "200": {
            "description": "Resume position",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoResume"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/member/video/history": {
      "get": {
        "operationId": "listVideoWatchHistory",
        "summary": "List watch history",
        "description": "Returns the member's video watch history, grouped by video\n(most recent session per video), paginated by most recent first.\n",
        "tags": [
          "Video"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          }
        ],
        "responses": {
          "200": {
            "description": "Video watch history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoWatchHistoryList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/experience/status": {
      "get": {
        "operationId": "getExperienceStatus",
        "summary": "Get Experience theme status",
        "description": "Check Experience theme entitlement for the authenticated member's\ncorporate. Does NOT require the Experience theme to be enabled.\n",
        "tags": [
          "Experience"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Experience theme status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExperienceStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/member/notifications/preferences": {
      "get": {
        "operationId": "getNotificationPreferences",
        "summary": "Get notification preferences",
        "description": "Returns the member's notification preference toggles for Content Suite features.",
        "tags": [
          "Notifications"
        ],
        "x-rate-limit": {
          "category": "read"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Notification preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferences"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "put": {
        "operationId": "updateNotificationPreferences",
        "summary": "Update notification preferences",
        "description": "Updates notification preference toggles. Partial updates supported —\nonly provided keys are changed.\n",
        "tags": [
          "Notifications"
        ],
        "x-rate-limit": {
          "category": "write"
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateNotificationPreferencesRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated notification preferences",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferences"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Hapana-API-Key",
        "description": "API key for authentication"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "OAuth 2.0 Bearer token"
      }
    },
    "parameters": {
      "StartingAfter": {
        "name": "starting_after",
        "in": "query",
        "description": "Cursor for pagination. Returns results after this ID.",
        "schema": {
          "type": "string"
        }
      },
      "EndingBefore": {
        "name": "ending_before",
        "in": "query",
        "description": "Cursor for pagination. Returns results before this ID.",
        "schema": {
          "type": "string"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Number of results to return (1-100, default 10)",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        }
      },
      "Expand": {
        "name": "expand[]",
        "in": "query",
        "description": "Related objects to expand inline. Can be specified multiple times.\nExample: `?expand[]=client&expand[]=session`\n",
        "style": "form",
        "explode": true,
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "x-expandable": true
      },
      "WebhookId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Webhook endpoint ID (we_...)",
        "schema": {
          "type": "string",
          "pattern": "^we_[a-f0-9-]+$"
        }
      },
      "DeliveryId": {
        "name": "deliveryId",
        "in": "path",
        "required": true,
        "description": "Webhook delivery ID (del_...)",
        "schema": {
          "type": "string",
          "pattern": "^del_[a-f0-9-]+$"
        }
      },
      "ClientId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Client ID (client_...)",
        "schema": {
          "type": "string",
          "pattern": "^client_[a-f0-9-]+$"
        }
      },
      "BookingId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Booking ID (booking_...)",
        "schema": {
          "type": "string",
          "pattern": "^booking_[a-f0-9-]+$"
        }
      },
      "SessionId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Session ID (session_...)",
        "schema": {
          "type": "string",
          "pattern": "^session_[a-f0-9-]+$"
        }
      },
      "PaymentId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Payment ID (payment_...)",
        "schema": {
          "type": "string",
          "pattern": "^payment_[a-f0-9-]+$"
        }
      },
      "PackageId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Package ID (package_...)",
        "schema": {
          "type": "string",
          "pattern": "^package_[a-f0-9-]+$"
        }
      },
      "CheckinId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Check-in ID (checkin_...)",
        "schema": {
          "type": "string",
          "pattern": "^checkin_[a-f0-9-]+$"
        }
      },
      "SiteId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Site ID (UUID format)",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "StaffId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Staff member ID (UUID format)",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "InstructorId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Instructor ID (UUID format)",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ScheduleId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Schedule ID (UUID format)",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "WebhookStatusFilter": {
        "name": "status",
        "in": "query",
        "description": "Filter by webhook status",
        "schema": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled",
            "failing"
          ]
        }
      },
      "DeliveryStatusFilter": {
        "name": "status",
        "in": "query",
        "description": "Filter by delivery status",
        "schema": {
          "type": "string",
          "enum": [
            "pending",
            "success",
            "failed",
            "retrying"
          ]
        }
      },
      "ContentEntryId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Content entry ID (cnt_...)",
        "schema": {
          "type": "string"
        }
      },
      "ContentMediaId": {
        "name": "contentMediaId",
        "in": "path",
        "required": true,
        "description": "Media asset ID",
        "schema": {
          "type": "string"
        }
      },
      "ChallengeId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Challenge content entry ID",
        "schema": {
          "type": "string"
        }
      },
      "LeaderboardId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "Leaderboard config ID (lb_...)",
        "schema": {
          "type": "string"
        }
      },
      "AwardId": {
        "name": "awardId",
        "in": "path",
        "required": true,
        "description": "Award content entry ID",
        "schema": {
          "type": "string"
        }
      },
      "MetricContentEntryId": {
        "name": "contentEntryId",
        "in": "path",
        "required": true,
        "description": "Metric content entry ID",
        "schema": {
          "type": "string"
        }
      },
      "MetricEntryId": {
        "name": "metricEntryId",
        "in": "path",
        "required": true,
        "description": "Metric entry ID",
        "schema": {
          "type": "string"
        }
      },
      "VideoSessionId": {
        "name": "sessionId",
        "in": "path",
        "required": true,
        "description": "Video playback session ID",
        "schema": {
          "type": "string"
        }
      },
      "ContentLimit": {
        "name": "limit",
        "in": "query",
        "description": "Results per page (1-100, embed widgets support 1-500)",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        }
      },
      "ContentTypeFilter": {
        "name": "type",
        "in": "query",
        "description": "Filter by content type slug (comma-separated for multiple)",
        "schema": {
          "type": "string"
        }
      },
      "ContentTagsFilter": {
        "name": "tags",
        "in": "query",
        "description": "Filter by tag IDs (comma-separated, OR logic by default)",
        "schema": {
          "type": "string"
        }
      },
      "ContentTagsMatchFilter": {
        "name": "tags_match",
        "in": "query",
        "description": "Tag matching logic when multiple tags specified",
        "schema": {
          "type": "string",
          "enum": [
            "any",
            "all"
          ],
          "default": "any"
        }
      },
      "ContentCategoryFilter": {
        "name": "category",
        "in": "query",
        "description": "Filter by category ID (includes subcategories)",
        "schema": {
          "type": "string"
        }
      },
      "ContentStatusFilter": {
        "name": "status",
        "in": "query",
        "description": "Content publication status filter",
        "schema": {
          "type": "string",
          "enum": [
            "published",
            "draft",
            "scheduled",
            "archived",
            "all"
          ],
          "default": "published"
        }
      },
      "ContentSiteIdFilter": {
        "name": "siteId",
        "in": "query",
        "description": "Filter by target site ID",
        "schema": {
          "type": "string"
        }
      },
      "ContentSearchFilter": {
        "name": "search",
        "in": "query",
        "description": "Full-text search across title, description, and tags (min 2 chars)",
        "schema": {
          "type": "string",
          "minLength": 2
        }
      },
      "ContentInstructorFilter": {
        "name": "instructorId",
        "in": "query",
        "description": "Filter by instructor association",
        "schema": {
          "type": "string"
        }
      },
      "ContentPackageFilter": {
        "name": "packageId",
        "in": "query",
        "description": "Filter by package association",
        "schema": {
          "type": "string"
        }
      },
      "ContentCreatedAtLevelFilter": {
        "name": "createdAtLevel",
        "in": "query",
        "description": "Filter by content ownership level",
        "schema": {
          "type": "string",
          "enum": [
            "corporate",
            "site"
          ]
        }
      },
      "ContentCreatedAtSiteIdFilter": {
        "name": "createdAtSiteId",
        "in": "query",
        "description": "Filter by source site for site-created content",
        "schema": {
          "type": "string"
        }
      },
      "ContentSortFilter": {
        "name": "sort",
        "in": "query",
        "description": "Sort order for content listing",
        "schema": {
          "type": "string",
          "enum": [
            "publishedAt_desc",
            "publishedAt_asc",
            "title_asc",
            "title_desc",
            "sortOrder_asc",
            "updatedAt_desc"
          ],
          "default": "publishedAt_desc"
        }
      },
      "ContentPreviewFilter": {
        "name": "preview",
        "in": "query",
        "description": "When true, returns DRAFT + SCHEDULED + PUBLISHED content.\nRequires staff auth (not member auth). Used for admin/staff preview mode.\n",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid request parameters",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "object": "error",
              "status": 400,
              "type": "invalid_request_error",
              "code": "VALIDATION_REQUIRED_FIELD",
              "message": "A required field is missing.",
              "param": "email",
              "suggestion": "Check the API documentation for required fields.",
              "docUrl": "https://docs.hapana.com/errors/VALIDATION_REQUIRED_FIELD",
              "requestId": "req_abc123"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Authentication required or invalid",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "object": "error",
              "status": 401,
              "type": "authentication_error",
              "code": "AUTH_KEY_REQUIRED",
              "message": "API key is required for this endpoint.",
              "suggestion": "Include your API key in the X-Hapana-API-Key header.",
              "docUrl": "https://docs.hapana.com/errors/AUTH_KEY_REQUIRED",
              "requestId": "req_abc123"
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "object": "error",
              "status": 404,
              "type": "invalid_request_error",
              "code": "WEBHOOK_NOT_FOUND",
              "message": "The specified webhook endpoint was not found.",
              "param": "id",
              "suggestion": "Verify the webhook ID is correct.",
              "docUrl": "https://docs.hapana.com/errors/WEBHOOK_NOT_FOUND",
              "requestId": "req_abc123"
            }
          }
        }
      },
      "Conflict": {
        "description": "Resource conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded",
        "headers": {
          "X-RateLimit-Limit": {
            "schema": {
              "type": "integer"
            },
            "description": "Requests allowed per minute"
          },
          "X-RateLimit-Remaining": {
            "schema": {
              "type": "integer"
            },
            "description": "Requests remaining in current window"
          },
          "X-RateLimit-Reset": {
            "schema": {
              "type": "integer"
            },
            "description": "Unix timestamp when the rate limit resets"
          },
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds until rate limit resets"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "object": "error",
              "status": 429,
              "type": "rate_limit_error",
              "code": "RATE_LIMIT_EXCEEDED",
              "message": "Too many requests. Rate limit exceeded.",
              "suggestion": "Wait for the rate limit to reset.",
              "docUrl": "https://docs.hapana.com/errors/RATE_LIMIT_EXCEEDED",
              "requestId": "req_abc123"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Twilio-style error response",
        "required": [
          "object",
          "status",
          "type",
          "code",
          "message"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "error"
          },
          "status": {
            "type": "integer",
            "description": "HTTP status code",
            "example": 400
          },
          "type": {
            "type": "string",
            "description": "Error category",
            "enum": [
              "authentication_error",
              "invalid_request_error",
              "rate_limit_error",
              "api_error"
            ]
          },
          "code": {
            "type": "string",
            "description": "Machine-readable error code",
            "example": "VALIDATION_REQUIRED_FIELD"
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message",
            "example": "A required field is missing."
          },
          "param": {
            "type": "string",
            "description": "The parameter that caused the error",
            "example": "email"
          },
          "suggestion": {
            "type": "string",
            "description": "Actionable suggestion for fixing the error",
            "example": "Check the API documentation for required fields."
          },
          "docUrl": {
            "type": "string",
            "format": "uri",
            "description": "Link to documentation about this error",
            "example": "https://docs.hapana.com/errors/VALIDATION_REQUIRED_FIELD"
          },
          "requestId": {
            "type": "string",
            "description": "Unique request identifier for debugging",
            "example": "req_abc123"
          }
        }
      },
      "Deleted": {
        "type": "object",
        "description": "Confirmation of resource deletion",
        "required": [
          "object",
          "id",
          "deleted"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "deleted"
          },
          "id": {
            "type": "string",
            "description": "ID of the deleted resource"
          },
          "deleted": {
            "type": "boolean",
            "const": true
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "object",
          "status",
          "service",
          "version",
          "timestamp"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "health"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded",
              "down"
            ]
          },
          "service": {
            "type": "string",
            "example": "hapana-public-api"
          },
          "version": {
            "type": "string",
            "example": "2.0.0"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ApiInfo": {
        "type": "object",
        "required": [
          "object",
          "name",
          "version",
          "documentation",
          "status"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "api_info"
          },
          "name": {
            "type": "string",
            "example": "Hapana Public API"
          },
          "version": {
            "type": "string",
            "description": "API version in YYYY-MM-DD format",
            "example": "2026-01-10"
          },
          "documentation": {
            "type": "string",
            "format": "uri",
            "example": "https://docs.hapana.com/api"
          },
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "maintenance"
            ]
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "required": [
          "object",
          "id",
          "url",
          "enabledEvents",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "webhook_endpoint"
          },
          "id": {
            "type": "string",
            "description": "Unique webhook endpoint ID",
            "example": "we_abc123"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS URL to receive webhook events",
            "example": "https://example.com/webhooks/hapana"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional description",
            "maxLength": 500
          },
          "enabledEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "description": "Event types this endpoint receives"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "failing"
            ],
            "description": "Endpoint status:\n- `enabled`: Receiving events normally\n- `failing`: 5+ consecutive failures, still receiving\n- `disabled`: 10+ consecutive failures, auto-disabled\n"
          },
          "consecutiveFailures": {
            "type": "integer",
            "description": "Number of consecutive delivery failures",
            "example": 0
          },
          "secret": {
            "type": "string",
            "description": "Signing secret for verifying webhook signatures.\nOnly returned when creating or rotating the secret.\n",
            "example": "whsec_abc123..."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookEventType": {
        "type": "string",
        "description": "Webhook event type",
        "enum": [
          "client.created",
          "client.updated",
          "client.deleted",
          "client.merged",
          "booking.created",
          "booking.cancelled",
          "booking.checked_in",
          "booking.no_show",
          "booking.waitlist_promoted",
          "session.created",
          "session.updated",
          "session.cancelled",
          "payment.created",
          "payment.failed",
          "payment.refunded",
          "package.purchased",
          "package.cancelled",
          "package.expired",
          "checkin.created"
        ]
      },
      "CreateWebhookRequest": {
        "type": "object",
        "required": [
          "url",
          "enabledEvents"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS URL to receive webhook events",
            "example": "https://example.com/webhooks/hapana"
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Optional description"
          },
          "enabledEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "minItems": 1,
            "description": "Event types to subscribe to"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Custom metadata"
          }
        }
      },
      "UpdateWebhookRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Updated HTTPS URL"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500
          },
          "enabledEvents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventType"
            },
            "minItems": 1,
            "description": "Updated event subscriptions (replaces existing)"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "Enable or disable the endpoint"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "WebhookEndpointList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          },
          "hasMore": {
            "type": "boolean",
            "description": "Whether more results are available"
          },
          "url": {
            "type": "string",
            "description": "API endpoint URL for this list",
            "example": "/v2/webhooks"
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "required": [
          "object",
          "id",
          "webhookId",
          "eventId",
          "eventType",
          "status",
          "attemptNumber",
          "createdAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "webhook_delivery"
          },
          "id": {
            "type": "string",
            "description": "Unique delivery ID (different per attempt)",
            "example": "del_xyz789"
          },
          "webhookId": {
            "type": "string",
            "description": "Webhook endpoint ID",
            "example": "we_abc123"
          },
          "eventId": {
            "type": "string",
            "description": "Event ID (same across retries)",
            "example": "evt_def456"
          },
          "eventType": {
            "$ref": "#/components/schemas/WebhookEventType"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "success",
              "failed",
              "retrying"
            ],
            "description": "Delivery status:\n- `pending`: Queued for delivery\n- `success`: Successfully delivered (2xx response)\n- `failed`: All retry attempts exhausted\n- `retrying`: Failed, retry scheduled\n"
          },
          "responseCode": {
            "type": [
              "integer",
              "null"
            ],
            "description": "HTTP response code from endpoint",
            "example": 200
          },
          "latencyMs": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Request latency in milliseconds",
            "example": 245
          },
          "attemptNumber": {
            "type": "integer",
            "description": "Which attempt this was (1-5)",
            "minimum": 1,
            "maximum": 5,
            "example": 1
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message if delivery failed"
          },
          "redeliveryOf": {
            "type": [
              "string",
              "null"
            ],
            "description": "ID of original delivery if this is a redelivery",
            "example": "del_original123"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WebhookDeliveryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/webhooks/we_abc123/deliveries"
          }
        }
      },
      "Client": {
        "type": "object",
        "required": [
          "object",
          "id",
          "firstName",
          "lastName",
          "membershipStatus",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "client"
          },
          "id": {
            "type": "string",
            "example": "client_abc123"
          },
          "firstName": {
            "type": "string",
            "example": "John"
          },
          "lastName": {
            "type": "string",
            "example": "Doe"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "example": "john.doe@example.com"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "example": "+14155551234"
          },
          "dateOfBirth": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "emergencyContact": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "relationship": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "membershipStatus": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "suspended",
              "expired"
            ]
          },
          "homeLocationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "activePackages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Package"
            },
            "x-expandable": true,
            "description": "Active packages for this client (expandable)"
          },
          "recentBookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            },
            "x-expandable": true,
            "description": "Recent bookings for this client (expandable)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateClientRequest": {
        "type": "object",
        "required": [
          "firstName",
          "lastName"
        ],
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "dateOfBirth": {
            "type": "string",
            "format": "date"
          },
          "emergencyContact": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "relationship": {
                "type": "string"
              }
            }
          },
          "homeLocationId": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "UpdateClientRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "dateOfBirth": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "emergencyContact": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "relationship": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "homeLocationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "ClientList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Client"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/clients"
          }
        }
      },
      "Booking": {
        "type": "object",
        "required": [
          "object",
          "id",
          "clientId",
          "sessionId",
          "status",
          "bookedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "booking"
          },
          "id": {
            "type": "string",
            "example": "booking_abc123"
          },
          "clientId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "confirmed",
              "waitlisted",
              "cancelled",
              "attended",
              "noshow"
            ]
          },
          "bookedAt": {
            "type": "string",
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "checkedInAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "spotNumber": {
            "type": [
              "integer",
              "null"
            ]
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Client"
              }
            ],
            "x-expandable": true,
            "description": "Client who made the booking (expandable)"
          },
          "session": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ],
            "x-expandable": true,
            "description": "Session being booked (expandable)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateBookingRequest": {
        "type": "object",
        "required": [
          "clientId",
          "sessionId"
        ],
        "properties": {
          "clientId": {
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "spotNumber": {
            "type": "integer"
          },
          "notes": {
            "type": "string"
          },
          "waitlist": {
            "type": "boolean",
            "default": false,
            "description": "Add to waitlist if session is full"
          }
        }
      },
      "BookingList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/bookings"
          }
        }
      },
      "Session": {
        "type": "object",
        "required": [
          "object",
          "id",
          "sessionTypeId",
          "locationId",
          "startTime",
          "endTime",
          "capacity",
          "bookedCount",
          "waitlistCount",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "session"
          },
          "id": {
            "type": "string",
            "example": "session_abc123"
          },
          "sessionTypeId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "instructorId": {
            "type": [
              "string",
              "null"
            ]
          },
          "startTime": {
            "type": "string",
            "format": "date-time"
          },
          "endTime": {
            "type": "string",
            "format": "date-time"
          },
          "capacity": {
            "type": "integer"
          },
          "bookedCount": {
            "type": "integer"
          },
          "waitlistCount": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "in_progress",
              "completed",
              "cancelled"
            ]
          },
          "instructor": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Instructor"
              }
            ],
            "x-expandable": true,
            "description": "Session instructor (expandable)"
          },
          "location": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ],
            "x-expandable": true,
            "description": "Session location (expandable)"
          },
          "bookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            },
            "x-expandable": true,
            "description": "Session bookings (expandable)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "SessionList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/sessions"
          }
        }
      },
      "Instructor": {
        "type": "object",
        "required": [
          "object",
          "id",
          "firstName",
          "lastName",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "instructor"
          },
          "id": {
            "type": "string",
            "example": "instructor_abc123"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "bio": {
            "type": [
              "string",
              "null"
            ]
          },
          "photoUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "specialties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Location": {
        "type": "object",
        "required": [
          "object",
          "id",
          "brandId",
          "name",
          "address",
          "timezone",
          "isActive",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "location"
          },
          "id": {
            "type": "string",
            "example": "location_abc123"
          },
          "brandId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": "object",
            "required": [
              "street1",
              "city",
              "state",
              "postalCode",
              "country"
            ],
            "properties": {
              "street1": {
                "type": "string"
              },
              "street2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "timezone": {
            "type": "string",
            "example": "America/New_York"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "isActive": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Site": {
        "type": "object",
        "required": [
          "object",
          "id",
          "name",
          "status",
          "timezone",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "site"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "name": {
            "type": "string",
            "example": "Downtown Fitness Center"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ],
            "example": "Downtown"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "isDigital": {
            "type": "boolean",
            "description": "Whether this is a virtual/online location",
            "default": false
          },
          "address": {
            "type": "object",
            "properties": {
              "street1": {
                "type": "string"
              },
              "street2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code"
              }
            }
          },
          "timezone": {
            "type": "string",
            "example": "America/New_York"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code",
            "example": "USD"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Maximum capacity of the site"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "SiteList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Site"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/sites"
          }
        }
      },
      "CreateSiteRequest": {
        "type": "object",
        "required": [
          "name",
          "timezone"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the site"
          },
          "shortName": {
            "type": "string",
            "description": "Short display name"
          },
          "address": {
            "type": "object",
            "properties": {
              "street1": {
                "type": "string"
              },
              "street2": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code"
              }
            }
          },
          "timezone": {
            "type": "string",
            "description": "IANA timezone identifier",
            "example": "America/New_York"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code",
            "default": "USD"
          },
          "capacity": {
            "type": "integer",
            "description": "Maximum capacity of the site"
          },
          "isDigital": {
            "type": "boolean",
            "description": "Whether this is a virtual/online location",
            "default": false
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "UpdateSiteRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "shortName": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": "object",
            "properties": {
              "street1": {
                "type": "string"
              },
              "street2": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "postalCode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "timezone": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email"
          },
          "website": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "currency": {
            "type": "string"
          },
          "capacity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "Payment": {
        "type": "object",
        "required": [
          "object",
          "id",
          "clientId",
          "amount",
          "currency",
          "status",
          "paymentMethod",
          "refundedAmount",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "payment"
          },
          "id": {
            "type": "string",
            "example": "payment_abc123"
          },
          "clientId": {
            "type": "string"
          },
          "amount": {
            "type": "number",
            "description": "Amount in cents",
            "example": 5000
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "completed",
              "failed",
              "refunded",
              "partially_refunded"
            ]
          },
          "paymentMethod": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "invoiceId": {
            "type": [
              "string",
              "null"
            ]
          },
          "refundedAmount": {
            "type": "number",
            "description": "Total amount refunded in cents",
            "example": 0
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Client"
              }
            ],
            "x-expandable": true,
            "description": "Client who made the payment (expandable)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RefundPaymentRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Amount to refund in cents. If not specified, refunds the full amount."
          },
          "reason": {
            "type": "string",
            "description": "Reason for the refund"
          }
        }
      },
      "PaymentList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/payments"
          }
        }
      },
      "Package": {
        "type": "object",
        "required": [
          "object",
          "id",
          "clientId",
          "packageTypeId",
          "creditsRemaining",
          "creditsUsed",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "package"
          },
          "id": {
            "type": "string",
            "example": "package_abc123"
          },
          "clientId": {
            "type": "string"
          },
          "packageTypeId": {
            "type": "string"
          },
          "creditsRemaining": {
            "type": "integer"
          },
          "creditsUsed": {
            "type": "integer"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "expired",
              "depleted",
              "cancelled"
            ]
          },
          "client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Client"
              }
            ],
            "x-expandable": true,
            "description": "Client who owns the package (expandable)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "deletedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "PackageList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Package"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/packages"
          }
        }
      },
      "Checkin": {
        "type": "object",
        "required": [
          "object",
          "id",
          "clientId",
          "locationId",
          "checkedInAt",
          "createdAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "checkin"
          },
          "id": {
            "type": "string",
            "example": "checkin_abc123"
          },
          "clientId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          },
          "checkedInAt": {
            "type": "string",
            "format": "date-time"
          },
          "client": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Client"
              }
            ],
            "x-expandable": true,
            "description": "Client who checked in (expandable)"
          },
          "location": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ],
            "x-expandable": true,
            "description": "Check-in location (expandable)"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateCheckinRequest": {
        "type": "object",
        "required": [
          "clientId",
          "locationId"
        ],
        "properties": {
          "clientId": {
            "type": "string"
          },
          "locationId": {
            "type": "string"
          }
        }
      },
      "CheckinList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Checkin"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/checkins"
          }
        }
      },
      "Staff": {
        "type": "object",
        "required": [
          "object",
          "id",
          "firstName",
          "lastName",
          "email",
          "role",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "staff"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "550e8400-e29b-41d4-a716-446655440000"
          },
          "firstName": {
            "type": "string",
            "example": "Jane"
          },
          "lastName": {
            "type": "string",
            "example": "Smith"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "jane.smith@example.com"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "example": "+14155551234"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "manager",
              "front_desk",
              "instructor"
            ],
            "description": "Staff member's role"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of permission keys"
          },
          "locationIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of locations the staff member is assigned to"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "suspended"
            ]
          },
          "hireDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateStaffRequest": {
        "type": "object",
        "required": [
          "firstName",
          "lastName",
          "email"
        ],
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "maxLength": 20
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "manager",
              "front_desk",
              "instructor"
            ]
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "siteId": {
            "type": "string"
          },
          "hireDate": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "UpdateStaffRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "manager",
              "front_desk",
              "instructor"
            ]
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "suspended"
            ]
          }
        }
      },
      "StaffList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Staff"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/staff"
          }
        }
      },
      "CreateInstructorRequest": {
        "type": "object",
        "required": [
          "firstName",
          "lastName",
          "email"
        ],
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string",
            "maxLength": 20
          },
          "bio": {
            "type": "string",
            "maxLength": 2000,
            "description": "Instructor biography"
          },
          "profileImageUrl": {
            "type": "string",
            "format": "uri",
            "description": "URL to instructor's profile image"
          },
          "specialties": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "List of instructor specialties"
          },
          "locationIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "siteId": {
            "type": "string"
          },
          "hireDate": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "UpdateInstructorRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "lastName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 20
          },
          "bio": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "profileImageUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "specialties": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "locationIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "on_leave"
            ]
          }
        }
      },
      "InstructorList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Instructor"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/instructors"
          }
        }
      },
      "Schedule": {
        "type": "object",
        "required": [
          "object",
          "id",
          "name",
          "locationId",
          "capacity",
          "duration",
          "recurrence",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "schedule"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "example": "Morning Yoga"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "locationId": {
            "type": "string"
          },
          "instructorId": {
            "type": [
              "string",
              "null"
            ]
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "duration": {
            "type": "integer",
            "description": "Duration in minutes",
            "minimum": 5,
            "maximum": 480
          },
          "recurrence": {
            "$ref": "#/components/schemas/RecurrenceRule"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "ended"
            ]
          },
          "sessionTypeId": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "RecurrenceRule": {
        "type": "object",
        "required": [
          "pattern",
          "startTime",
          "timezone",
          "startDate"
        ],
        "properties": {
          "pattern": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly"
            ]
          },
          "daysOfWeek": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "monday",
                "tuesday",
                "wednesday",
                "thursday",
                "friday",
                "saturday",
                "sunday"
              ]
            },
            "description": "Required for weekly/biweekly patterns"
          },
          "dayOfMonth": {
            "type": "integer",
            "minimum": 1,
            "maximum": 31,
            "description": "Required for monthly pattern"
          },
          "startTime": {
            "type": "string",
            "pattern": "^\\d{2}:\\d{2}$",
            "example": "09:00"
          },
          "timezone": {
            "type": "string",
            "example": "America/New_York"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "CreateScheduleRequest": {
        "type": "object",
        "required": [
          "siteId",
          "name",
          "locationId",
          "capacity",
          "duration",
          "recurrence"
        ],
        "properties": {
          "siteId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "locationId": {
            "type": "string"
          },
          "instructorId": {
            "type": "string"
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "duration": {
            "type": "integer",
            "minimum": 5,
            "maximum": 480
          },
          "recurrence": {
            "$ref": "#/components/schemas/RecurrenceRule"
          },
          "sessionTypeId": {
            "type": "string"
          }
        }
      },
      "UpdateScheduleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "instructorId": {
            "type": [
              "string",
              "null"
            ]
          },
          "capacity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000
          },
          "duration": {
            "type": "integer",
            "minimum": 5,
            "maximum": 480
          },
          "recurrence": {
            "$ref": "#/components/schemas/RecurrenceRule"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "ended"
            ]
          },
          "sessionTypeId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Settings": {
        "type": "object",
        "required": [
          "object",
          "locationId",
          "booking",
          "payments",
          "notifications",
          "membership",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "settings"
          },
          "locationId": {
            "type": [
              "string",
              "null"
            ]
          },
          "booking": {
            "$ref": "#/components/schemas/BookingSettings"
          },
          "payments": {
            "$ref": "#/components/schemas/PaymentSettings"
          },
          "notifications": {
            "$ref": "#/components/schemas/NotificationSettings"
          },
          "membership": {
            "$ref": "#/components/schemas/MembershipSettings"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BookingSettings": {
        "type": "object",
        "properties": {
          "allowWaitlist": {
            "type": "boolean",
            "default": true
          },
          "maxAdvanceBookingDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "default": 30
          },
          "minAdvanceBookingHours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 168,
            "default": 1
          },
          "cancellationPolicyHours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 168,
            "default": 24
          },
          "lateCancellationFeePercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 50
          },
          "noShowFeePercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 100
          },
          "autoCheckInEnabled": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "PaymentSettings": {
        "type": "object",
        "properties": {
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "default": "USD"
          },
          "taxRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "default": 0
          },
          "taxName": {
            "type": "string",
            "maxLength": 50,
            "default": "Tax"
          },
          "autoChargeEnabled": {
            "type": "boolean",
            "default": true
          },
          "paymentMethods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stripeAccountId": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "NotificationSettings": {
        "type": "object",
        "properties": {
          "emailEnabled": {
            "type": "boolean",
            "default": true
          },
          "smsEnabled": {
            "type": "boolean",
            "default": false
          },
          "bookingConfirmation": {
            "type": "boolean",
            "default": true
          },
          "bookingReminder": {
            "type": "boolean",
            "default": true
          },
          "reminderHoursBefore": {
            "type": "integer",
            "minimum": 1,
            "maximum": 168,
            "default": 24
          },
          "cancellationNotice": {
            "type": "boolean",
            "default": true
          },
          "paymentReceipt": {
            "type": "boolean",
            "default": true
          },
          "marketingEmails": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "MembershipSettings": {
        "type": "object",
        "properties": {
          "allowSuspension": {
            "type": "boolean",
            "default": true
          },
          "maxSuspensionDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "default": 90
          },
          "autoRenewalDefault": {
            "type": "boolean",
            "default": true
          },
          "gracePeriodDays": {
            "type": "integer",
            "minimum": 0,
            "maximum": 30,
            "default": 7
          },
          "expirationWarningDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 60,
            "default": 14
          }
        }
      },
      "UpdateSettingsRequest": {
        "type": "object",
        "properties": {
          "booking": {
            "$ref": "#/components/schemas/BookingSettings"
          },
          "payments": {
            "$ref": "#/components/schemas/PaymentSettings"
          },
          "notifications": {
            "$ref": "#/components/schemas/NotificationSettings"
          },
          "membership": {
            "$ref": "#/components/schemas/MembershipSettings"
          }
        }
      },
      "ContentEntry": {
        "type": "object",
        "required": [
          "object",
          "id",
          "type",
          "title",
          "publishedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_entry"
          },
          "id": {
            "type": "string",
            "example": "cnt_abc123"
          },
          "type": {
            "type": "string",
            "description": "Content type slug (article, recipe, video, audio, etc.)",
            "example": "video"
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pre-rendered HTML"
          },
          "image": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentImage"
              },
              {
                "type": "null"
              }
            ]
          },
          "video": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentVideo"
              },
              {
                "type": "null"
              }
            ]
          },
          "audio": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "mediaId": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "duration": {
                    "type": "number",
                    "description": "Duration in seconds"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "category": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "subcategory": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentRef"
              },
              {
                "type": "null"
              }
            ]
          },
          "instructor": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentTag"
            }
          },
          "link": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentLink"
              },
              {
                "type": "null"
              }
            ]
          },
          "fields": {
            "type": "object",
            "additionalProperties": true,
            "description": "Type-specific fields (recipe calories, video focus, etc.)"
          },
          "previewLocked": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "integer"
          },
          "publishedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContentImage": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "alt": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ]
          },
          "height": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "ContentVideo": {
        "type": "object",
        "required": [
          "mediaId",
          "provider",
          "duration"
        ],
        "properties": {
          "mediaId": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "example": "gcp"
          },
          "duration": {
            "type": "number",
            "description": "Duration in seconds"
          },
          "hlsUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "HLS manifest URL (signed, 24h expiry)"
          },
          "mp4Url": {
            "type": [
              "string",
              "null"
            ],
            "description": "MP4 fallback URL (signed, 24h expiry)"
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "processingStatus": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "READY",
              "PROCESSING",
              "FAILED",
              null
            ]
          }
        }
      },
      "ContentRef": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_ref"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        }
      },
      "ContentLink": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "OPEN_CONTENT",
              "PLAY_VIDEO",
              "OPEN_URL",
              "OPEN_DEEP_LINK",
              "NONE"
            ]
          },
          "contentEntryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "contentEntry": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentEntry"
              },
              {
                "type": "null"
              }
            ]
          },
          "mediaId": {
            "type": [
              "string",
              "null"
            ]
          },
          "media": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MediaAsset"
              },
              {
                "type": "null"
              }
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "deepLink": {
            "type": [
              "string",
              "null"
            ]
          },
          "label": {
            "type": [
              "string",
              "null"
            ],
            "description": "CTA button text"
          }
        }
      },
      "ContentEntryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentEntry"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/content/entries"
          }
        }
      },
      "ContentCategory": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "sortOrder",
          "contentCount"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_category"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "sortOrder": {
            "type": "integer"
          },
          "subcategories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "image": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string"
                        },
                        "alt": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sortOrder": {
                  "type": "integer"
                },
                "contentCount": {
                  "type": "integer"
                }
              }
            }
          },
          "contentCount": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ContentCategoryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentCategory"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/content/categories"
          }
        }
      },
      "ContentBanner": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "image",
          "bannerType",
          "sortOrder"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_banner"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "image": {
            "$ref": "#/components/schemas/ContentImage"
          },
          "bannerType": {
            "type": "string",
            "enum": [
              "home_banner",
              "more_banner",
              "package_banner",
              "cms_banner"
            ]
          },
          "displayCaption": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "bannerLink": {
            "type": [
              "string",
              "null"
            ],
            "description": "Legacy free-form link string"
          },
          "link": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ContentLink"
              },
              {
                "type": "null"
              }
            ]
          },
          "carouselGroup": {
            "type": [
              "string",
              "null"
            ]
          },
          "instructor": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "firstName": {
                    "type": "string"
                  },
                  "lastName": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "sortOrder": {
            "type": "integer"
          }
        }
      },
      "ContentBannerList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentBanner"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/content/banners"
          }
        }
      },
      "ContentTag": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "type"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_tag"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "package",
              "category"
            ]
          }
        }
      },
      "ContentTagList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentTag"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/content/tags"
          }
        }
      },
      "ContentType": {
        "type": "object",
        "required": [
          "object",
          "id",
          "slug",
          "name",
          "groupName",
          "sortOrder",
          "isSystem"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_type"
          },
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "groupName": {
            "type": "string",
            "enum": [
              "ARTICLE",
              "TAXONOMY",
              "BANNER",
              "FEATURE"
            ]
          },
          "iconName": {
            "type": [
              "string",
              "null"
            ]
          },
          "sortOrder": {
            "type": "integer"
          },
          "isSystem": {
            "type": "boolean"
          }
        }
      },
      "ContentTypeList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentType"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/content/types"
          }
        }
      },
      "ContentStatus": {
        "type": "object",
        "required": [
          "object",
          "id",
          "contentEntryId",
          "status",
          "progressPercent",
          "lastAccessedAt",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_status"
          },
          "id": {
            "type": "string"
          },
          "contentEntryId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "COMPLETED"
            ]
          },
          "progressPercent": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "lastAccessedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContentStatusList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentStatus"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "UpdateContentStatusRequest": {
        "type": "object",
        "properties": {
          "progressPercent": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "COMPLETED"
            ]
          }
        }
      },
      "ContentFavorite": {
        "type": "object",
        "required": [
          "object",
          "id",
          "contentEntryId",
          "title",
          "type",
          "addedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "content_favorite"
          },
          "id": {
            "type": "string"
          },
          "contentEntryId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "image": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "alt": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContentFavoriteList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentFavorite"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/content/my-list"
          }
        }
      },
      "WatchLaterEntry": {
        "type": "object",
        "required": [
          "object",
          "contentEntryId",
          "title",
          "type",
          "addedAt",
          "autoDownloaded"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "watch_later_entry"
          },
          "contentEntryId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "addedAt": {
            "type": "string",
            "format": "date-time"
          },
          "autoDownloaded": {
            "type": "boolean"
          }
        }
      },
      "WatchLaterEntryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WatchLaterEntry"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/content/watch-later"
          }
        }
      },
      "Challenge": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "startDate",
          "startType",
          "duration",
          "endDate",
          "attendanceGoal"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "image": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "alt": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "startType": {
            "type": "string",
            "enum": [
              "FIXED",
              "ROLLING"
            ]
          },
          "duration": {
            "type": "integer",
            "description": "Duration in days"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          },
          "benefits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attendanceGoal": {
            "type": "integer"
          },
          "attendanceGoalList": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Progressive milestones"
          },
          "attendanceRecognition": {
            "type": "string",
            "enum": [
              "BADGE",
              "CERTIFICATE",
              "NONE"
            ]
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                }
              }
            }
          },
          "maxGoals": {
            "type": "integer"
          },
          "assessments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              }
            }
          },
          "assessmentDays": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "1-indexed day numbers for assessments"
          },
          "assessmentGracePeriod": {
            "type": "integer",
            "description": "Grace period in days"
          },
          "articles": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                }
              }
            }
          },
          "enrollment": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "ENROLLED",
                      "COMPLETED",
                      "WITHDRAWN",
                      "EXPIRED"
                    ]
                  },
                  "enrolledAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "attendanceCount": {
                    "type": "integer"
                  },
                  "attendanceGoal": {
                    "type": "integer"
                  },
                  "currentDay": {
                    "type": "integer"
                  },
                  "totalDays": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Null if not enrolled"
          }
        }
      },
      "ChallengeList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Challenge"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/challenges"
          }
        }
      },
      "ChallengeEnrollRequest": {
        "type": "object",
        "required": [
          "siteId"
        ],
        "properties": {
          "siteId": {
            "type": "string",
            "description": "Site to enroll at"
          },
          "packageId": {
            "type": "string",
            "description": "Qualifying package/service ID (for package-gated challenges)"
          }
        }
      },
      "ChallengeEnrollment": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "status",
          "enrolledAt",
          "challengeStartDate",
          "challengeEndDate",
          "attendanceCount",
          "attendanceGoal"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_enrollment"
          },
          "challengeId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ENROLLED",
              "COMPLETED",
              "WITHDRAWN",
              "EXPIRED"
            ]
          },
          "enrolledAt": {
            "type": "string",
            "format": "date-time"
          },
          "challengeStartDate": {
            "type": "string",
            "format": "date"
          },
          "challengeEndDate": {
            "type": "string",
            "format": "date"
          },
          "attendanceCount": {
            "type": "integer"
          },
          "attendanceGoal": {
            "type": "integer"
          }
        }
      },
      "ChallengeGoalCommitRequest": {
        "type": "object",
        "required": [
          "goalIds"
        ],
        "properties": {
          "goalIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1
          }
        }
      },
      "ChallengeGoalCommitment": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "goals"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_goal_commitment"
          },
          "challengeId": {
            "type": "string"
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "committedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ChallengeGoalSubmitRequest": {
        "type": "object",
        "required": [
          "day",
          "goals"
        ],
        "properties": {
          "day": {
            "type": "integer",
            "minimum": 1
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "goalId",
                "completed"
              ],
              "properties": {
                "goalId": {
                  "type": "string"
                },
                "completed": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "ChallengeGoalLog": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "day",
          "goals"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_goal_log"
          },
          "challengeId": {
            "type": "string"
          },
          "day": {
            "type": "integer"
          },
          "goals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "completed": {
                  "type": "boolean"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "ChallengeGoalLogList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChallengeGoalLog"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ChallengeAssessment": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "dayNumber",
          "assessments"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_assessment"
          },
          "challengeId": {
            "type": "string"
          },
          "dayNumber": {
            "type": "integer"
          },
          "assessments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                },
                "recordedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "previousValue": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "change": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "changePercent": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          }
        }
      },
      "ChallengeAssessmentList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChallengeAssessment"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ChallengeAssessmentSubmitRequest": {
        "type": "object",
        "required": [
          "dayNumber",
          "assessments"
        ],
        "properties": {
          "dayNumber": {
            "type": "integer",
            "minimum": 1
          },
          "assessments": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "assessmentId",
                "value"
              ],
              "properties": {
                "assessmentId": {
                  "type": "string"
                },
                "value": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "ChallengeAssessmentUpdateRequest": {
        "type": "object",
        "required": [
          "dayNumber",
          "value"
        ],
        "properties": {
          "dayNumber": {
            "type": "integer",
            "minimum": 1
          },
          "value": {
            "type": "number"
          }
        }
      },
      "ChallengeAttendance": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "count",
          "goal",
          "percent",
          "recognition"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_attendance"
          },
          "challengeId": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "goal": {
            "type": "integer"
          },
          "percent": {
            "type": "number"
          },
          "milestonesReached": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "nextMilestone": {
            "type": [
              "integer",
              "null"
            ]
          },
          "recognition": {
            "type": "string",
            "enum": [
              "BADGE",
              "CERTIFICATE",
              "NONE"
            ]
          },
          "recentEvents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "attendedAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "siteId": {
                  "type": "string"
                },
                "sessionId": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ChallengeArticleStatus": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "articleId",
          "isRead"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_article_status"
          },
          "challengeId": {
            "type": "string"
          },
          "articleId": {
            "type": "string"
          },
          "isRead": {
            "type": "boolean"
          },
          "readAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ChallengeArticleStatusList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChallengeArticleStatus"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "ChallengeProgress": {
        "type": "object",
        "required": [
          "object",
          "challengeId",
          "status",
          "currentDay",
          "totalDays",
          "daysRemaining",
          "overallCompletionPercent"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "challenge_progress"
          },
          "challengeId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "ENROLLED",
              "COMPLETED",
              "WITHDRAWN",
              "EXPIRED"
            ]
          },
          "currentDay": {
            "type": "integer"
          },
          "totalDays": {
            "type": "integer"
          },
          "daysRemaining": {
            "type": "integer"
          },
          "overallCompletionPercent": {
            "type": "number"
          },
          "attendance": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer"
              },
              "goal": {
                "type": "integer"
              },
              "percent": {
                "type": "number"
              },
              "milestonesReached": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "nextMilestone": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "recognition": {
                "type": "string",
                "enum": [
                  "BADGE",
                  "CERTIFICATE",
                  "NONE"
                ]
              },
              "recentEvents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "attendedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "siteId": {
                      "type": "string"
                    },
                    "sessionId": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "goals": {
            "type": "object",
            "properties": {
              "committed": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    }
                  }
                }
              },
              "completionRate": {
                "type": "number"
              },
              "streakDays": {
                "type": "integer"
              },
              "totalCompletedDays": {
                "type": "integer"
              },
              "totalPossibleDays": {
                "type": "integer"
              },
              "todayCompleted": {
                "type": "boolean"
              }
            }
          },
          "assessments": {
            "type": "object",
            "properties": {
              "completedDays": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "pendingDays": {
                "type": "array",
                "items": {
                  "type": "integer"
                }
              },
              "nextAssessmentDay": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "nextAssessmentDeadline": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date"
              },
              "measurements": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "assessmentId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "unit": {
                      "type": "string"
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "dayNumber": {
                            "type": "integer"
                          },
                          "value": {
                            "type": "number"
                          },
                          "recordedAt": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    },
                    "totalChange": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "totalChangePercent": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  }
                }
              }
            }
          },
          "articles": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "read": {
                "type": "integer"
              },
              "percent": {
                "type": "number"
              },
              "items": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "isRead": {
                      "type": "boolean"
                    },
                    "readAt": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Metric": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "categories",
          "unit",
          "valueType",
          "personalBest"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "metric"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "image": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string"
                  },
                  "alt": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "STRENGTH",
                "CARDIO",
                "MOBILITY",
                "ENDURANCE",
                "POWER"
              ]
            }
          },
          "unit": {
            "type": "string",
            "enum": [
              "KG",
              "MINUTES",
              "ROUNDS",
              "REPS",
              "METERS",
              "PERCENTAGE",
              "SECONDS"
            ]
          },
          "valueType": {
            "type": "string",
            "enum": [
              "INTEGER",
              "FLOAT",
              "TIME",
              "PERCENTAGE"
            ]
          },
          "metricVariables": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "1RM",
              "3RM",
              "5RM",
              "10RM"
            ]
          },
          "personalBest": {
            "type": "string",
            "enum": [
              "HIGHER",
              "LOWER"
            ]
          },
          "userSummary": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "lastEntryAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "entryCount": {
                    "type": "integer"
                  },
                  "personalBestValue": {
                    "type": "number"
                  },
                  "personalBestVariable": {
                    "type": "string"
                  },
                  "personalBestDisplayValue": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "variables": {
            "type": "array",
            "description": "Per-variable detail (only on single metric GET)",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "personalBest": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "displayValue": {
                          "type": "string"
                        },
                        "entryId": {
                          "type": "string"
                        },
                        "achievedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "lastEntry": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "number"
                        },
                        "displayValue": {
                          "type": "string"
                        },
                        "recordedAt": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "entryCount": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "MetricList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Metric"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/metrics"
          }
        }
      },
      "MetricEntry": {
        "type": "object",
        "required": [
          "object",
          "id",
          "contentEntryId",
          "metricName",
          "metricVariable",
          "value",
          "displayValue",
          "unit",
          "recordedAt",
          "isPersonalBest",
          "createdAt",
          "updatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "metric_entry"
          },
          "id": {
            "type": "string"
          },
          "contentEntryId": {
            "type": "string"
          },
          "metricName": {
            "type": "string"
          },
          "metricVariable": {
            "type": "string"
          },
          "value": {
            "type": "number",
            "description": "Always in base unit"
          },
          "displayValue": {
            "type": "string",
            "description": "Unit-converted display value"
          },
          "unit": {
            "type": "string"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          },
          "isPersonalBest": {
            "type": "boolean"
          },
          "isNewPersonalBest": {
            "type": "boolean",
            "description": "Only present on create/update responses"
          },
          "personalBest": {
            "type": "object",
            "description": "Only present when isNewPersonalBest is true",
            "properties": {
              "value": {
                "type": "number"
              },
              "displayValue": {
                "type": "string"
              },
              "previousValue": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "previousDisplayValue": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateMetricEntryRequest": {
        "type": "object",
        "required": [
          "contentEntryId",
          "metricVariable",
          "value"
        ],
        "properties": {
          "contentEntryId": {
            "type": "string"
          },
          "metricVariable": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Defaults to now. Cannot be in the future (+5 min tolerance)."
          },
          "challengeContext": {
            "type": "object",
            "properties": {
              "enrollmentEntryId": {
                "type": "string"
              },
              "assessmentDay": {
                "type": "integer"
              }
            }
          }
        }
      },
      "UpdateMetricEntryRequest": {
        "type": "object",
        "properties": {
          "value": {
            "type": "number"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000
          },
          "recordedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MetricHistoryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricEntry"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "chartData": {
            "type": "object",
            "properties": {
              "points": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "x": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "y": {
                      "type": "number"
                    },
                    "variable": {
                      "type": "string"
                    }
                  }
                }
              },
              "personalBest": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "x": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "y": {
                        "type": "number"
                      }
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "url": {
            "type": "string"
          }
        }
      },
      "MetricPersonalBest": {
        "type": "object",
        "required": [
          "object",
          "contentEntryId",
          "metricName",
          "metricVariable",
          "value",
          "displayValue",
          "unit",
          "personalBestDirection",
          "achievedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "metric_personal_best"
          },
          "contentEntryId": {
            "type": "string"
          },
          "metricName": {
            "type": "string"
          },
          "metricVariable": {
            "type": "string"
          },
          "value": {
            "type": "number"
          },
          "displayValue": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "valueType": {
            "type": "string"
          },
          "personalBestDirection": {
            "type": "string",
            "enum": [
              "HIGHER",
              "LOWER"
            ]
          },
          "achievedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastEntryAt": {
            "type": "string",
            "format": "date-time"
          },
          "entryCount": {
            "type": "integer"
          }
        }
      },
      "MetricPersonalBestList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricPersonalBest"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/metrics/personal-bests"
          }
        }
      },
      "MetricShare": {
        "type": "object",
        "required": [
          "object",
          "entryId",
          "shareUrl",
          "qrData"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "metric_share"
          },
          "entryId": {
            "type": "string"
          },
          "shareUrl": {
            "type": "string",
            "format": "uri"
          },
          "qrData": {
            "type": "string"
          },
          "referralEnabled": {
            "type": "boolean"
          },
          "referralUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          }
        }
      },
      "UnitPreference": {
        "type": "object",
        "required": [
          "object",
          "unitSystem"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "unit_preference"
          },
          "unitSystem": {
            "type": "string",
            "enum": [
              "METRIC",
              "IMPERIAL"
            ]
          }
        }
      },
      "UpdateUnitPreferenceRequest": {
        "type": "object",
        "required": [
          "unitSystem"
        ],
        "properties": {
          "unitSystem": {
            "type": "string",
            "enum": [
              "METRIC",
              "IMPERIAL"
            ]
          }
        }
      },
      "Leaderboard": {
        "type": "object",
        "required": [
          "object",
          "id",
          "name",
          "type",
          "scope",
          "periodLabel",
          "periodKey",
          "participantCount",
          "rankingDirection",
          "lastUpdatedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "leaderboard"
          },
          "id": {
            "type": "string",
            "example": "lb_abc123"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "ATTENDANCE",
              "CHALLENGE",
              "METRIC",
              "STREAK"
            ]
          },
          "scope": {
            "type": "string",
            "enum": [
              "LOCATION",
              "CROSS_LOCATION"
            ]
          },
          "periodLabel": {
            "type": "string",
            "example": "March 2026"
          },
          "periodKey": {
            "type": "string",
            "example": "2026-03"
          },
          "participantCount": {
            "type": "integer"
          },
          "myRank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "myScore": {
            "type": [
              "number",
              "null"
            ]
          },
          "topEntries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rank": {
                  "type": "integer"
                },
                "displayName": {
                  "type": "string"
                },
                "profileImageUrl": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "score": {
                  "type": "number"
                },
                "siteName": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "rankingDirection": {
            "type": "string",
            "enum": [
              "DESC",
              "ASC"
            ]
          },
          "lastUpdatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "entries": {
            "$ref": "#/components/schemas/LeaderboardEntryList"
          }
        }
      },
      "LeaderboardList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Leaderboard"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/leaderboards"
          }
        }
      },
      "LeaderboardEntry": {
        "type": "object",
        "required": [
          "object",
          "rank",
          "displayName",
          "score",
          "isCurrentMember"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "leaderboard_entry"
          },
          "rank": {
            "type": "integer"
          },
          "displayName": {
            "type": "string"
          },
          "profileImageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "score": {
            "type": "number"
          },
          "previousRank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "previousScore": {
            "type": [
              "number",
              "null"
            ]
          },
          "rankChange": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Positive means rank improved"
          },
          "siteId": {
            "type": [
              "string",
              "null"
            ]
          },
          "siteName": {
            "type": [
              "string",
              "null"
            ]
          },
          "isCurrentMember": {
            "type": "boolean"
          },
          "tiebreakTimestamp": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "LeaderboardEntryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardEntry"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "LeaderboardMyRank": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "leaderboard_entry"
          },
          "rank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "displayName": {
            "type": "string"
          },
          "profileImageUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "score": {
            "type": [
              "number",
              "null"
            ]
          },
          "previousRank": {
            "type": [
              "integer",
              "null"
            ]
          },
          "previousScore": {
            "type": [
              "number",
              "null"
            ]
          },
          "rankChange": {
            "type": [
              "integer",
              "null"
            ]
          },
          "siteId": {
            "type": [
              "string",
              "null"
            ]
          },
          "siteName": {
            "type": [
              "string",
              "null"
            ]
          },
          "isCurrentMember": {
            "type": "boolean",
            "const": true
          },
          "tiebreakTimestamp": {
            "type": [
              "string",
              "null"
            ]
          },
          "surrounding": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardEntry"
            }
          }
        }
      },
      "LeaderboardSummary": {
        "type": "object",
        "required": [
          "object",
          "leaderboards",
          "totalLeaderboards",
          "rankedIn"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "leaderboard_summary"
          },
          "leaderboards": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "leaderboardId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "periodLabel": {
                  "type": "string"
                },
                "rank": {
                  "type": "integer"
                },
                "score": {
                  "type": "number"
                },
                "participantCount": {
                  "type": "integer"
                },
                "percentile": {
                  "type": "number"
                }
              }
            }
          },
          "bestRank": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "leaderboardId": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "rank": {
                    "type": "integer"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "totalLeaderboards": {
            "type": "integer"
          },
          "rankedIn": {
            "type": "integer"
          }
        }
      },
      "LeaderboardPeriod": {
        "type": "object",
        "required": [
          "periodKey",
          "label",
          "startDate",
          "endDate",
          "isCurrent",
          "participantCount"
        ],
        "properties": {
          "periodKey": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "format": "date"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "participantCount": {
            "type": "integer"
          }
        }
      },
      "LeaderboardPeriodList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardPeriod"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "Award": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "awardType",
          "status",
          "openBanner",
          "image",
          "progress"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "award"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "awardType": {
            "type": "string",
            "enum": [
              "ATTENDANCE_TOTAL",
              "STREAK",
              "CUSTOM"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "LOCKED",
              "PENDING",
              "ACHIEVED"
            ]
          },
          "earnedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "openBanner": {
            "type": "string",
            "description": "Celebratory message"
          },
          "image": {
            "type": "object",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "alt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "width": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "height": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "role": {
                "type": "string",
                "enum": [
                  "imagePending",
                  "imageAchieved"
                ]
              }
            }
          },
          "lightColorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "darkColorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "progress": {
            "type": "object",
            "required": [
              "current",
              "target",
              "percent"
            ],
            "properties": {
              "current": {
                "type": "number"
              },
              "target": {
                "type": "number"
              },
              "percent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        }
      },
      "AwardList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Award"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/awards"
          }
        }
      },
      "AwardBanner": {
        "type": "object",
        "required": [
          "object",
          "awardId",
          "title",
          "message",
          "image",
          "earnedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "award_banner"
          },
          "awardId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "image": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "alt": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "width": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "height": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "lightColorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "darkColorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "earnedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Streak": {
        "type": "object",
        "required": [
          "object",
          "siteId",
          "siteName",
          "currentStreak",
          "longestStreak",
          "streakStatus"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "streak"
          },
          "siteId": {
            "type": "string"
          },
          "siteName": {
            "type": "string"
          },
          "currentStreak": {
            "type": "integer"
          },
          "currentStreakStartedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "lastAttendanceDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "longestStreak": {
            "type": "integer"
          },
          "longestStreakStartedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "longestStreakEndedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "streakStatus": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "AT_RISK",
              "BROKEN"
            ]
          }
        }
      },
      "StreakList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Streak"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/streaks"
          }
        }
      },
      "Milestone": {
        "type": "object",
        "required": [
          "object",
          "siteId",
          "siteName",
          "totalAttended",
          "progressToNext",
          "milestones"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "milestone"
          },
          "siteId": {
            "type": "string"
          },
          "siteName": {
            "type": "string"
          },
          "totalAttended": {
            "type": "integer"
          },
          "lastAwardedThreshold": {
            "type": [
              "integer",
              "null"
            ]
          },
          "nextThreshold": {
            "type": [
              "integer",
              "null"
            ]
          },
          "progressToNext": {
            "type": "number",
            "description": "0-100 percent"
          },
          "milestones": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "threshold": {
                  "type": "integer"
                },
                "awardId": {
                  "type": "string"
                },
                "awardTitle": {
                  "type": "string"
                },
                "reached": {
                  "type": "boolean"
                },
                "reachedAt": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "MilestoneList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Milestone"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/milestones"
          }
        }
      },
      "MediaAsset": {
        "type": "object",
        "required": [
          "object",
          "id",
          "title",
          "fileName",
          "mediaType",
          "mimeType",
          "storageProvider",
          "createdAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "media_asset"
          },
          "id": {
            "type": "string"
          },
          "contentMediaId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "altText": {
            "type": [
              "string",
              "null"
            ]
          },
          "mediaType": {
            "type": "string",
            "enum": [
              "IMAGE",
              "VIDEO",
              "DOCUMENT"
            ]
          },
          "mimeType": {
            "type": "string"
          },
          "fileSize": {
            "type": [
              "integer",
              "null"
            ]
          },
          "storageProvider": {
            "type": "string",
            "enum": [
              "GCS"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "width": {
            "type": [
              "integer",
              "null"
            ]
          },
          "height": {
            "type": [
              "integer",
              "null"
            ]
          },
          "variants": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MediaVariants"
              },
              {
                "type": "null"
              }
            ]
          },
          "blurhash": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration": {
            "type": [
              "number",
              "null"
            ],
            "description": "Video duration in seconds"
          },
          "hlsManifestUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "mp4Url": {
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "processingStatus": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "PENDING",
              "PROCESSING",
              "READY",
              "FAILED",
              null
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folder": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAtLevel": {
            "type": "string",
            "enum": [
              "CORPORATE",
              "SITE"
            ]
          },
          "createdAtSiteId": {
            "type": [
              "string",
              "null"
            ]
          },
          "usageCount": {
            "type": "integer"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "MediaAssetList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MediaAsset"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "totalCount": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "example": "/v2/content/media"
          }
        }
      },
      "MediaVariants": {
        "type": "object",
        "required": [
          "object",
          "original"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "media_variants"
          },
          "thumbnail": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MediaVariantSize"
              },
              {
                "type": "null"
              }
            ]
          },
          "small": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MediaVariantSize"
              },
              {
                "type": "null"
              }
            ]
          },
          "medium": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MediaVariantSize"
              },
              {
                "type": "null"
              }
            ]
          },
          "large": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MediaVariantSize"
              },
              {
                "type": "null"
              }
            ]
          },
          "original": {
            "$ref": "#/components/schemas/MediaVariantSize"
          }
        }
      },
      "MediaVariantSize": {
        "type": "object",
        "required": [
          "url",
          "width",
          "height"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          }
        }
      },
      "VideoPlayback": {
        "type": "object",
        "required": [
          "object",
          "contentMediaId",
          "hlsUrl",
          "mp4Url",
          "thumbnailUrl",
          "duration",
          "qualities",
          "expiresAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "video_playback"
          },
          "contentMediaId": {
            "type": "string"
          },
          "hlsUrl": {
            "type": "string",
            "description": "HLS manifest URL (signed, 24h expiry)"
          },
          "mp4Url": {
            "type": "string",
            "description": "MP4 fallback URL (signed, 24h expiry)"
          },
          "thumbnailUrl": {
            "type": "string"
          },
          "duration": {
            "type": "number",
            "description": "Duration in seconds"
          },
          "qualities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "example": "720p"
                },
                "width": {
                  "type": "integer"
                },
                "height": {
                  "type": "integer"
                },
                "bitrate": {
                  "type": "integer",
                  "description": "Bitrate in bps"
                }
              }
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "VideoPlaybackSession": {
        "type": "object",
        "required": [
          "object",
          "playbackSessionId",
          "contentMediaId",
          "status",
          "startedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "video_playback_session"
          },
          "playbackSessionId": {
            "type": "string"
          },
          "contentMediaId": {
            "type": "string"
          },
          "contentEntryId": {
            "type": [
              "string",
              "null"
            ]
          },
          "siteId": {
            "type": "string"
          },
          "currentTimestamp": {
            "type": "number",
            "description": "Current position in seconds"
          },
          "maxTimestamp": {
            "type": "number",
            "description": "Furthest point reached"
          },
          "duration": {
            "type": "number",
            "description": "Total video duration in seconds"
          },
          "completionPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "STARTED",
              "PAUSED",
              "COMPLETED",
              "ABANDONED"
            ]
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "platform": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "IOS",
              "ANDROID",
              "WEB",
              "EMBED",
              null
            ]
          },
          "quality": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "720p",
              "480p",
              "auto",
              null
            ]
          },
          "totalWatchTimeSeconds": {
            "type": "number"
          },
          "seekCount": {
            "type": "integer"
          },
          "pauseCount": {
            "type": "integer"
          },
          "bufferCount": {
            "type": "integer"
          },
          "resumeFrom": {
            "type": "number",
            "description": "Where to start playback (0 if new)"
          },
          "previousCompletionPercent": {
            "type": [
              "number",
              "null"
            ]
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "lastHeartbeatAt": {
            "type": "string",
            "format": "date-time"
          },
          "endedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateVideoSessionRequest": {
        "type": "object",
        "required": [
          "contentMediaId"
        ],
        "properties": {
          "contentMediaId": {
            "type": "string"
          },
          "contentEntryId": {
            "type": "string",
            "description": "Content entry context (article, challenge, banner)"
          },
          "platform": {
            "type": "string",
            "enum": [
              "IOS",
              "ANDROID",
              "WEB",
              "EMBED"
            ]
          },
          "quality": {
            "type": "string",
            "enum": [
              "720p",
              "480p",
              "auto"
            ]
          }
        }
      },
      "VideoHeartbeat": {
        "type": "object",
        "required": [
          "currentTimestamp",
          "watchedSeconds"
        ],
        "properties": {
          "currentTimestamp": {
            "type": "integer",
            "description": "Current playback position in seconds"
          },
          "watchedSeconds": {
            "type": "integer",
            "description": "Actual seconds watched since last heartbeat"
          },
          "quality": {
            "type": "string",
            "enum": [
              "720p",
              "480p",
              "auto"
            ]
          },
          "buffered": {
            "type": "boolean",
            "description": "Whether buffering occurred since last heartbeat"
          }
        }
      },
      "VideoResume": {
        "type": "object",
        "required": [
          "object",
          "contentMediaId",
          "hasProgress",
          "resumeTimestamp",
          "completionPercent",
          "totalWatchTimeSeconds"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "video_resume"
          },
          "contentMediaId": {
            "type": "string"
          },
          "hasProgress": {
            "type": "boolean"
          },
          "resumeTimestamp": {
            "type": "number",
            "description": "Seconds to seek to (0 if no progress or completed)"
          },
          "completionPercent": {
            "type": "number"
          },
          "lastWatchedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "totalWatchTimeSeconds": {
            "type": "number"
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "STARTED",
              "PAUSED",
              "COMPLETED",
              "ABANDONED",
              null
            ]
          }
        }
      },
      "VideoWatchHistory": {
        "type": "object",
        "required": [
          "object",
          "contentMediaId",
          "title",
          "duration",
          "completionPercent",
          "totalWatchTimeSeconds",
          "status",
          "lastWatchedAt"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "video_watch_history"
          },
          "contentMediaId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "duration": {
            "type": "number",
            "description": "Duration in seconds"
          },
          "completionPercent": {
            "type": "number"
          },
          "totalWatchTimeSeconds": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "STARTED",
              "PAUSED",
              "COMPLETED",
              "ABANDONED"
            ]
          },
          "lastWatchedAt": {
            "type": "string",
            "format": "date-time"
          },
          "contentEntry": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "VideoWatchHistoryList": {
        "type": "object",
        "required": [
          "object",
          "data",
          "hasMore",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoWatchHistory"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "example": "/v2/member/video/history"
          }
        }
      },
      "ExperienceStatus": {
        "type": "object",
        "required": [
          "object",
          "enabled",
          "features"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "experience_status"
          },
          "enabled": {
            "type": "boolean"
          },
          "features": {
            "type": "object",
            "properties": {
              "performanceTracking": {
                "type": "boolean"
              },
              "challenges": {
                "type": "boolean"
              },
              "leaderboards": {
                "type": "boolean"
              },
              "streaks": {
                "type": "boolean"
              },
              "milestones": {
                "type": "boolean"
              },
              "awards": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "NotificationPreferences": {
        "type": "object",
        "required": [
          "object",
          "preferences"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "notification_preferences"
          },
          "preferences": {
            "type": "object",
            "properties": {
              "content_new": {
                "type": "boolean"
              },
              "challenge_reminder": {
                "type": "boolean"
              },
              "challenge_completed": {
                "type": "boolean"
              },
              "streak_at_risk": {
                "type": "boolean"
              },
              "award_earned": {
                "type": "boolean"
              },
              "leaderboard_rank_change": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "UpdateNotificationPreferencesRequest": {
        "type": "object",
        "required": [
          "preferences"
        ],
        "properties": {
          "preferences": {
            "type": "object",
            "description": "Partial update — only provided keys are changed",
            "properties": {
              "content_new": {
                "type": "boolean"
              },
              "challenge_reminder": {
                "type": "boolean"
              },
              "challenge_completed": {
                "type": "boolean"
              },
              "streak_at_risk": {
                "type": "boolean"
              },
              "award_earned": {
                "type": "boolean"
              },
              "leaderboard_rank_change": {
                "type": "boolean"
              }
            }
          }
        }
      }
    }
  }
}