{
  "openapi": "3.0.3",
  "info": {
    "title": "myreach.top API",
    "version": "1.0.0",
    "description": "Creator-page platform API. Responses and schemas are documented per operation. SESSION means the owner dashboard cookie; KEY means a page-scoped API key (Authorization: Bearer mr_live_…). Guide: https://myreach.top/ai-agents-guide. Base URL https://myreach.top (dev: http://localhost:8788). Errors are JSON objects with an error string."
  },
  "servers": [
    {
      "url": "https://myreach.top"
    },
    {
      "url": "http://localhost:8788"
    }
  ],
  "tags": [
    {
      "name": "Auth model"
    },
    {
      "name": "API keys"
    },
    {
      "name": "Accounts & sign-in"
    },
    {
      "name": "Page store"
    },
    {
      "name": "Pages (Pro)"
    },
    {
      "name": "Bookings"
    },
    {
      "name": "Leads"
    },
    {
      "name": "Courses"
    },
    {
      "name": "Analytics"
    },
    {
      "name": "Payments"
    },
    {
      "name": "Domains"
    },
    {
      "name": "Public unfurls — GitHub · links"
    }
  ],
  "security": [],
  "paths": {
    "/api/auth/whoami": {
      "get": {
        "tags": [
          "Auth model"
        ],
        "description": "Verify an API key and return its page scope, plan and capabilities.",
        "security": [
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Key scope, plan and capabilities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WhoamiResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getApiKeyIdentity"
      }
    },
    "/api/auth/keys": {
      "get": {
        "tags": [
          "API keys"
        ],
        "description": "List active API keys for the owned page. Secret values are never returned.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "e.g. <page>"
          }
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Active key metadata. Key secrets are never returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyListResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "listApiKeys"
      },
      "post": {
        "tags": [
          "API keys"
        ],
        "description": "Create a page-scoped key, or claim a first page with {claim:true,slug}. Claiming requires an owner session with no page; key creation requires ownership of the requested slug.",
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "New key secret (shown once) or successful claim response.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CreateApiKeyResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ClaimPageResponse"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "createApiKeyOrClaimPage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateApiKeyInput"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimPageInput"
                  }
                ]
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "API keys"
        ],
        "description": "Revoke one key for the owned page. The revoked key stops authenticating immediately.",
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The key was revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeApiKeyResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "revokeApiKey",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  }
                },
                "required": [
                  "slug",
                  "id"
                ],
                "additionalProperties": false
              }
            }
          }
        }
      }
    },
    "/api/auth/signup": {
      "post": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Create a human account with name, email, password (8–256 chars) and slug, or provision an agent account with email, slug and agent:true. The claim:true form claims a first page for a signed-in owner. Successful account signup sets mr_session.",
        "security": [],
        "responses": {
          "200": {
            "description": "Account signup or page-claim response; signup sets the session cookie.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/SignupResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ClaimPageResponse"
                    }
                  ]
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "description": "HttpOnly mr_session cookie.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "createAccount",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupInput"
              }
            }
          }
        }
      }
    },
    "/api/auth/check": {
      "get": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Check a page slug. Reserved names count as taken.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]([a-z0-9-]{1,38}[a-z0-9])?$"
            },
            "description": "Candidate slug."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Availability result; reserved names report taken=true.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SlugAvailabilityResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid slug.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "checkSlugAvailability"
      }
    },
    "/api/auth/password/login": {
      "post": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Sign in with email and password. Agent-provisioned accounts cannot use password login. Successful login sets the mr_session cookie.",
        "security": [],
        "responses": {
          "200": {
            "description": "Successful login sets mr_session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionLoginResponse"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "description": "HttpOnly mr_session cookie.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Credentials are invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "loginWithPassword",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordLoginInput"
              }
            }
          }
        }
      }
    },
    "/api/auth/magic/request": {
      "post": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Request a one-time sign-in link by email. Development may return devLink when email delivery is not configured.",
        "security": [],
        "responses": {
          "200": {
            "description": "Email sent, or a development link returned when dev auth links are enabled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MagicRequestResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "requestMagicLink",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MagicRequestInput"
              }
            }
          }
        }
      }
    },
    "/api/auth/oauth/start": {
      "get": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Start Google or AgentID sign-in. Successful requests redirect to the provider.",
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "agentid"
              ]
            }
          },
          {
            "name": "redir",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional safe return path."
          }
        ],
        "security": [],
        "responses": {
          "302": {
            "description": "Redirect to the configured provider authorization page.",
            "headers": {
              "Location": {
                "description": "Provider authorization URL.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "startOAuthSignIn"
      }
    },
    "/api/auth/session": {
      "get": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Return the signed-in account, or user:null for an anonymous visitor.",
        "security": [],
        "responses": {
          "200": {
            "description": "Current account, or user:null when anonymous.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getSession"
      }
    },
    "/api/auth/profile": {
      "put": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Update the signed-in owner’s page slug, display name, or account type.",
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Updated public account profile.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "updateAccountProfile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileInput"
              }
            }
          }
        }
      }
    },
    "/api/auth/account": {
      "delete": {
        "tags": [
          "Accounts & sign-in"
        ],
        "description": "Permanently delete the signed-in account and its owned page data.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug to delete."
          }
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Account data deleted and session cookie cleared.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDeletedResponse"
                }
              }
            },
            "headers": {
              "Set-Cookie": {
                "description": "Clears the HttpOnly mr_session cookie.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "deleteAccount"
      }
    },
    "/api/store": {
      "get": {
        "tags": [
          "Page store"
        ],
        "description": "Read a page snapshot. Public reads are CDN cached; owner reads are no-store.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Saved store snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreSnapshot"
                }
              }
            }
          },
          "204": {
            "description": "No saved snapshot exists yet."
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getPageStore"
      },
      "put": {
        "tags": [
          "Page store"
        ],
        "description": "Save editable page store slices for the page in slug. Per-page API keys can only modify their own page. Private delivery links and files are stored separately.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug; API keys are always restricted to their own scope."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StoreUpdate"
              }
            }
          }
        },
        "security": [
          {
            "session": []
          },
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Snapshot saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "savePageStore"
      }
    },
    "/api/bookings": {
      "get": {
        "tags": [
          "Bookings"
        ],
        "description": "List bookings for the owned page. Requires owner session or a page API key.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ],
        "security": [
          {
            "session": []
          },
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Bookings, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "listBookings"
      },
      "post": {
        "tags": [
          "Bookings"
        ],
        "description": "Create a public booking request. The card must be a saved booking/coaching card; name, email, future date and available time are required.",
        "operationId": "createBooking",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BookingInput"
              }
            }
          }
        },
        "security": [],
        "responses": {
          "200": {
            "description": "Booking request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookingCreateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Invalid request, unavailable slot, or booking service error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ]
      }
    },
    "/api/lead": {
      "post": {
        "tags": [
          "Leads"
        ],
        "description": "Capture a public lead. Name and contact are required; optional fields are saved with the lead.",
        "security": [],
        "responses": {
          "200": {
            "description": "Lead captured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadCreateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "createLead",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LeadInput"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Fallback page slug; body slug takes precedence."
          }
        ]
      },
      "get": {
        "tags": [
          "Leads"
        ],
        "description": "List leads for the owned page. Requires owner session or a page API key.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ],
        "security": [
          {
            "session": []
          },
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Leads, newest first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeadsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "listLeads"
      }
    },
    "/api/course/progress": {
      "post": {
        "tags": [
          "Courses"
        ],
        "description": "Enroll a paid student or mark a lesson complete/incomplete. Enroll requires the matching paid checkout paymentId, course idx and mail. Unknown students return 404.",
        "security": [],
        "responses": {
          "200": {
            "description": "Enrollment or lesson-progress update accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseProgressResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "updateCourseProgress",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CourseProgressInput"
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Courses"
        ],
        "description": "List course students for the owned page. Requires owner session or a page API key.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ],
        "security": [
          {
            "session": []
          },
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Students with completed lesson ids.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseStudentsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "listCourseStudents"
      }
    },
    "/api/analytics": {
      "get": {
        "tags": [
          "Analytics"
        ],
        "description": "Read privacy-safe aggregate analytics for the owned page. Requires owner session or a page API key.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 7,
              "maximum": 90
            },
            "description": "Window in days; defaults to 30 and is clamped to 7–90."
          }
        ],
        "security": [
          {
            "session": []
          },
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Daily totals and aggregate source/device/country/click data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnalyticsResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getAnalytics"
      },
      "post": {
        "tags": [
          "Analytics"
        ],
        "description": "Record a consented page visit or click. Booking/revenue analytics are server-controlled and cannot be submitted here.",
        "security": [],
        "responses": {
          "200": {
            "description": "Event recorded, or ignored when consent is absent.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/OkResponse"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "ignored": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        }
                      },
                      "required": [
                        "ok",
                        "ignored"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Booking analytics cannot be submitted by clients.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Event rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "enum": [
                        false
                      ]
                    },
                    "limited": {
                      "type": "boolean",
                      "enum": [
                        true
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "limited"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "operationId": "recordAnalyticsEvent",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnalyticsInput"
              }
            }
          }
        }
      }
    },
    "/api/pay/config": {
      "get": {
        "tags": [
          "Payments"
        ],
        "description": "Read public payment configuration status for a page. Secrets are never exposed.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Public Stripe connection and enabled state; no secrets are returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getPaymentConfig"
      },
      "put": {
        "tags": [
          "Payments"
        ],
        "description": "Compatibility endpoint for page settings. It accepts a JSON object but rejects credential fields; Stripe credentials are managed by myreach.top.",
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page slug."
          }
        ],
        "security": [
          {
            "session": []
          },
          {
            "bearerKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Compatibility response; Stripe settings remain platform-managed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentConfigSaveResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "savePaymentConfigCompatibility",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentConfigInput"
              }
            }
          }
        }
      }
    },
    "/api/pay/create": {
      "post": {
        "tags": [
          "Payments"
        ],
        "description": "Create a public Stripe checkout for a saved booking, product or course card. Price and checkout rules come from the saved card; a client-supplied amount is ignored. Booking requires date and slot. Product/course requires kind and card.index. Name and email are required.",
        "security": [],
        "responses": {
          "200": {
            "description": "Hosted Stripe Checkout URL and payment details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayCreateResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "createCheckoutSession",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayCreateInput"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Fallback page slug; body slug takes precedence."
          }
        ]
      }
    },
    "/api/pay/status": {
      "get": {
        "tags": [
          "Payments"
        ],
        "description": "Poll a booking hold or checkout payment. Missing booking query fields return status=free.",
        "parameters": [
          {
            "name": "card",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "slot",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Checkout payment id."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current reservation/payment state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentStatusResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getPaymentStatus"
      }
    },
    "/api/domains/search": {
      "get": {
        "tags": [
          "Domains"
        ],
        "description": "Search for affordable .top domain names.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Name or name fragment."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Available affordable .top suggestions, or a JSON error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DomainSearchResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "searchTopDomains"
      }
    },
    "/api/pages": {
      "get": {
        "tags": [
          "Pages (Pro)"
        ],
        "description": "List pages owned by the signed-in account with the selected analytics window.",
        "parameters": [
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                7,
                30,
                90
              ]
            },
            "description": "Window in days; defaults to 30."
          }
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "Owned pages and aggregate stats.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagesOverviewResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "listOwnedPages"
      },
      "post": {
        "tags": [
          "Pages (Pro)"
        ],
        "description": "Create another page for the signed-in account. Free plans allow one page; active Pro allows three.",
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "New page created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePageResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "createOwnedPage",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePageInput"
              }
            }
          }
        }
      }
    },
    "/api/github/chart": {
      "get": {
        "tags": [
          "Public unfurls — GitHub · links"
        ],
        "description": "Return a contribution graph as SVG. A stale cached chart includes X-Chart-Stale: 1.",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "GitHub username."
          },
          {
            "name": "theme",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "GitHub contribution graph SVG.",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid username.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "502": {
            "description": "GitHub is unavailable and no cached chart exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getGitHubContributionChart"
      }
    },
    "/api/github/preview": {
      "get": {
        "tags": [
          "Public unfurls — GitHub · links"
        ],
        "description": "Fetch a cached GitHub user/organization or repository preview. A stale cached response sets stale=true.",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "GitHub username or organization."
          },
          {
            "name": "repo",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Repository name; omit for profile."
          },
          {
            "name": "nocache",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Set to 1 to bypass the cache."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "GitHub profile, organization, or repository preview.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GitHubPreviewResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getGitHubPreview"
      }
    },
    "/api/link/meta": {
      "get": {
        "tags": [
          "Public unfurls — GitHub · links"
        ],
        "description": "Fetch public metadata from a safe HTTP(S) URL. Bot-walled or unavailable sites may return an error.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "description": "Public HTTP(S) URL."
          },
          {
            "name": "nocache",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Set to 1 to bypass the cache."
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Fetched metadata, possibly stale from cache.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkMetaResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "getLinkMetadata"
      }
    },
    "/api/auth/providers": {
      "get": {
        "tags": [
          "Accounts & sign-in"
        ],
        "summary": "List sign-in providers",
        "operationId": "getAuthProviders",
        "description": "Return which sign-in providers are enabled by the current runtime configuration.",
        "security": [],
        "responses": {
          "200": {
            "description": "Provider capability flags.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthProvidersResponse"
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/magic/verify": {
      "get": {
        "tags": [
          "Accounts & sign-in"
        ],
        "summary": "Verify a magic sign-in link",
        "operationId": "verifyMagicLink",
        "description": "Consume a one-time magic link. A valid link sets mr_session and redirects to the saved return path or admin page.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "302": {
            "description": "Valid link; redirect to the account destination.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Set-Cookie": {
                "description": "HttpOnly mr_session cookie.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Missing, expired, or already-used token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/auth/oauth/callback": {
      "get": {
        "tags": [
          "Accounts & sign-in"
        ],
        "summary": "Complete OAuth sign-in",
        "operationId": "completeOAuthSignIn",
        "description": "OAuth provider callback. A valid callback creates or resumes the account session and redirects to its destination.",
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "google",
                "agentid"
              ]
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "302": {
            "description": "Redirect after provider sign-in.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Set-Cookie": {
                "description": "Session cookie when sign-in succeeds.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Invalid callback, provider error, or provider configuration error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Per-page API key: Authorization: Bearer mr_live_…"
      },
      "session": {
        "type": "apiKey",
        "in": "cookie",
        "name": "mr_session",
        "description": "Owner dashboard session cookie."
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "waitlist": {
            "type": "boolean"
          },
          "upgrade": {
            "type": "boolean"
          },
          "limited": {
            "type": "boolean"
          }
        },
        "required": [
          "error"
        ]
      },
      "AuthPages": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "count",
          "limit"
        ],
        "additionalProperties": false
      },
      "AuthCapabilities": {
        "type": "object",
        "properties": {
          "storeRead": {
            "type": "boolean"
          },
          "storeWrite": {
            "type": "boolean"
          },
          "onboardingWrite": {
            "type": "boolean"
          },
          "pro": {
            "type": "boolean"
          },
          "customDomains": {
            "type": "boolean"
          }
        },
        "required": [
          "storeRead",
          "storeWrite",
          "onboardingWrite",
          "pro",
          "customDomains"
        ],
        "additionalProperties": false
      },
      "WhoamiResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "auth": {
            "type": "string",
            "enum": [
              "api-key"
            ]
          },
          "slug": {
            "type": "string"
          },
          "page": {
            "type": "string",
            "format": "uri"
          },
          "keyId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "planStatus": {
            "type": "string"
          },
          "proActive": {
            "type": "boolean"
          },
          "pages": {
            "$ref": "#/components/schemas/AuthPages"
          },
          "capabilities": {
            "$ref": "#/components/schemas/AuthCapabilities"
          }
        },
        "required": [
          "ok",
          "auth",
          "slug",
          "page",
          "keyId",
          "name",
          "plan",
          "planStatus",
          "proActive",
          "pages",
          "capabilities"
        ],
        "additionalProperties": false
      },
      "ApiKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "createdAt": {
            "type": "integer"
          },
          "lastUsedAt": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "prefix",
          "createdAt",
          "lastUsedAt"
        ],
        "additionalProperties": false
      },
      "ApiKeyListResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiKey"
            }
          }
        },
        "required": [
          "keys"
        ],
        "additionalProperties": false
      },
      "CreateApiKeyInput": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 60
          }
        },
        "required": [
          "slug"
        ],
        "additionalProperties": false
      },
      "ClaimPageInput": {
        "type": "object",
        "properties": {
          "claim": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "claim",
          "slug"
        ],
        "additionalProperties": false
      },
      "CreateApiKeyResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "id": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "Shown once; the API does not return it again."
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "id",
          "slug",
          "name",
          "prefix",
          "key",
          "note"
        ],
        "additionalProperties": false
      },
      "ClaimPageResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          },
          "claimed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "ok",
          "slug",
          "claimed"
        ],
        "additionalProperties": false
      },
      "RevokeApiKeyResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "revoked": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "revoked"
        ],
        "additionalProperties": false
      },
      "SlugAvailabilityResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          },
          "taken": {
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "slug",
          "taken"
        ],
        "additionalProperties": false
      },
      "SignupHumanInput": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 8,
            "maxLength": 256,
            "writeOnly": true
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{1,38}[a-z0-9])?$"
          },
          "onboarding": {
            "type": "object",
            "properties": {}
          }
        },
        "required": [
          "name",
          "email",
          "password",
          "slug"
        ]
      },
      "SignupAgentInput": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{1,38}[a-z0-9])?$"
          },
          "agent": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "onboarding": {
            "type": "object",
            "properties": {}
          }
        },
        "required": [
          "email",
          "slug",
          "agent"
        ]
      },
      "SignupInput": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SignupHumanInput"
          },
          {
            "$ref": "#/components/schemas/SignupAgentInput"
          },
          {
            "$ref": "#/components/schemas/ClaimPageInput"
          }
        ]
      },
      "SignupResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "onboarding": {
            "type": "object",
            "properties": {}
          }
        },
        "required": [
          "ok",
          "slug",
          "name",
          "plan",
          "token",
          "onboarding"
        ]
      },
      "PasswordLoginInput": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "writeOnly": true
          }
        },
        "required": [
          "email",
          "password"
        ],
        "additionalProperties": false
      },
      "SessionLoginResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "slug"
        ],
        "additionalProperties": false
      },
      "MagicRequestInput": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "redir": {
            "type": "string",
            "description": "Optional safe same-origin return path."
          }
        },
        "required": [
          "email"
        ],
        "additionalProperties": false
      },
      "MagicRequestResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "sent": {
            "type": "boolean"
          },
          "devLink": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "ok",
          "sent"
        ]
      },
      "AuthProviderStatus": {
        "type": "object",
        "properties": {
          "magic": {
            "type": "boolean"
          },
          "otp": {
            "type": "boolean"
          },
          "google": {
            "type": "boolean"
          },
          "agentid": {
            "type": "boolean"
          }
        },
        "required": [
          "magic",
          "otp",
          "google",
          "agentid"
        ],
        "additionalProperties": false
      },
      "AuthUser": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "plan": {
            "type": "string"
          },
          "planStatus": {
            "type": "string"
          },
          "providers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "accountType": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "business"
            ]
          }
        },
        "required": [
          "email",
          "name",
          "slug",
          "plan",
          "providers"
        ]
      },
      "SessionResponse": {
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "nullable": true,
            "properties": {
              "email": {
                "type": "string",
                "format": "email"
              },
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "plan": {
                "type": "string"
              },
              "planStatus": {
                "type": "string"
              },
              "providers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "accountType": {
                "type": "string",
                "enum": [
                  "human",
                  "agent",
                  "business"
                ]
              }
            },
            "required": [
              "email",
              "name",
              "slug",
              "plan",
              "providers"
            ],
            "additionalProperties": true
          }
        },
        "required": [
          "user"
        ],
        "additionalProperties": false
      },
      "ProfileInput": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "accountType": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "business"
            ]
          }
        },
        "required": [
          "slug"
        ],
        "additionalProperties": false
      },
      "ProfileResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "user": {
            "$ref": "#/components/schemas/AuthUser"
          }
        },
        "required": [
          "ok",
          "user"
        ],
        "additionalProperties": false
      },
      "AccountDeletedResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "deleted": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "ok",
          "deleted"
        ],
        "additionalProperties": false
      },
      "StoreProfile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "taglineRu": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "cover": {
            "type": "string"
          },
          "mobileCover": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "StoreCard": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "desc": {
            "type": "string"
          },
          "href": {
            "type": "string"
          },
          "cta": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "price": {
            "type": "number"
          },
          "booking": {
            "type": "object",
            "properties": {}
          },
          "checkout": {
            "type": "object",
            "properties": {}
          },
          "accessUrl": {
            "type": "string"
          },
          "deliveryUrl": {
            "type": "string"
          },
          "deliveryFile": {
            "type": "string"
          }
        }
      },
      "StoreUpdate": {
        "type": "object",
        "description": "Only recognized editable slices are saved; delivery links/files are moved to private storage.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreCard"
            }
          },
          "firstLesson": {
            "$ref": "#/components/schemas/StoreCard"
          },
          "calendly": {
            "type": "object",
            "properties": {}
          },
          "calendarProvider": {
            "type": "string",
            "enum": [
              "builtin",
              "google",
              "microsoft",
              "calendly"
            ]
          },
          "testimonials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "socials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "payments": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "currency": {
                "type": "string"
              }
            }
          },
          "brand": {
            "type": "string",
            "maxLength": 120
          },
          "currency": {
            "type": "string",
            "maxLength": 3
          },
          "displayCurrency": {
            "type": "string"
          },
          "analytics": {
            "type": "object",
            "properties": {
              "googleMeasurementId": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "levelQuiz": {
            "type": "object",
            "properties": {}
          },
          "teaching": {
            "type": "boolean"
          },
          "onboarding": {
            "type": "object",
            "properties": {}
          },
          "accountType": {
            "type": "string",
            "enum": [
              "human",
              "agent",
              "business"
            ]
          },
          "design": {
            "type": "object",
            "properties": {}
          },
          "favicon": {
            "type": "string"
          },
          "desktopBg": {
            "type": "object",
            "properties": {}
          },
          "profile": {
            "$ref": "#/components/schemas/StoreProfile"
          }
        }
      },
      "StoreSnapshot": {
        "type": "object",
        "description": "Saved page snapshot. Older snapshots may contain additional legacy properties.",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreCard"
            }
          },
          "firstLesson": {
            "$ref": "#/components/schemas/StoreCard"
          },
          "calendly": {
            "type": "object",
            "properties": {}
          },
          "calendarProvider": {
            "type": "string"
          },
          "testimonials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "sections": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "socials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "payments": {
            "type": "object",
            "properties": {}
          },
          "brand": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "displayCurrency": {
            "type": "string"
          },
          "analytics": {
            "type": "object",
            "properties": {}
          },
          "levelQuiz": {
            "type": "object",
            "properties": {}
          },
          "teaching": {
            "type": "boolean"
          },
          "onboarding": {
            "type": "object",
            "properties": {}
          },
          "accountType": {
            "type": "string"
          },
          "design": {
            "type": "object",
            "properties": {}
          },
          "favicon": {
            "type": "string"
          },
          "desktopBg": {
            "type": "object",
            "properties": {}
          },
          "profile": {
            "$ref": "#/components/schemas/StoreProfile"
          },
          "snapshotVersion": {
            "type": "string"
          }
        }
      },
      "OkResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "ok"
        ],
        "additionalProperties": false
      },
      "BookingInput": {
        "type": "object",
        "description": "Use card with a numeric index or \"fl\" for the featured offer, or set fl:true. Name, email, date and slot are required. The slug is supplied in the query string.",
        "properties": {
          "card": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "string",
                "pattern": "^(?:[0-9]+|fl)$"
              }
            ]
          },
          "fl": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "mail": {
            "type": "string",
            "format": "email"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "slot": {
            "type": "string",
            "pattern": "^\\d{1,2}:\\d{2}$"
          },
          "level": {
            "type": "string",
            "enum": [
              "A1",
              "A2",
              "B1",
              "B2",
              "C1",
              "C2",
              "unknown"
            ]
          },
          "levelSource": {
            "type": "string",
            "enum": [
              "quiz",
              "self"
            ]
          }
        },
        "required": [
          "name",
          "mail",
          "date",
          "slot"
        ],
        "additionalProperties": true,
        "anyOf": [
          {
            "required": [
              "card"
            ]
          },
          {
            "required": [
              "fl"
            ]
          }
        ]
      },
      "Booking": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "ts": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "mail": {
            "type": "string",
            "format": "email"
          },
          "card": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "slot": {
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "levelSource": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "paymentStatus": {
            "type": "string"
          },
          "calendarProvider": {
            "type": "string"
          }
        }
      },
      "BookingCreateResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "requested"
            ]
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "status",
          "id"
        ],
        "additionalProperties": false
      },
      "BookingsResponse": {
        "type": "object",
        "properties": {
          "bookings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Booking"
            }
          }
        },
        "required": [
          "bookings"
        ],
        "additionalProperties": false
      },
      "LeadInput": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "contact": {
            "type": "string",
            "minLength": 4,
            "maxLength": 120
          },
          "goal": {
            "type": "string",
            "maxLength": 20
          },
          "lang": {
            "type": "string",
            "enum": [
              "en",
              "ru"
            ]
          },
          "src": {
            "type": "string",
            "maxLength": 40
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "name",
          "contact"
        ]
      },
      "Lead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "ts": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "contact": {
            "type": "string"
          },
          "goal": {
            "type": "string"
          },
          "lang": {
            "type": "string",
            "enum": [
              "en",
              "ru"
            ]
          },
          "src": {
            "type": "string"
          },
          "fields": {
            "type": "object",
            "properties": {}
          }
        },
        "required": [
          "id",
          "ts",
          "name",
          "contact",
          "goal",
          "lang",
          "src"
        ]
      },
      "LeadCreateResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "id"
        ],
        "additionalProperties": false
      },
      "LeadsResponse": {
        "type": "object",
        "properties": {
          "leads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Lead"
            }
          }
        },
        "required": [
          "leads"
        ],
        "additionalProperties": false
      },
      "CourseProgressInput": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CourseEnrollInput"
          },
          {
            "$ref": "#/components/schemas/CourseLessonInput"
          }
        ]
      },
      "CourseStudent": {
        "type": "object",
        "properties": {
          "course": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          },
          "startedAt": {
            "type": "string",
            "format": "date-time"
          },
          "completedLessons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastActivityAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "course",
          "email",
          "name",
          "startedAt",
          "completedLessons"
        ]
      },
      "CourseProgressResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "enrolled": {
                "type": "boolean",
                "enum": [
                  true
                ]
              }
            },
            "required": [
              "ok",
              "enrolled"
            ],
            "additionalProperties": false
          },
          {
            "$ref": "#/components/schemas/OkResponse"
          }
        ]
      },
      "CourseStudentsResponse": {
        "type": "object",
        "properties": {
          "students": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CourseStudent"
            }
          }
        },
        "required": [
          "students"
        ],
        "additionalProperties": false
      },
      "AnalyticsInput": {
        "type": "object",
        "description": "Only events with analyticsConsent:true are recorded; absent/false consent returns {ok:true,ignored:true}. type=click records a click; other values count as a visit, except booking which is rejected because booking analytics are server-controlled.",
        "properties": {
          "analyticsConsent": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "visit",
              "click",
              "booking"
            ]
          },
          "item": {
            "type": "string"
          },
          "x": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "y": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "eventId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "referrer": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": []
      },
      "AnalyticsDay": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "visits": {
            "type": "integer"
          },
          "clicks": {
            "type": "integer"
          },
          "bookings": {
            "type": "integer"
          },
          "revenue": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "visits",
          "clicks",
          "bookings",
          "revenue"
        ],
        "additionalProperties": false
      },
      "AnalyticsTotal": {
        "type": "object",
        "properties": {
          "visits": {
            "type": "integer"
          },
          "clicks": {
            "type": "integer"
          },
          "bookings": {
            "type": "integer"
          },
          "revenue": {
            "type": "number"
          },
          "direct": {
            "type": "integer"
          }
        }
      },
      "AnalyticsRow": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "count": {
            "type": "number"
          }
        }
      },
      "AnalyticsHeatPoint": {
        "type": "object",
        "properties": {
          "x": {
            "type": "number"
          },
          "y": {
            "type": "number"
          },
          "count": {
            "type": "number"
          },
          "weight": {
            "type": "number"
          }
        },
        "required": [
          "x",
          "y",
          "count",
          "weight"
        ],
        "additionalProperties": false
      },
      "AnalyticsResponse": {
        "type": "object",
        "properties": {
          "range": {
            "type": "integer",
            "minimum": 7,
            "maximum": 90
          },
          "days": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsDay"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/AnalyticsTotal"
          },
          "clicks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "countries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsRow"
            }
          },
          "heatmap": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsHeatPoint"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "range",
          "days",
          "totals",
          "clicks",
          "sources",
          "countries",
          "devices",
          "heatmap",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PaymentConfigResponse": {
        "type": "object",
        "properties": {
          "connected": {
            "type": "boolean"
          },
          "stripeConnected": {
            "type": "boolean"
          },
          "stripeKeysConnected": {
            "type": "boolean"
          },
          "stripeWebhookConfigured": {
            "type": "boolean"
          },
          "stripePk": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "stripe"
            ]
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "connected",
          "stripeConnected",
          "stripeKeysConnected",
          "stripeWebhookConfigured",
          "stripePk",
          "provider",
          "enabled"
        ],
        "additionalProperties": false
      },
      "PaymentConfigInput": {
        "type": "object",
        "description": "Compatibility request only. Credential properties secretKey, publishableKey, webhookSecret and shopId are rejected.",
        "not": {
          "anyOf": [
            {
              "required": [
                "secretKey"
              ]
            },
            {
              "required": [
                "publishableKey"
              ]
            },
            {
              "required": [
                "webhookSecret"
              ]
            },
            {
              "required": [
                "shopId"
              ]
            }
          ]
        },
        "additionalProperties": true
      },
      "PaymentConfigSaveResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "connected": {
            "type": "boolean"
          },
          "provider": {
            "type": "string",
            "enum": [
              "stripe"
            ]
          }
        },
        "required": [
          "ok",
          "connected",
          "provider"
        ],
        "additionalProperties": false
      },
      "PayCreateInput": {
        "type": "object",
        "description": "Booking: provide card (numeric index or \"fl\") or fl:true, plus date and slot. Product/course: provide card.index and kind=product or course. In every case name and mail are required.",
        "properties": {
          "slug": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "booking",
              "product",
              "course"
            ]
          },
          "product": {
            "type": "boolean",
            "description": "Legacy product selector."
          },
          "card": {
            "type": "object",
            "properties": {
              "index": {
                "type": "number"
              }
            },
            "required": [
              "index"
            ],
            "additionalProperties": false
          },
          "fl": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "slot": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "mail": {
            "type": "string",
            "format": "email"
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 99
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "paymentPlan": {
            "type": "boolean"
          },
          "level": {
            "type": "string"
          },
          "levelSource": {
            "type": "string",
            "enum": [
              "quiz",
              "self"
            ]
          },
          "checkoutAttemptId": {
            "type": "string",
            "format": "uuid"
          },
          "ret": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "mail"
        ],
        "additionalProperties": true
      },
      "PayCreateResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "paymentId": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3
          },
          "provider": {
            "type": "string",
            "enum": [
              "stripe"
            ]
          }
        },
        "required": [
          "url",
          "paymentId",
          "amount",
          "currency",
          "provider"
        ],
        "additionalProperties": false
      },
      "PaymentStatusResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "free"
                ]
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "hold",
                  "paid"
                ]
              },
              "deliveryUrl": {
                "type": "string"
              },
              "accessLabel": {
                "type": "string"
              }
            },
            "required": [
              "status"
            ],
            "additionalProperties": false
          }
        ]
      },
      "DomainSearchResult": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "renew": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "string",
                "nullable": true
              }
            ]
          },
          "available": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "label",
          "domain",
          "price",
          "available"
        ]
      },
      "DomainSearchResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "enum": [
                  true
                ]
              },
              "q": {
                "type": "string"
              },
              "tld": {
                "type": "string",
                "enum": [
                  ".top"
                ]
              },
              "results": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DomainSearchResult"
                }
              }
            },
            "required": [
              "ok",
              "q",
              "tld",
              "results"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "enum": [
                  false
                ]
              },
              "error": {
                "type": "string"
              }
            },
            "required": [
              "ok",
              "error"
            ],
            "additionalProperties": false
          }
        ]
      },
      "PageSummary": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "brand": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "cards": {
            "type": "integer"
          },
          "domain": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "visits": {
            "type": "number"
          },
          "clicks": {
            "type": "number"
          },
          "bookings": {
            "type": "number"
          },
          "revenue": {
            "type": "number"
          }
        },
        "required": [
          "slug",
          "name",
          "brand",
          "avatar",
          "cards",
          "domain",
          "path",
          "url",
          "visits",
          "clicks",
          "bookings",
          "revenue"
        ],
        "additionalProperties": false
      },
      "PagesOverviewResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "range": {
            "type": "integer",
            "enum": [
              7,
              30,
              90
            ]
          },
          "pages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PageSummary"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/PageTotals"
          },
          "plan": {
            "type": "string"
          },
          "planStatus": {
            "type": "string"
          },
          "pro": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer"
          },
          "canCreate": {
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "range",
          "pages",
          "totals",
          "plan",
          "planStatus",
          "pro",
          "limit",
          "canCreate"
        ],
        "additionalProperties": false
      },
      "CreatePageInput": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "pattern": "^[a-z0-9]([a-z0-9-]{1,38}[a-z0-9])?$"
          },
          "name": {
            "type": "string",
            "maxLength": 80
          }
        },
        "required": [
          "slug"
        ],
        "additionalProperties": false
      },
      "CreatePageResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "redirect": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "slug",
          "name",
          "redirect"
        ],
        "additionalProperties": false
      },
      "GitHubProfilePreview": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "user",
              "org"
            ]
          },
          "login": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "bio": {
            "type": "string"
          },
          "blog": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "repos": {
            "type": "integer"
          },
          "followers": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "kind",
          "login",
          "name",
          "bio",
          "blog",
          "avatar",
          "repos",
          "followers",
          "url",
          "at",
          "stale"
        ],
        "additionalProperties": false
      },
      "GitHubRepoPreview": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "repo"
            ]
          },
          "fullName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "stars": {
            "type": "integer"
          },
          "forks": {
            "type": "integer"
          },
          "avatar": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "homepage": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "kind",
          "fullName",
          "description",
          "language",
          "stars",
          "forks",
          "avatar",
          "owner",
          "url",
          "homepage",
          "at",
          "stale"
        ],
        "additionalProperties": false
      },
      "GitHubPreviewResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/GitHubProfilePreview"
          },
          {
            "$ref": "#/components/schemas/GitHubRepoPreview"
          }
        ]
      },
      "LinkMetaResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "host": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "favicon": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "stale": {
            "type": "boolean"
          }
        },
        "required": [
          "ok",
          "url",
          "host",
          "title",
          "description",
          "image",
          "favicon",
          "at",
          "stale"
        ],
        "additionalProperties": false
      },
      "PageTotals": {
        "type": "object",
        "properties": {
          "visits": {
            "type": "number"
          },
          "clicks": {
            "type": "number"
          },
          "bookings": {
            "type": "number"
          },
          "revenue": {
            "type": "number"
          }
        },
        "required": [
          "visits",
          "clicks",
          "bookings",
          "revenue"
        ],
        "additionalProperties": false
      },
      "CourseEnrollInput": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "idx": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "string"
              }
            ]
          },
          "event": {
            "type": "string",
            "enum": [
              "enroll"
            ]
          },
          "paymentId": {
            "type": "string"
          },
          "mail": {
            "type": "string",
            "format": "email"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "idx",
          "event",
          "paymentId",
          "mail"
        ],
        "additionalProperties": true
      },
      "CourseLessonInput": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "idx": {
            "oneOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "string"
              }
            ]
          },
          "event": {
            "type": "string",
            "enum": [
              "complete",
              "uncomplete"
            ]
          },
          "mail": {
            "type": "string",
            "format": "email"
          },
          "lessonId": {
            "type": "string"
          }
        },
        "required": [
          "idx",
          "event"
        ],
        "additionalProperties": true
      },
      "AuthProvidersResponse": {
        "type": "object",
        "properties": {
          "providers": {
            "$ref": "#/components/schemas/AuthProviderStatus"
          }
        },
        "required": [
          "providers"
        ],
        "additionalProperties": false
      }
    }
  }
}
