{
  "openapi": "3.1.0",
  "info": {
    "title": "RegIntel API",
    "version": "1.0.0"
  },
  "paths": {
    "/": {
      "get": {
        "summary": "Root",
        "operationId": "root__get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RootResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/request-key": {
      "post": {
        "summary": "Request Key Api",
        "operationId": "request_key_api_api_request_key_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_request_key_api_api_request_key_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/send-magic-link": {
      "post": {
        "summary": "Send Magic Link",
        "operationId": "send_magic_link_api_send_magic_link_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_send_magic_link_api_send_magic_link_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageResponse"
                }
              }
            }
          },
          "404": {
            "description": "No account for email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/verify-magic-link": {
      "get": {
        "summary": "Verify Magic Link",
        "operationId": "verify_magic_link_api_verify_magic_link_get",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MagicLinkVerifyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired link",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Account not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/regulations": {
      "get": {
        "summary": "Get Regulations",
        "operationId": "get_regulations_regulations_get",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Canonical jurisdiction filter (e.g. `EU`, `Australia`). Use `GET /jurisdictions` for the full list.",
              "title": "Jurisdiction"
            },
            "description": "Canonical jurisdiction filter (e.g. `EU`, `Australia`). Use `GET /jurisdictions` for the full list."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Canonical category filter (e.g. `Privacy`, `Finance`, `Crypto`, `AML`).",
              "title": "Category"
            },
            "description": "Canonical category filter (e.g. `Privacy`, `Finance`, `Crypto`, `AML`)."
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "DEPRECATED alias for `jurisdiction`. Accepted for backwards compatibility; prefer `jurisdiction` for new integrations.",
              "deprecated": true,
              "title": "Country"
            },
            "description": "DEPRECATED alias for `jurisdiction`. Accepted for backwards compatibility; prefer `jurisdiction` for new integrations.",
            "deprecated": true
          },
          {
            "name": "industry",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "DEPRECATED alias for `category`. Accepted for backwards compatibility; prefer `category` for new integrations.",
              "deprecated": true,
              "title": "Industry"
            },
            "description": "DEPRECATED alias for `category`. Accepted for backwards compatibility; prefer `category` for new integrations.",
            "deprecated": true
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Tag"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1,
              "title": "Page"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulationListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/regulations/{regulation_id}": {
      "get": {
        "summary": "Get Regulation By Id",
        "operationId": "get_regulation_by_id_regulations__regulation_id__get",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "regulation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Regulation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegulationDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/jurisdictions": {
      "get": {
        "summary": "Get Jurisdictions",
        "operationId": "get_jurisdictions_jurisdictions_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JurisdictionsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/api/usage": {
      "get": {
        "summary": "Get Usage",
        "operationId": "get_usage_api_usage_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/create-checkout-session": {
      "post": {
        "summary": "Create Checkout",
        "operationId": "create_checkout_create_checkout_session_post",
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Optional. If supplied, credits are added to the matching account on payment success.",
              "title": "X-Api-Key"
            },
            "description": "Optional. If supplied, credits are added to the matching account on payment success."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_checkout_create_checkout_session_post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/stripe-webhook": {
      "post": {
        "summary": "Stripe Webhook",
        "operationId": "stripe_webhook_stripe_webhook_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookResponse"
                }
              }
            }
          },
          "400": {
            "description": "Signature verification failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "summary": "Get Status",
        "operationId": "get_status_api_status_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          }
        }
      }
    },
    "/updates": {
      "get": {
        "summary": "Get Updates",
        "operationId": "get_updates_updates_get",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Since"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "title": "Jurisdiction"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatesResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/subscribe": {
      "post": {
        "summary": "Subscribe Alerts",
        "operationId": "subscribe_alerts_api_subscribe_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_subscribe_alerts_api_subscribe_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/send-digest": {
      "post": {
        "summary": "Send Digest",
        "description": "Sends a weekly digest email to all subscribers listing recent regulatory changes.\nCall this from a cron job: POST /api/send-digest -H \"x-admin-key: <secret>\"\nAdmin authentication required (REGINTEL_ADMIN_KEY).",
        "operationId": "send_digest_api_send_digest_post",
        "security": [
          {
            "AdminKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 7,
              "title": "Days"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigestResponse"
                }
              }
            }
          },
          "403": {
            "description": "Admin authentication required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Admin endpoints not configured on this server",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/rotate-key": {
      "post": {
        "summary": "Rotate Key",
        "operationId": "rotate_key_api_rotate_key_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateKeyResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/health": {
      "get": {
        "summary": "Health Check",
        "operationId": "health_check_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          }
        }
      }
    },
    "/compliance-check": {
      "get": {
        "summary": "Compliance Check",
        "operationId": "compliance_check_compliance_check_get",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "country",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Country code (e.g. `AU`, `US`, `UK`, `EU`, `SG`) or full name. Accepts ISO 3166-1 alpha-2 / alpha-3 / English name.",
              "title": "Country"
            },
            "description": "Country code (e.g. `AU`, `US`, `UK`, `EU`, `SG`) or full name. Accepts ISO 3166-1 alpha-2 / alpha-3 / English name."
          },
          {
            "name": "activity",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Regulated activity or sector. Canonical values are listed in the `enum` schema; common synonyms (e.g. `cryptocurrency`, `crypto_exchange`, `defi`, `nft` -> Crypto; `investment`, `trading` -> Finance; `gdpr`, `data` -> Privacy; `money_laundering` -> AML) are also accepted by the server for backwards compatibility, but new integrations should send a canonical value.",
              "enum": [
                "crypto",
                "finance",
                "banking",
                "payments",
                "lending",
                "privacy",
                "data_protection",
                "aml",
                "kyc"
              ],
              "title": "Activity"
            },
            "description": "Regulated activity or sector. Canonical values are listed in the `enum` schema; common synonyms (e.g. `cryptocurrency`, `crypto_exchange`, `defi`, `nft` -> Crypto; `investment`, `trading` -> Finance; `gdpr`, `data` -> Privacy; `money_laundering` -> AML) are also accepted by the server for backwards compatibility, but new integrations should send a canonical value."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCheckResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing or unknown country/activity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/aasb-s2/obligations": {
      "get": {
        "summary": "Get Aasb S2 Obligations",
        "description": "List Australian AASB-S2 (Climate-related Financial Disclosures) disclosure obligations.\n\nINFORMATION ONLY. This endpoint returns the disclosure obligations imposed\nby AASB-S2 structured against the three Phase 1 tables (aasb_s2_groups,\naasb_s2_requirements, aasb_s2_applicability). It does NOT calculate\nemissions, does NOT determine which Group an entity falls into, and does\nNOT determine Chapter 2M scope (the entity-level reporting-obligation gate\nthat precedes Group classification). See the advisory in the response meta.",
        "operationId": "get_aasb_s2_obligations_aasb_s2_obligations_get",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "group",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "maximum": 3,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter by entity Group tier under AASB-S2 phase-in. 1=largest (from FY 2025), 2=mid-tier (from FY 2026), 3=smaller (from FY 2027). The API does NOT determine which Group an entity falls into; the caller classifies based on the entity's facts.",
              "title": "Group"
            },
            "description": "Filter by entity Group tier under AASB-S2 phase-in. 1=largest (from FY 2025), 2=mid-tier (from FY 2026), 3=smaller (from FY 2027). The API does NOT determine which Group an entity falls into; the caller classifies based on the entity's facts."
          },
          {
            "name": "category_code",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filter to a specific AASB-S2 disclosure category. See AASB_S2_CATEGORY_CODES.",
              "enum": [
                "AASB-S2-GOV",
                "AASB-S2-STR-RISK",
                "AASB-S2-STR-IMPACT",
                "AASB-S2-STR-RESIL",
                "AASB-S2-STR-TRANS",
                "AASB-S2-RISK-MGT",
                "AASB-S2-MET-GHG-S1",
                "AASB-S2-MET-GHG-S2",
                "AASB-S2-MET-GHG-S3",
                "AASB-S2-MET-INTENSITY",
                "AASB-S2-MET-TARGETS",
                "AASB-S2-MET-CAPEX",
                "AASB-S2-MET-INDUSTRY"
              ],
              "title": "Category Code"
            },
            "description": "Filter to a specific AASB-S2 disclosure category. See AASB_S2_CATEGORY_CODES."
          },
          {
            "name": "reporting_year",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 2024
                },
                {
                  "type": "null"
                }
              ],
              "description": "Reporting year (e.g. 2026). When supplied, response items include `applicable` and `assurance_level` reflecting phase-in.",
              "title": "Reporting Year"
            },
            "description": "Reporting year (e.g. 2026). When supplied, response items include `applicable` and `assurance_level` reflecting phase-in."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AASBS2ObligationsResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Insufficient credits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid group or reporting_year parameter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "summary": "Contact Form",
        "operationId": "contact_form_api_contact_post",
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/Body_contact_form_api_contact_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "500": {
            "description": "Email delivery failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AASBS2GroupApplicability": {
        "properties": {
          "group_code": {
            "type": "string",
            "title": "Group Code",
            "description": "'group_1' | 'group_2' | 'group_3'."
          },
          "group_label": {
            "type": "string",
            "title": "Group Label"
          },
          "first_reporting_period_start_date": {
            "type": "string",
            "title": "First Reporting Period Start Date",
            "description": "ISO date \u2014 the FY commencement date at which this Group first reports under AASB S2."
          },
          "applies": {
            "type": "boolean",
            "title": "Applies",
            "description": "Whether the requirement is in force for this group in the queried context. When `reporting_year` is not provided, this is True if the requirement is in scope overall (i.e. survives to the group's first reporting period). When `reporting_year` is provided, this narrows to the year-specific answer (False if the group has not yet started reporting or if a Year-1-style relief disables the obligation in that year)."
          },
          "assurance_level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assurance Level",
            "description": "'limited' (review) or 'reasonable' (audit) assurance applicable in the queried reporting year. Engagement requirements per AUASB ASSA 5000; phase-in timing per ASSA 5010. NULL when reporting_year is not provided OR when the ASSA 5010 per-year matrix has not yet been seeded for this requirement \u00d7 group \u00d7 year."
          },
          "reliefs": {
            "items": {
              "$ref": "#/components/schemas/AASBS2Relief"
            },
            "type": "array",
            "title": "Reliefs",
            "description": "Reliefs and modified-liability protections that apply to this requirement \u00d7 group."
          }
        },
        "type": "object",
        "required": [
          "group_code",
          "group_label",
          "first_reporting_period_start_date",
          "applies"
        ],
        "title": "AASBS2GroupApplicability",
        "description": "How one AASB-S2 requirement applies to one Group tier.\n\nDefault: requirements apply to all groups from each group's\n`first_reporting_period_start_date`. Reliefs and protected-statement\nwindows override that default for specific years / disclosures."
      },
      "AASBS2Meta": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "group_filter": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Group Filter"
          },
          "category_code_filter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Code Filter"
          },
          "reporting_year": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reporting Year"
          },
          "credits_used": {
            "type": "integer",
            "title": "Credits Used"
          },
          "advisory": {
            "type": "string",
            "title": "Advisory",
            "description": "Liability-boundary advisory string. Emitted on every response. Not customisable per-tier."
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Sources",
            "description": "The underlying instruments this response is structured against."
          }
        },
        "type": "object",
        "required": [
          "total",
          "credits_used",
          "advisory"
        ],
        "title": "AASBS2Meta"
      },
      "AASBS2Obligation": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "requirement_code": {
            "type": "string",
            "title": "Requirement Code",
            "description": "Stable code, e.g. 'AASB-S2-REQ-001'."
          },
          "pillar": {
            "type": "string",
            "title": "Pillar",
            "description": "One of: 'governance', 'strategy', 'risk_management', 'metrics_targets', 'general'."
          },
          "category_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Code",
            "description": "Coarse AASB-S2 disclosure category (e.g. 'AASB-S2-MET-GHG-S3'). Used for backward-compat filtering. Multiple requirements may share a category_code."
          },
          "paragraph_ref": {
            "type": "string",
            "title": "Paragraph Ref",
            "description": "AASB S2 paragraph reference, e.g. '\u00b66(a)' or '\u00b629(a)(i)(3), (vi)'."
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "obligation_text": {
            "type": "string",
            "title": "Obligation Text",
            "description": "Plain-language paraphrase of the obligation. The standard text itself is not reproduced (IFRS Foundation copyright)."
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "'qualitative' | 'quantitative' | 'governance'."
          },
          "source_url": {
            "type": "string",
            "title": "Source Url",
            "description": "URL to the AASB S2 standard."
          },
          "applicability_per_group": {
            "additionalProperties": {
              "$ref": "#/components/schemas/AASBS2GroupApplicability"
            },
            "type": "object",
            "title": "Applicability Per Group",
            "description": "Per-group applicability, keyed by group_code. Encodes when the requirement first applies and any reliefs that override the default."
          },
          "measurement_categories": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Measurement Categories",
            "description": "What activity / emission categories must be measured to satisfy this disclosure obligation. E.g. for AASB-S2-MET-GHG-S3: ['Scope 3 Category 1: purchased goods and services', 'Scope 3 Category 11: use of sold products']. The calculator consumes this to know what to compute; RegIntel does NOT compute."
          },
          "methodology_references": {
            "items": {
              "$ref": "#/components/schemas/MethodologyReference"
            },
            "type": "array",
            "title": "Methodology References",
            "description": "Authoritative how-to sources (GHG Protocol, ISO 14064-1, NGER Determination, etc.) that a calculator product should consult to implement the obligation's quantitative side. Each reference names a standard, its publisher, and a direct URL to the authoritative text."
          },
          "assurance_inputs_required": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Assurance Inputs Required",
            "description": "Evidence categories an AUASB ASSA 5000 assuror will expect to see in the entity's working papers when forming an assurance opinion on this disclosure (review = limited assurance; audit = reasonable assurance, per ASSA 5010 phase-in). E.g. ['Activity data source documentation', 'Methodology selection rationale', 'Factor vintage rationale', 'Operational-vs-financial-control boundary declaration']."
          },
          "reporting_templates": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Reporting Templates",
            "description": "AASB-S2 industry-specific reporting template references where applicable (e.g. financial-services Pillar 3 climate addenda, energy-sector NGER-aligned templates). Empty list when no industry-specific template applies to this obligation."
          }
        },
        "type": "object",
        "required": [
          "id",
          "requirement_code",
          "pillar",
          "paragraph_ref",
          "title",
          "obligation_text",
          "type",
          "source_url",
          "applicability_per_group"
        ],
        "title": "AASBS2Obligation",
        "description": "One AASB-S2 disclosure obligation, structured as a regulatory-\nauthority-layer entry for downstream sustainability calculation\nproducts (Persefoni, Watershed, Sweep, in-house tooling, etc.).\n\nThe calculator-ready annotations (measurement_categories,\nmethodology_references, assurance_inputs_required, reporting_templates)\nname WHAT to measure and WHERE to read the authoritative methodology \u2014\nthey do NOT calculate emissions or judge assurance. That positioning\nmakes RegIntel the regulatory authority layer for the AASB-S2\ncalculation tooling market, rather than a competitor to the calculation\ntools themselves.\n\nBacked by the three Phase 1 tables: aasb_s2_requirements (this row),\naasb_s2_groups (per-group reporting commencement), aasb_s2_applicability\n(reliefs and modified-liability protections that override the default)."
      },
      "AASBS2ObligationsResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/AASBS2Obligation"
            },
            "type": "array",
            "title": "Data"
          },
          "meta": {
            "$ref": "#/components/schemas/AASBS2Meta"
          }
        },
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "title": "AASBS2ObligationsResponse"
      },
      "AASBS2Relief": {
        "properties": {
          "relief_type": {
            "type": "string",
            "title": "Relief Type",
            "description": "Discriminator. Known values: 'scope_3_year1_exemption' (AASB S2 Appendix C4(b)); 'measurement_method_year1' (Appendix C4(a)); 'no_comparatives_year1' (Appendix C3); 'modified_liability_protected_statement' (Corporations Act + RG 280, 1 Jan 2025 \u2013 31 Dec 2027); 'all_forward_looking_protected_group1_y1' (Group 1 Year 1 extension)."
          },
          "relief_summary": {
            "type": "string",
            "title": "Relief Summary",
            "description": "Plain-language summary of the relief's effect."
          },
          "relief_effective_start": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relief Effective Start",
            "description": "ISO date \u2014 earliest FY commencement at which this relief applies."
          },
          "relief_expiry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Relief Expiry",
            "description": "ISO date \u2014 FY commencement date after which this relief no longer applies."
          },
          "source_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Reference",
            "description": "Citation to the source provision (e.g. 'AASB S2 Appendix C4(b)')."
          }
        },
        "type": "object",
        "required": [
          "relief_type",
          "relief_summary"
        ],
        "title": "AASBS2Relief",
        "description": "One relief or modified-liability protection attached to a\nrequirement \u00d7 group \u00d7 time-window. Reliefs flow up from the\naasb_s2_applicability table."
      },
      "ApiKeyResponse": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key"
          }
        },
        "type": "object",
        "required": [
          "api_key"
        ],
        "title": "ApiKeyResponse"
      },
      "Body_contact_form_api_contact_post": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "topic": {
            "type": "string",
            "title": "Topic"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "name",
          "email",
          "topic",
          "message"
        ],
        "title": "Body_contact_form_api_contact_post"
      },
      "Body_create_checkout_create_checkout_session_post": {
        "properties": {
          "price_id": {
            "type": "string",
            "title": "Price Id"
          }
        },
        "type": "object",
        "required": [
          "price_id"
        ],
        "title": "Body_create_checkout_create_checkout_session_post"
      },
      "Body_request_key_api_api_request_key_post": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "Body_request_key_api_api_request_key_post"
      },
      "Body_send_magic_link_api_send_magic_link_post": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "Body_send_magic_link_api_send_magic_link_post"
      },
      "Body_subscribe_alerts_api_subscribe_post": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "jurisdiction": {
            "type": "string",
            "title": "Jurisdiction"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "Body_subscribe_alerts_api_subscribe_post"
      },
      "CheckoutResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "CheckoutResponse"
      },
      "ComplianceCheckResult": {
        "properties": {
          "country": {
            "type": "string",
            "title": "Country",
            "description": "DEPRECATED alias for `jurisdiction`. Returned for backwards compatibility; resolves the request `country` param to its canonical DB name (e.g. `AU` -> `Australia`).",
            "deprecated": true
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction",
            "description": "Canonical jurisdiction name. Mirrors the legacy `country` field."
          },
          "activity": {
            "type": "string",
            "title": "Activity"
          },
          "industry": {
            "type": "string",
            "title": "Industry",
            "description": "DEPRECATED alias for `category`. Returned for backwards compatibility.",
            "deprecated": true
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category",
            "description": "Canonical regulation category. Mirrors the legacy `industry` field."
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "risk_level": {
            "type": "string",
            "title": "Risk Level"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "penalties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Penalties"
          },
          "regulations_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regulations Count"
          },
          "regulations": {
            "items": {
              "$ref": "#/components/schemas/ComplianceRegulation"
            },
            "type": "array",
            "title": "Regulations",
            "default": []
          },
          "disclaimer": {
            "type": "string",
            "title": "Disclaimer"
          },
          "data_updated": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Updated"
          }
        },
        "type": "object",
        "required": [
          "country",
          "activity",
          "industry",
          "status",
          "risk_level",
          "summary",
          "disclaimer"
        ],
        "title": "ComplianceCheckResult"
      },
      "ComplianceRegulation": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "regulation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regulation"
          },
          "obligations": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Obligations"
          },
          "penalties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Penalties"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope"
          },
          "key_articles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Articles"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          },
          "effective_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective Date"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "ComplianceRegulation"
      },
      "DigestResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "sent": {
            "type": "integer",
            "title": "Sent"
          },
          "changes": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Changes"
          }
        },
        "type": "object",
        "required": [
          "message",
          "sent"
        ],
        "title": "DigestResponse"
      },
      "ErrorResponse": {
        "properties": {
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ],
            "title": "Detail"
          }
        },
        "type": "object",
        "required": [
          "detail"
        ],
        "title": "ErrorResponse",
        "description": "Standard error body returned by HTTPException. `detail` may be a plain\nstring (most 4xx/5xx) or an object (e.g. 402 insufficient_credits)."
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HealthResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "HealthResponse"
      },
      "JurisdictionEntry": {
        "properties": {
          "jurisdiction": {
            "type": "string",
            "title": "Jurisdiction"
          },
          "regulation_count": {
            "type": "integer",
            "title": "Regulation Count"
          }
        },
        "type": "object",
        "required": [
          "jurisdiction",
          "regulation_count"
        ],
        "title": "JurisdictionEntry"
      },
      "JurisdictionsMeta": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "credits_used": {
            "type": "integer",
            "title": "Credits Used"
          }
        },
        "type": "object",
        "required": [
          "total",
          "credits_used"
        ],
        "title": "JurisdictionsMeta"
      },
      "JurisdictionsResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/JurisdictionEntry"
            },
            "type": "array",
            "title": "Data"
          },
          "meta": {
            "$ref": "#/components/schemas/JurisdictionsMeta"
          }
        },
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "title": "JurisdictionsResponse"
      },
      "MagicLinkVerifyResponse": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "credits": {
            "type": "integer",
            "title": "Credits"
          },
          "email": {
            "type": "string",
            "title": "Email"
          }
        },
        "type": "object",
        "required": [
          "api_key",
          "credits",
          "email"
        ],
        "title": "MagicLinkVerifyResponse"
      },
      "MessageResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "MessageResponse"
      },
      "MethodologyReference": {
        "properties": {
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Name of the standard / methodology / determination."
          },
          "publisher": {
            "type": "string",
            "title": "Publisher",
            "description": "Issuing body (e.g. WRI/WBCSD, ISO, Australian Government)."
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url",
            "description": "Direct URL to the authoritative text."
          },
          "section": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Section",
            "description": "Specific section or chapter to consult, if applicable."
          }
        },
        "type": "object",
        "required": [
          "title",
          "publisher"
        ],
        "title": "MethodologyReference",
        "description": "Authoritative how-to source that a downstream calculator product\nshould consult when implementing the obligation's quantitative side."
      },
      "Regulation": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "short_title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Short Title",
            "description": "Short canonical title (e.g. `EDPB-EDPS Joint Opinion 2/2026 on Digital Omnibus GDPR Amendments`). Populated for rows added via the research loop; older hand-curated rows may be null. Prefer this over the longer `regulation` text for headings and list items in renderings."
          },
          "uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uri",
            "description": "Canonical URI for this regulation resource. Use as a stable identifier for citation, vector-store keying, or follow-up calls. Matches `https://api.regintelapi.com/regulations/{id}`."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "DEPRECATED alias for `jurisdiction`. Returned for backwards compatibility; new integrations should read `jurisdiction`.",
            "deprecated": true
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction",
            "description": "Canonical jurisdiction name or code (e.g. `EU`, `Australia`, `US`). Mirrors the legacy `country` field."
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry",
            "description": "DEPRECATED alias for `category`. Returned for backwards compatibility; new integrations should read `category`.",
            "deprecated": true
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category",
            "description": "Canonical regulation category (e.g. `Privacy`, `Finance`, `Crypto`, `AML`). Mirrors the legacy `industry` field."
          },
          "regulation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regulation"
          },
          "obligations": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Obligations"
          },
          "scope": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scope"
          },
          "tags": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tags"
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Url"
          },
          "key_articles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Key Articles"
          },
          "penalties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Penalties"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "change_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Type"
          },
          "change_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Summary"
          },
          "change_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Date",
            "description": "ISO date when the regulator announced or published the change (distinct from `updated_at`, which is when we ingested it). Populated for rows added via the research loop."
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "effective_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective Date"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Regulation"
      },
      "RegulationDetailMeta": {
        "properties": {
          "credits_used": {
            "type": "integer",
            "title": "Credits Used"
          }
        },
        "type": "object",
        "required": [
          "credits_used"
        ],
        "title": "RegulationDetailMeta"
      },
      "RegulationDetailResponse": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Regulation"
          },
          "meta": {
            "$ref": "#/components/schemas/RegulationDetailMeta"
          }
        },
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "title": "RegulationDetailResponse"
      },
      "RegulationListMeta": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "page": {
            "type": "integer",
            "title": "Page"
          }
        },
        "type": "object",
        "required": [
          "total",
          "limit",
          "offset",
          "page"
        ],
        "title": "RegulationListMeta"
      },
      "RegulationListResponse": {
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/Regulation"
            },
            "type": "array",
            "title": "Data"
          },
          "meta": {
            "$ref": "#/components/schemas/RegulationListMeta"
          }
        },
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "title": "RegulationListResponse"
      },
      "RootResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "message"
        ],
        "title": "RootResponse"
      },
      "RotateKeyResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "api_key": {
            "type": "string",
            "title": "Api Key"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "credits": {
            "type": "integer",
            "title": "Credits"
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          }
        },
        "type": "object",
        "required": [
          "message",
          "api_key",
          "email",
          "credits",
          "plan"
        ],
        "title": "RotateKeyResponse"
      },
      "StatusResponse": {
        "properties": {
          "services": {
            "items": {
              "$ref": "#/components/schemas/StatusService"
            },
            "type": "array",
            "title": "Services"
          },
          "uptime": {
            "type": "string",
            "title": "Uptime"
          },
          "incidents": {
            "type": "integer",
            "title": "Incidents"
          }
        },
        "type": "object",
        "required": [
          "services",
          "uptime",
          "incidents"
        ],
        "title": "StatusResponse"
      },
      "StatusService": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "path": {
            "type": "string",
            "title": "Path"
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "name",
          "path",
          "status"
        ],
        "title": "StatusService"
      },
      "SubscribeResponse": {
        "properties": {
          "message": {
            "type": "string",
            "title": "Message"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction"
          }
        },
        "type": "object",
        "required": [
          "message",
          "email"
        ],
        "title": "SubscribeResponse"
      },
      "SuccessResponse": {
        "properties": {
          "success": {
            "type": "boolean",
            "title": "Success"
          }
        },
        "type": "object",
        "required": [
          "success"
        ],
        "title": "SuccessResponse"
      },
      "UpdateRecord": {
        "properties": {
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uri",
            "description": "Canonical URI for this regulation resource. Same shape as `Regulation.uri`."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country",
            "description": "DEPRECATED alias for `jurisdiction`. Returned for backwards compatibility.",
            "deprecated": true
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction",
            "description": "Canonical jurisdiction name or code. Mirrors the legacy `country` field."
          },
          "industry": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Industry",
            "description": "DEPRECATED alias for `category`. Returned for backwards compatibility.",
            "deprecated": true
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category",
            "description": "Canonical regulation category. Mirrors the legacy `industry` field."
          },
          "regulation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Regulation"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "change_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Type"
          },
          "change_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Change Summary"
          },
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version"
          },
          "effective_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective Date"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "UpdateRecord"
      },
      "UpdatesResponse": {
        "properties": {
          "since": {
            "type": "string",
            "title": "Since"
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Jurisdiction"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "data": {
            "items": {
              "$ref": "#/components/schemas/UpdateRecord"
            },
            "type": "array",
            "title": "Data"
          }
        },
        "type": "object",
        "required": [
          "since",
          "total",
          "data"
        ],
        "title": "UpdatesResponse"
      },
      "UsageDayPoint": {
        "properties": {
          "date": {
            "type": "string",
            "title": "Date"
          },
          "count": {
            "type": "integer",
            "title": "Count"
          }
        },
        "type": "object",
        "required": [
          "date",
          "count"
        ],
        "title": "UsageDayPoint"
      },
      "UsageHistoryEntry": {
        "properties": {
          "endpoint": {
            "type": "string",
            "title": "Endpoint"
          },
          "credits_used": {
            "type": "integer",
            "title": "Credits Used"
          },
          "status_code": {
            "type": "integer",
            "title": "Status Code"
          },
          "timestamp": {
            "type": "string",
            "title": "Timestamp"
          }
        },
        "type": "object",
        "required": [
          "endpoint",
          "credits_used",
          "status_code",
          "timestamp"
        ],
        "title": "UsageHistoryEntry"
      },
      "UsageResponse": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email"
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "credits_remaining": {
            "type": "integer",
            "title": "Credits Remaining"
          },
          "credits_total": {
            "type": "integer",
            "title": "Credits Total"
          },
          "requests_today": {
            "type": "integer",
            "title": "Requests Today"
          },
          "requests_total": {
            "type": "integer",
            "title": "Requests Total"
          },
          "chart_data": {
            "items": {
              "$ref": "#/components/schemas/UsageDayPoint"
            },
            "type": "array",
            "title": "Chart Data"
          },
          "usage_history": {
            "items": {
              "$ref": "#/components/schemas/UsageHistoryEntry"
            },
            "type": "array",
            "title": "Usage History"
          }
        },
        "type": "object",
        "required": [
          "email",
          "plan",
          "credits_remaining",
          "credits_total",
          "requests_today",
          "requests_total",
          "chart_data",
          "usage_history"
        ],
        "title": "UsageResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WebhookResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "WebhookResponse"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "description": "Per-account API key. Issue one for free at https://regintelapi.com/get-key.html",
        "in": "header",
        "name": "x-api-key"
      },
      "HTTPBearer": {
        "type": "http",
        "description": "Same API key as `x-api-key`, transported via the standard `Authorization: Bearer <key>` header.",
        "scheme": "bearer"
      },
      "AdminKeyHeader": {
        "type": "apiKey",
        "description": "Shared admin secret. Required for ops endpoints (e.g. /api/send-digest). Not issued to customers; held by the operator and used by internal cron jobs.",
        "in": "header",
        "name": "x-admin-key"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.regintelapi.com",
      "description": "Production"
    }
  ]
}