openapi: 3.1.0
info:
  title: ko.io Financial Data API
  description: |
    Source-traced SEC and market data for AI agents and quants: 13F institutional
    holdings, Form 4 insider trades, congressional trades, spot crypto-ETF
    exposure, stock fundamentals, prices, macro economics, and the EDGAR
    source-document gateway. 200M+ records from SEC EDGAR, updated daily.

    Auth: send your key as 'Authorization: Bearer ko_live_...'. Most data
    endpoints also accept '?demo=true' for a keyless free-tier trial.
    Plan gates: Free (core SEC data, 200 calls/day, 500 rows). Pro $29/mo
    (+ macro, short data, full history, 5,000 rows, 20,000 calls/day). Team
    $99/mo (+ bulk export, 50,000 rows). Enterprise $499/mo (unlimited rows).
    Endpoints requiring a paid plan carry the 'x-plan-gate' extension.
  version: "2.0.0"
servers:
  - url: https://api.ko.io
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: ko.io API key (ko_live_...). Create one at https://ko.io/console/keys
    bearerJwt:
      type: http
      scheme: bearer
      description: Console session JWT (for account/billing endpoints).
  schemas:
    ApiEnvelope:
      type: object
      properties:
        data:
          description: The response payload (array of rows or an object), shape varies by endpoint.
        meta:
          type: object
          description: Pagination + plan metadata (total_count, page, per_page, truncated, upgrade_hint, query_time_ms).

paths:
  /api/health:
    get:
      operationId: "get_health"
      summary: "Service health check."
      tags: ["Meta"]
      description: "Service health check."
      security: []
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
  /api/v1/search:
    get:
      operationId: "get_v1_search"
      summary: "Universal search across institutions, stocks, and congress members. Use FIRST to resolve a name to a CIK/ticker/slug."
      tags: ["Search"]
      description: "Universal search across institutions, stocks, and congress members. Use FIRST to resolve a name to a CIK/ticker/slug. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: q
          in: query
          required: true
          description: "Search query (min 2 chars)"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institutions:
    get:
      operationId: "get_v1_institutions"
      summary: "List institutional investors (13F filers), ranked by portfolio value."
      tags: ["Institutions"]
      description: "List institutional investors (13F filers), ranked by portfolio value. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: search
          in: query
          description: "Filter by name"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institutions/{cik}:
    get:
      operationId: "get_v1_institutions_cik"
      summary: "Institution profile: portfolio value, positions, category, latest quarter."
      tags: ["Institutions"]
      description: "Institution profile: portfolio value, positions, category, latest quarter. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institutions/{cik}/similar:
    get:
      operationId: "get_v1_institutions_cik_similar"
      summary: "Peer institutions by investment-style labels."
      tags: ["Institutions"]
      description: "Peer institutions by investment-style labels. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institutions/{cik}/family-context:
    get:
      operationId: "get_v1_institutions_cik_family-context"
      summary: "Manager-family context (13F-NT consolidation): family head, members, AUM."
      tags: ["Institutions"]
      description: "Manager-family context (13F-NT consolidation): family head, members, AUM. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institutions/aum/{cik}:
    get:
      operationId: "get_v1_institutions_aum_cik"
      summary: "Quarterly AUM history for an institution."
      tags: ["Institutions"]
      description: "Quarterly AUM history for an institution. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institution-activity/{cik}:
    get:
      operationId: "get_v1_institution-activity_cik"
      summary: "Per-quarter activity timeline (added/new/trimmed/cleared counts + values)."
      tags: ["Institutions"]
      description: "Per-quarter activity timeline (added/new/trimmed/cleared counts + values). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/institution-entities/{cik}:
    get:
      operationId: "get_v1_institution-entities_cik"
      summary: "Sub-entities/related CIKs merged into this institution."
      tags: ["Institutions"]
      description: "Sub-entities/related CIKs merged into this institution. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/holdings/{cik}:
    get:
      operationId: "get_v1_holdings_cik"
      summary: "Current 13F holdings of an institution (positions, shares, value, QoQ action)."
      tags: ["Institutions"]
      description: "Current 13F holdings of an institution (positions, shares, value, QoQ action). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: type
          in: query
          description: "Use 'quarters' to list available quarters"
          schema: { type: string }
        - name: quarter
          in: query
          description: "Filter to a quarter (YYYY-MM-DD)"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/family/{slug}:
    get:
      operationId: "get_v1_family_slug"
      summary: "Manager-family profile (consolidated across sub-entity CIKs)."
      tags: ["Institutions"]
      description: "Manager-family profile (consolidated across sub-entity CIKs). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: slug
          in: path
          required: true
          description: "Path parameter: slug"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/family/{slug}/holdings:
    get:
      operationId: "get_v1_family_slug_holdings"
      summary: "Consolidated family holdings (deduped across members)."
      tags: ["Institutions"]
      description: "Consolidated family holdings (deduped across members). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: slug
          in: path
          required: true
          description: "Path parameter: slug"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/companies:
    get:
      operationId: "get_v1_companies"
      summary: "List companies (market cap, price, sector)."
      tags: ["Stocks"]
      description: "List companies (market cap, price, sector). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: search
          in: query
          description: "Filter by name/ticker"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/companies/{ticker}:
    get:
      operationId: "get_v1_companies_ticker"
      summary: "Company profile by ticker."
      tags: ["Stocks"]
      description: "Company profile by ticker. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stocks:
    get:
      operationId: "get_v1_stocks"
      summary: "List stocks (market cap, price, institutional ownership, insider summary)."
      tags: ["Stocks"]
      description: "List stocks (market cap, price, institutional ownership, insider summary). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: search
          in: query
          description: "Filter by name/ticker"
          schema: { type: string }
        - name: sector
          in: query
          description: "Filter by sector"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stocks/{ticker}:
    get:
      operationId: "get_v1_stocks_ticker"
      summary: "Stock profile: market cap, price, PE, 52w, top institutional holders."
      tags: ["Stocks"]
      description: "Stock profile: market cap, price, PE, 52w, top institutional holders. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stocks/{ticker}/financials:
    get:
      operationId: "get_v1_stocks_ticker_financials"
      summary: "Latest fundamentals (revenue, net income, margins, debt, cashflow, ratios)."
      tags: ["Stocks"]
      description: "Latest fundamentals (revenue, net income, margins, debt, cashflow, ratios). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stocks/{ticker}/financials/historical:
    get:
      operationId: "get_v1_stocks_ticker_financials_historical"
      summary: "Historical quarterly/annual financials."
      tags: ["Stocks"]
      description: "Historical quarterly/annual financials. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: period_type
          in: query
          description: "quarterly | annual"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stock-price/{ticker}:
    get:
      operationId: "get_v1_stock-price_ticker"
      summary: "Daily price history."
      tags: ["Stocks"]
      description: "Daily price history. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: period
          in: query
          description: "e.g. 1y, 6m"
          schema: { type: string }
        - name: aggregation
          in: query
          description: "daily | weekly | monthly"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stock-holders/{ticker}:
    get:
      operationId: "get_v1_stock-holders_ticker"
      summary: "Institutional holders of a stock (Top-N, QoQ)."
      tags: ["Stocks"]
      description: "Institutional holders of a stock (Top-N, QoQ). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stock-transactions/{ticker}/{cik}:
    get:
      operationId: "get_v1_stock-transactions_ticker_cik"
      summary: "One institution's transaction history in one stock."
      tags: ["Stocks"]
      description: "One institution's transaction history in one stock. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/congress-trades:
    get:
      operationId: "get_v1_congress-trades"
      summary: "Congressional stock trades (STOCK Act PTR disclosures)."
      tags: ["Congress"]
      description: "Congressional stock trades (STOCK Act PTR disclosures). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: chamber
          in: query
          description: "house | senate"
          schema: { type: string }
        - name: party
          in: query
          description: "party"
          schema: { type: string }
        - name: ticker
          in: query
          description: "ticker"
          schema: { type: string }
        - name: state
          in: query
          description: "state"
          schema: { type: string }
        - name: search
          in: query
          description: "search"
          schema: { type: string }
        - name: sort
          in: query
          description: "sort"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/congress-trades/{member}:
    get:
      operationId: "get_v1_congress-trades_member"
      summary: "Trading history for one member (slug, e.g. 'nancy-pelosi')."
      tags: ["Congress"]
      description: "Trading history for one member (slug, e.g. 'nancy-pelosi'). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: member
          in: path
          required: true
          description: "Path parameter: member"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/congress-trades/dashboard:
    get:
      operationId: "get_v1_congress-trades_dashboard"
      summary: "Congress trading dashboard aggregates + top performers."
      tags: ["Congress"]
      description: "Congress trading dashboard aggregates + top performers. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/congress-trades/performance/{member}:
    get:
      operationId: "get_v1_congress-trades_performance_member"
      summary: "Estimated performance (win rate, alpha) for a member."
      tags: ["Congress"]
      description: "Estimated performance (win rate, alpha) for a member. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: member
          in: path
          required: true
          description: "Path parameter: member"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/congress-trades/stock/{ticker}:
    get:
      operationId: "get_v1_congress-trades_stock_ticker"
      summary: "Congressional trades in one stock."
      tags: ["Congress"]
      description: "Congressional trades in one stock. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/insider-trades:
    get:
      operationId: "get_v1_insider-trades"
      summary: "Insider (Form 4) transactions across all companies."
      tags: ["Insiders"]
      description: "Insider (Form 4) transactions across all companies. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: ticker
          in: query
          description: "ticker"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/insider-trades/summary:
    get:
      operationId: "get_v1_insider-trades_summary"
      summary: "Per-insider open-market buy/sell summary."
      tags: ["Insiders"]
      description: "Per-insider open-market buy/sell summary. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/insider/{cik}:
    get:
      operationId: "get_v1_insider_cik"
      summary: "Insider (person) profile + top companies."
      tags: ["Insiders"]
      description: "Insider (person) profile + top companies. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/insider/{cik}/transactions:
    get:
      operationId: "get_v1_insider_cik_transactions"
      summary: "Full Form 4 transaction history for one insider."
      tags: ["Insiders"]
      description: "Full Form 4 transaction history for one insider. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: ticker
          in: query
          description: "ticker"
          schema: { type: string }
        - name: signal
          in: query
          description: "HIGH | MEDIUM | LOW | UNKNOWN"
          schema: { type: string }
        - name: side
          in: query
          description: "BUY | SELL"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/insider/{cik}/stock/{ticker}:
    get:
      operationId: "get_v1_insider_cik_stock_ticker"
      summary: "One insider's trades in one stock (for chart markers)."
      tags: ["Insiders"]
      description: "One insider's trades in one stock (for chart markers). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/insider/by-company/{ticker}:
    get:
      operationId: "get_v1_insider_by-company_ticker"
      summary: "All insiders of a company with role + open-market activity."
      tags: ["Insiders"]
      description: "All insiders of a company with role + open-market activity. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/executive-trades/{ticker}:
    get:
      operationId: "get_v1_executive-trades_ticker"
      summary: "Executive (officer/director) trades for a company."
      tags: ["Insiders"]
      description: "Executive (officer/director) trades for a company. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/exec-compensation:
    get:
      operationId: "get_v1_exec-compensation"
      summary: "Executive compensation (DEF 14A)."
      tags: ["Insiders"]
      description: "Executive compensation (DEF 14A). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: ticker
          in: query
          description: "ticker"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/form144-notices:
    get:
      operationId: "get_v1_form144-notices"
      summary: "Form 144 proposed-sale notices."
      tags: ["Insiders"]
      description: "Form 144 proposed-sale notices. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: ticker
          in: query
          description: "ticker"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/form144-notices/{ticker}:
    get:
      operationId: "get_v1_form144-notices_ticker"
      summary: "Form 144 notices for one ticker."
      tags: ["Insiders"]
      description: "Form 144 notices for one ticker. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: ticker
          in: path
          required: true
          description: "Path parameter: ticker"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/form144-notices/insider/{cik}:
    get:
      operationId: "get_v1_form144-notices_insider_cik"
      summary: "Form 144 notices filed by one insider."
      tags: ["Insiders"]
      description: "Form 144 notices filed by one insider. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/crypto/institutional-holders:
    get:
      operationId: "get_v1_crypto_institutional-holders"
      summary: "Institutions holding US spot crypto ETFs (BTC complex), ranked by USD."
      tags: ["Crypto"]
      description: "Institutions holding US spot crypto ETFs (BTC complex), ranked by USD. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: product
          in: query
          description: "Filter to one ETF ticker, e.g. IBIT"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/crypto/exposure-summary:
    get:
      operationId: "get_v1_crypto_exposure-summary"
      summary: "Market-wide institutional crypto-ETF exposure + per-ETF breakdown."
      tags: ["Crypto"]
      description: "Market-wide institutional crypto-ETF exposure + per-ETF breakdown. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/crypto/holder/{cik}:
    get:
      operationId: "get_v1_crypto_holder_cik"
      summary: "One institution's spot crypto-ETF positions + rank."
      tags: ["Crypto"]
      description: "One institution's spot crypto-ETF positions + rank. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/dashboard/metrics:
    get:
      operationId: "get_v1_dashboard_metrics"
      summary: "Headline platform metrics."
      tags: ["Dashboards"]
      description: "Headline platform metrics. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/dashboard/trends:
    get:
      operationId: "get_v1_dashboard_trends"
      summary: "Trend aggregates (top movers, large 13F changes)."
      tags: ["Dashboards"]
      description: "Trend aggregates (top movers, large 13F changes). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/data-freshness:
    get:
      operationId: "get_v1_data-freshness"
      summary: "Per-dataset freshness (last updated)."
      tags: ["Meta"]
      description: "Per-dataset freshness (last updated). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/nport-funds:
    get:
      operationId: "get_v1_nport-funds"
      summary: "N-PORT mutual/closed-end funds."
      tags: ["Funds"]
      description: "N-PORT mutual/closed-end funds. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/nport-holdings:
    get:
      operationId: "get_v1_nport-holdings"
      summary: "N-PORT fund holdings."
      tags: ["Funds"]
      description: "N-PORT fund holdings. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/reg-sho-threshold:
    get:
      operationId: "get_v1_reg-sho-threshold"
      summary: "Reg SHO threshold (forced-buy-in watch list)."
      tags: ["Short Data"]
      description: "Reg SHO threshold (forced-buy-in watch list). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/sec/ftd:
    get:
      operationId: "get_v1_sec_ftd"
      summary: "SEC fails-to-deliver for a ticker."
      tags: ["Short Data"]
      description: "SEC fails-to-deliver for a ticker. Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: ticker
          in: query
          required: true
          description: "Ticker (required)"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/filings/{cik}:
    get:
      operationId: "get_v1_filings_cik"
      summary: "List SEC filings for a CIK (EDGAR gateway)."
      tags: ["Filings"]
      description: "List SEC filings for a CIK (EDGAR gateway). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
        - name: form_type
          in: query
          description: "form_type"
          schema: { type: string }
        - name: from
          in: query
          description: "From date YYYY-MM-DD"
          schema: { type: string }
        - name: to
          in: query
          description: "To date YYYY-MM-DD"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/filings/{cik}/{accession}:
    get:
      operationId: "get_v1_filings_cik_accession"
      summary: "Filing index (documents in a filing)."
      tags: ["Filings"]
      description: "Filing index (documents in a filing). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: accession
          in: path
          required: true
          description: "Path parameter: accession"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/filings/{cik}/{accession}/file:
    get:
      operationId: "get_v1_filings_cik_accession_file"
      summary: "Fetch a document from a filing."
      tags: ["Filings"]
      description: "Fetch a document from a filing. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: accession
          in: path
          required: true
          description: "Path parameter: accession"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: name
          in: query
          description: "File name within the filing"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/filings/{cik}/{accession}/asset:
    get:
      operationId: "get_v1_filings_cik_accession_asset"
      summary: "Fetch a referenced asset (signed link)."
      tags: ["Filings"]
      description: "Fetch a referenced asset (signed link). Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: accession
          in: path
          required: true
          description: "Path parameter: accession"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: u
          in: query
          description: "Signed asset URL token"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/filings/{cik}/{accession}/share:
    get:
      operationId: "get_v1_filings_cik_accession_share"
      summary: "Create a shareable signed link to a filing document."
      tags: ["Filings"]
      description: "Create a shareable signed link to a filing document. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: cik
          in: path
          required: true
          description: "Path parameter: cik"
          schema: { type: string }
        - name: accession
          in: path
          required: true
          description: "Path parameter: accession"
          schema: { type: string }
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/treasury/yields:
    get:
      operationId: "get_v1_treasury_yields"
      summary: "US Treasury yield curve."
      tags: ["Macro"]
      description: "US Treasury yield curve. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: days
          in: query
          description: "Lookback days"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/treasury/debt:
    get:
      operationId: "get_v1_treasury_debt"
      summary: "US Treasury debt outstanding."
      tags: ["Macro"]
      description: "US Treasury debt outstanding. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/treasury/auctions:
    get:
      operationId: "get_v1_treasury_auctions"
      summary: "US Treasury auction results."
      tags: ["Macro"]
      description: "US Treasury auction results. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/fed/rates:
    get:
      operationId: "get_v1_fed_rates"
      summary: "Federal Reserve interest rates."
      tags: ["Macro"]
      description: "Federal Reserve interest rates. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: days
          in: query
          description: "days"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/fed/balance-sheet:
    get:
      operationId: "get_v1_fed_balance-sheet"
      summary: "Fed balance sheet."
      tags: ["Macro"]
      description: "Fed balance sheet. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/fed/bank-credit:
    get:
      operationId: "get_v1_fed_bank-credit"
      summary: "Fed bank credit aggregates."
      tags: ["Macro"]
      description: "Fed bank credit aggregates. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/economic/indicators:
    get:
      operationId: "get_v1_economic_indicators"
      summary: "US economic indicators (CPI, PPI, employment, etc.)."
      tags: ["Macro"]
      description: "US economic indicators (CPI, PPI, employment, etc.). Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: category
          in: query
          description: "category"
          schema: { type: string }
        - name: days
          in: query
          description: "days"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/cftc/positions:
    get:
      operationId: "get_v1_cftc_positions"
      summary: "CFTC commitment-of-traders positions."
      tags: ["Macro"]
      description: "CFTC commitment-of-traders positions. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/energy/eia:
    get:
      operationId: "get_v1_energy_eia"
      summary: "EIA energy data."
      tags: ["Macro"]
      description: "EIA energy data. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/fdic/banks:
    get:
      operationId: "get_v1_fdic_banks"
      summary: "FDIC insured banks."
      tags: ["Macro"]
      description: "FDIC insured banks. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/fdic/failures:
    get:
      operationId: "get_v1_fdic_failures"
      summary: "FDIC bank failures."
      tags: ["Macro"]
      description: "FDIC bank failures. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/fdic/financials:
    get:
      operationId: "get_v1_fdic_financials"
      summary: "FDIC bank financials (requires cert_number)."
      tags: ["Macro"]
      description: "FDIC bank financials (requires cert_number). Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: cert_number
          in: query
          required: true
          description: "FDIC cert number (required)"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/stress/ofr:
    get:
      operationId: "get_v1_stress_ofr"
      summary: "OFR financial stress index."
      tags: ["Macro"]
      description: "OFR financial stress index. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: days
          in: query
          description: "days"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/sec/13dg:
    get:
      operationId: "get_v1_sec_13dg"
      summary: "SC 13D/13G activist & beneficial-ownership filings."
      tags: ["SEC Filings"]
      description: "SC 13D/13G activist & beneficial-ownership filings. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/sec/form-d:
    get:
      operationId: "get_v1_sec_form-d"
      summary: "Form D private-offering filings."
      tags: ["SEC Filings"]
      description: "Form D private-offering filings. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/sec/buybacks:
    get:
      operationId: "get_v1_sec_buybacks"
      summary: "8-K buyback announcements."
      tags: ["SEC Filings"]
      description: "8-K buyback announcements. Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo."
      x-plan-gate: pro
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: page
          in: query
          description: "Page number (1-based)."
          schema: { type: integer }
        - name: per_page
          in: query
          description: "Results per page (clamped per plan)."
          schema: { type: integer }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires a paid plan (Pro $29/mo or higher). Returns 403 on Free/demo." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/bulk/export:
    get:
      operationId: "get_v1_bulk_export"
      summary: "Bulk CSV/JSON export of a core table."
      tags: ["Bulk"]
      description: "Bulk CSV/JSON export of a core table. Requires Team plan or higher (bulk export). Returns 403 below Team."
      x-plan-gate: team
      security: [{ apiKey: [] }, {}]
      parameters:
        - name: demo
          in: query
          description: "Set true to use the free demo tier without a key."
          schema: { type: boolean }
        - name: table
          in: query
          required: true
          description: "Table name"
          schema: { type: string }
        - name: format
          in: query
          description: "csv | json"
          schema: { type: string }
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Missing or invalid API key" }
        '403': { description: "Requires Team plan or higher (bulk export). Returns 403 below Team." }
        '404': { description: "Entity not found" }
        '429': { description: "Rate limit exceeded" }
  /api/v1/favorites:
    get:
      operationId: "get_v1_favorites"
      summary: "User's saved favorites (JWT)."
      tags: ["Account"]
      description: "User's saved favorites (JWT). Free tier (works with ?demo=true, no key)."
      x-plan-gate: free
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/auth/me:
    get:
      operationId: "get_auth_me"
      summary: "Current user profile (JWT)."
      tags: ["Account"]
      description: "Current user profile (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/auth/register:
    post:
      operationId: "post_auth_register"
      summary: "Register with email + password."
      tags: ["Account"]
      description: "Register with email + password."
      security: []
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
  /api/auth/login:
    post:
      operationId: "post_auth_login"
      summary: "Log in with email + password -> JWT."
      tags: ["Account"]
      description: "Log in with email + password -> JWT."
      security: []
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
  /api/auth/google:
    post:
      operationId: "post_auth_google"
      summary: "Log in with Google ID token -> JWT."
      tags: ["Account"]
      description: "Log in with Google ID token -> JWT."
      security: []
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
  /api/auth/logout:
    post:
      operationId: "post_auth_logout"
      summary: "Revoke session (bumps token_version)."
      tags: ["Account"]
      description: "Revoke session (bumps token_version)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/auth/profile:
    put:
      operationId: "put_auth_profile"
      summary: "Update profile / change password (JWT)."
      tags: ["Account"]
      description: "Update profile / change password (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/console/keys:
    get:
      operationId: "get_console_keys"
      summary: "List API keys (JWT)."
      tags: ["Account"]
      description: "List API keys (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/console/keys:
    post:
      operationId: "post_console_keys"
      summary: "Create an API key (JWT)."
      tags: ["Account"]
      description: "Create an API key (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/console/keys:
    delete:
      operationId: "delete_console_keys"
      summary: "Revoke an API key (JWT)."
      tags: ["Account"]
      description: "Revoke an API key (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/console/usage:
    get:
      operationId: "get_console_usage"
      summary: "Today's usage count (JWT)."
      tags: ["Account"]
      description: "Today's usage count (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/console/logs:
    get:
      operationId: "get_console_logs"
      summary: "Recent request logs (JWT)."
      tags: ["Account"]
      description: "Recent request logs (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/subscription/status:
    get:
      operationId: "get_subscription_status"
      summary: "Current subscription/plan (JWT)."
      tags: ["Account"]
      description: "Current subscription/plan (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/user/delete:
    delete:
      operationId: "delete_user_delete"
      summary: "Delete account and all associated data (GDPR, JWT)."
      tags: ["Account"]
      description: "Delete account and all associated data (GDPR, JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/stripe/create-checkout:
    post:
      operationId: "post_stripe_create-checkout"
      summary: "Create a Stripe Checkout session (JWT)."
      tags: ["Account"]
      description: "Create a Stripe Checkout session (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/stripe/create-portal:
    post:
      operationId: "post_stripe_create-portal"
      summary: "Create a Stripe billing-portal session (JWT)."
      tags: ["Account"]
      description: "Create a Stripe billing-portal session (JWT)."
      security: [{ bearerJwt: [] }]
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
        '401': { description: "Authentication required" }
  /api/stripe/webhook:
    post:
      operationId: "post_stripe_webhook"
      summary: "Stripe webhook (signature-verified)."
      tags: ["Account"]
      description: "Stripe webhook (signature-verified)."
      security: []
      responses:
        '200': { description: "Success", content: { application/json: { schema: { $ref: '#/components/schemas/ApiEnvelope' } } } }
