# GENERATED FILE. Do not edit.
#
# Projected from the Zod MCP tool registry in product/mcp/gs.mcp.
# Regenerate:  cd product/mcp/gs.mcp && pnpm openapi:public
# Verify:      cd product/mcp/gs.mcp && pnpm openapi:public:check
openapi: 3.0.3
info:
  title: "GetSales public contract: gs.service.signals"
  description: |-
    The signals service, its website lane: the team's registered sites with their key pages and tracked events, the team switch for the codes in links, and what the tracking plane saw: every visit as a session with its pages, forms and network, the browsers behind them and the people they were bound to; and, since P0 of its LinkedIn leg, who looked at a sender profile's LinkedIn profile (the sightings of the premium list, read once a day).

    GENERATED. This document is projected from the Zod MCP tool registry in `product/mcp/gs.mcp` (one tool per public endpoint, 1:1). Do not edit it by hand; edit the tool definition and regenerate with `pnpm openapi:public`.

    Surface: the public `/api` contract of `gs.service.signals`, 30 operations. This is the only OpenAPI document the platform publishes. Internal (`/internal`) and health endpoints are deliberately absent: they are not part of any contract, they can change without notice, and the service source is their only description.

    Conventions:
    - Auth is a bearer JWT, optionally narrowed by the `Team-SID` header.
    - Every success body is an MCP envelope: `success: true` plus one typed `operation` shape (`search`, `get`, `create`, `update`, `delete`, `metrics`, `group_by`, `action`), and a `meta` block with `trace_id` for support.
    - Every failure is the same `McpError` envelope with a code from a fixed 16-code taxonomy, so a client maps errors once.
    - Lists page with `page_size` (0 to 500, default 50) plus an opaque forward `cursor`; `page_size: 0` returns counts only.
    - On `GET` and `DELETE`, object-valued query parameters (`filter`, `sort`) travel as JSON text and array-valued ones repeat as `name[]=value`.
    - The MCP-only `_meta` field (usage analytics) never reaches the backend and is not part of this contract.
  version: "1.0"
  contact:
    name: GetSales
    url: https://getsales.io
    email: support@getsales.io
  license:
    name: Proprietary
    url: https://getsales.io/terms
servers:
  - url: https://beta.getsales.io/signals/v1
    description: Production (the gateway path on the beta ring; the origin is provisioned per DEPLOY_MAP.md)
security:
  - BearerJwt: []
    TeamSid: []
tags:
  - name: profile_view_sightings
    description: Registry package `mcp.signals/profile_view_sightings`, served on MCP mount `signals.visits`.
  - name: signal_preferences
    description: Registry package `mcp.signals/signal_preferences`, served on MCP mount `signals.website`.
  - name: signal_settings
    description: Registry package `mcp.signals/signal_settings`, served on MCP mount `signals.website`.
  - name: website_key_pages
    description: Registry package `mcp.signals/website_key_pages`, served on MCP mount `signals.website`.
  - name: website_session_owners
    description: Registry package `mcp.signals/website_session_owners`, served on MCP mount `signals.visits`.
  - name: website_sessions
    description: Registry package `mcp.signals/website_sessions`, served on MCP mount `signals.visits`.
  - name: website_sites
    description: Registry package `mcp.signals/website_sites`, served on MCP mount `signals.website`.
  - name: website_tracked_events
    description: Registry package `mcp.signals/website_tracked_events`, served on MCP mount `signals.website`.
  - name: website_visitors
    description: Registry package `mcp.signals/website_visitors`, served on MCP mount `signals.visits`.
paths:
  /api/profile-view-sightings/search:
    post:
      operationId: search_profile_view_sightings
      summary: Search profile view sightings
      description: |-
        Who looked at the team's sender profiles' LinkedIn profiles (read once a day per sender profile), newest first: known people (person_sid) and anonymous rows, with LinkedIn's words and the view count. Scope with sender_profile_sid and a last_seen_at or first_seen_at window; page_size 0 for the counts by is_anonymous and by sender profile. One person: search_people with the signal viewed_our_profile. A view is private context: it decides when to write, the lead is never told we know.

        Contract:
        - MCP tool `search_profile_view_sightings`, registry package `mcp.signals/profile_view_sightings`, mount `signals.visits`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - profile_view_sightings
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchProfileViewSightingsRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchProfileViewSightingsResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_profile_view_sightings
      x-gs-mcp-mount: signals.visits
      x-gs-entity: profile_view_sightings
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/profile-view-sightings/{sid}:
    get:
      operationId: get_profile_view_sighting
      summary: Get profile view sighting
      description: |-
        One sighting: the viewer's words, the sighting clocks, how often they looked and, with include person, the person the team holds. Private context: never repeated to the lead.

        Contract:
        - MCP tool `get_profile_view_sighting`, registry package `mcp.signals/profile_view_sightings`, mount `signals.visits`.
        - Operation `get`, response envelope `get`.
        - Flags: read only.
      tags:
        - profile_view_sightings
      parameters:
        - name: sid
          in: path
          required: true
          description: The sg_pv_* sid of the row to read.
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_pv_
            description: The sg_pv_* sid of the row to read.
        - name: include[]
          in: query
          required: false
          description: Relations to attach to the row; omit for the bare row.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - person
              description: "person: the person's sid (the card is owed)."
            description: Relations to attach to the row; omit for the bare row.
      responses:
        "200":
          description: "`get` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetProfileViewSightingResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: get_profile_view_sighting
      x-gs-mcp-mount: signals.visits
      x-gs-entity: profile_view_sightings
      x-gs-operation: get
      x-gs-envelope: get
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
  /api/signal-preferences:
    get:
      operationId: get_signal_preferences
      summary: Get signal preferences
      description: |-
        Your own Signals page settings: hidden_types and notify_types, sender_profile_scope with sender_profile_sids, toast_enabled, seen_at, saved_views. New for me: then search_activities with type in notify_types minus hidden_types, created_at gt seen_at and occurred_at gt seen_at minus three days (a sender profile leaf only when scope is chosen). Reading never marks the feed seen; a signal is private context, never repeated to the lead.

        Contract:
        - MCP tool `get_signal_preferences`, registry package `mcp.signals/signal_preferences`, mount `signals.website`.
        - Operation `get`, response envelope `get`.
        - Flags: read only.
      tags:
        - signal_preferences
      responses:
        "200":
          description: "`get` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSignalPreferencesResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: get_signal_preferences
      x-gs-mcp-mount: signals.website
      x-gs-entity: signal_preferences
      x-gs-operation: get
      x-gs-envelope: get
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
    patch:
      operationId: update_signal_preferences
      summary: Update signal preferences
      description: |-
        Change your own Signals page settings, a partial update: each field sent replaces the stored value. hidden_types and notify_types are whole lists of signal types: to stop or start hearing of one, read the row and send the list without or with it. sender_profile_scope all | mine | chosen, with sender_profile_sids for chosen; toast_enabled; saved_views, the whole list: stored views keep their ids, a new one gets one. seen_at is mark_signals_seen. Nothing editable is 422 nothing_to_update.

        Contract:
        - MCP tool `update_signal_preferences`, registry package `mcp.signals/signal_preferences`, mount `signals.website`.
        - Operation `update`, response envelope `update`.
        - Flags: none.
      tags:
        - signal_preferences
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSignalPreferencesRequest"
      responses:
        "200":
          description: "`update` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateSignalPreferencesResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: update_signal_preferences
      x-gs-mcp-mount: signals.website
      x-gs-entity: signal_preferences
      x-gs-operation: update
      x-gs-envelope: update
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/signal-preferences/mark-seen:
    post:
      operationId: mark_signals_seen
      summary: Mark signals seen
      description: |-
        Mark your Signals feed seen up to an instant (now by default): seen_at moves forward to it, cut to the second and never past now plus a minute, and never back, so an instant at or before the stored one changes nothing (result.moved false). This is the user opening the page: call it only when the user asks for it ("mark everything as read"), never after reading the feed for them, which would hide what is new from their badge. Answers the row with result.previous_seen_at.

        Contract:
        - MCP tool `mark_signals_seen`, registry package `mcp.signals/signal_preferences`, mount `signals.website`.
        - Operation `action`, response envelope `action`.
        - Flags: none.
      tags:
        - signal_preferences
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/MarkSignalsSeenRequest"
      responses:
        "200":
          description: "`action` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MarkSignalsSeenResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: mark_signals_seen
      x-gs-mcp-mount: signals.website
      x-gs-entity: signal_preferences
      x-gs-operation: action
      x-gs-envelope: action
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/signal-settings:
    get:
      operationId: get_signal_settings
      summary: Get signal settings
      description: |-
        The team's signal settings, one row per team: website_link_codes (the master switch for the code in every link the send paths emit), profile_views_enabled (whether the premium sender profiles' "Who viewed your profile" lists are read once a day) and profile_views_excluded_sender_profiles (the sender profiles kept out of that). The first read creates the row, so it always answers.

        Contract:
        - MCP tool `get_signal_settings`, registry package `mcp.signals/signal_settings`, mount `signals.website`.
        - Operation `get`, response envelope `get`.
        - Flags: read only.
      tags:
        - signal_settings
      responses:
        "200":
          description: "`get` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetSignalSettingsResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: get_signal_settings
      x-gs-mcp-mount: signals.website
      x-gs-entity: signal_settings
      x-gs-operation: get
      x-gs-envelope: get
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
    patch:
      operationId: update_signal_settings
      summary: Update signal settings
      description: |-
        Flip the team's switches. website_link_codes false stops coding every link of the team whatever the sites say, true lets a verified site with link_codes_enabled code again (one site's codes: update_website_site). profile_views_enabled false stops reading every sender profile's Who viewed your profile list (a queued run finishes); profile_views_excluded_sender_profiles replaces the excluded set. Nothing changed is 422 nothing_to_update.

        Contract:
        - MCP tool `update_signal_settings`, registry package `mcp.signals/signal_settings`, mount `signals.website`.
        - Operation `update`, response envelope `update`.
        - Flags: none.
      tags:
        - signal_settings
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateSignalSettingsRequest"
      responses:
        "200":
          description: "`update` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateSignalSettingsResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: update_signal_settings
      x-gs-mcp-mount: signals.website
      x-gs-entity: signal_settings
      x-gs-operation: update
      x-gs-envelope: update
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-key-pages:
    post:
      operationId: create_website_key_page
      summary: Create website key page
      description: |-
        Name a page whose visits matter: site_sid, a stable slug (key, lowercase, immutable), a label, a path glob (pattern: a path or a pasted URL, * for any run of characters, matching ignores case and a trailing slash) and is_conversion. A match in a session is highlighted in the feed and becomes the fact website_key_page_visited. One page per key per site: a duplicate is 409 duplicate_rejected with the existing sid.

        Contract:
        - MCP tool `create_website_key_page`, registry package `mcp.signals/website_key_pages`, mount `signals.website`.
        - Operation `create`, response envelope `create`.
        - Flags: none.
      tags:
        - website_key_pages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWebsiteKeyPageRequest"
      responses:
        "200":
          description: "`create` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateWebsiteKeyPageResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: create_website_key_page
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_key_pages
      x-gs-operation: create
      x-gs-envelope: create
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-key-pages/search:
    post:
      operationId: search_website_key_pages
      summary: Search website key pages
      description: |-
        The pages a site's visits are judged by (pricing, demo, signup, contact by default, or the team's own): one row per key page with its slug (key), label and path glob (pattern). site_sid.eq is the usual scope, key.eq finds one by slug, q searches key, label and pattern. The slugs are what search_website_sessions filter.key_page and the signal visited_key_page name. Who visited one is search_website_sessions, not this.

        Contract:
        - MCP tool `search_website_key_pages`, registry package `mcp.signals/website_key_pages`, mount `signals.website`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - website_key_pages
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchWebsiteKeyPagesRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchWebsiteKeyPagesResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_website_key_pages
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_key_pages
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-key-pages/{sid}:
    patch:
      operationId: update_website_key_page
      summary: Update website key page
      description: |-
        Change a key page's label, pattern or is_conversion; the key and the site are immutable (delete and create for a new slug). Applies to visits from then on; nothing changed is 422 nothing_to_update.

        Contract:
        - MCP tool `update_website_key_page`, registry package `mcp.signals/website_key_pages`, mount `signals.website`.
        - Operation `update`, response envelope `update`.
        - Flags: none.
      tags:
        - website_key_pages
      parameters:
        - name: sid
          in: path
          required: true
          description: Website key page sid (sg_kp_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_kp_
            description: Website key page sid (sg_kp_...).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWebsiteKeyPageRequest"
      responses:
        "200":
          description: "`update` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateWebsiteKeyPageResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: update_website_key_page
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_key_pages
      x-gs-operation: update
      x-gs-envelope: update
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
    delete:
      operationId: delete_website_key_page
      summary: Delete website key page
      description: |-
        Soft-delete a key page; visits from then on no longer match it, and facts already written keep its key. Idempotent (already_deleted on a repeat).

        Contract:
        - MCP tool `delete_website_key_page`, registry package `mcp.signals/website_key_pages`, mount `signals.website`.
        - Operation `delete`, response envelope `delete_simple`.
        - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.
      tags:
        - website_key_pages
      parameters:
        - name: sid
          in: path
          required: true
          description: The sg_kp_* sid of the row to delete.
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_kp_
            description: The sg_kp_* sid of the row to delete.
      responses:
        "200":
          description: "`delete_simple` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteWebsiteKeyPageResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: delete_website_key_page
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_key_pages
      x-gs-operation: delete
      x-gs-envelope: delete_simple
      x-gs-availability: ga
      x-gs-dangerous: true
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
  /api/website-session-owners/search:
    post:
      operationId: search_website_session_owners
      summary: Search website session owners
      description: |-
        Who visited: the team's website visits folded by owner, one row per person, company or unknown visitor by its latest visit, newest first, with how many visits it holds, how many are fresh and its newest three moments. filter takes every leaf of search_website_sessions; companies alone: company_sid is_null false with person_sid is_null true. Counts count owners; page_size 0 for them. One owner's visits: search_website_sessions by its sid. Private context: never tell the lead we know.

        Contract:
        - MCP tool `search_website_session_owners`, registry package `mcp.signals/website_session_owners`, mount `signals.visits`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - website_session_owners
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchWebsiteSessionOwnersRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchWebsiteSessionOwnersResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_website_session_owners
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_session_owners
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-sessions/search:
    post:
      operationId: search_website_sessions
      summary: Search website sessions
      description: |-
        The visitor feed: every visit to the team's sites, newest first, as one session: who it belongs to when a rung named someone (person_sid, or company_sid when only a company code or the network did; attribution says which), what was seen (pages with engaged time, key_pages, events: forms and custom events), where it came from (referrer_type, the utm set, landing_code), the browser and the network (network_type business, isp, mobile, hosting, education, government or unknown; network_name, network_domain). Scope with site_sid, started_at (the period) and the sids of a person, a company or a visitor; key_page, form and event take a slug or a name (eq or in), and is_null false = any whatever the name (every session that submitted a form, anonymous ones included), true = none; person_sid is_null false = known people, closed_at is_null true = on the site now, is_internal eq true = the team's own traffic. page_size 0 returns the counts by attribution, network type, referrer type, device and key page. "Who visited pricing this week and has not replied": this with key_page pricing and a started_at window, then search_people or search_conversations by the signals visited_key_page and visited_not_replied. What a session saw is private context: use it to decide when to write and what to offer, never tell the lead we know.

        Contract:
        - MCP tool `search_website_sessions`, registry package `mcp.signals/website_sessions`, mount `signals.visits`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - website_sessions
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchWebsiteSessionsRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchWebsiteSessionsResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_website_sessions
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_sessions
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: complex
  /api/website-sessions/{sid}:
    get:
      operationId: get_website_session
      summary: Get website session
      description: |-
        One session with its page list (path, title, engaged time), its forms and events, and with include the visitor, the person or the company it was bound to. Private context: never repeated to the lead.

        Contract:
        - MCP tool `get_website_session`, registry package `mcp.signals/website_sessions`, mount `signals.visits`.
        - Operation `get`, response envelope `get`.
        - Flags: read only.
      tags:
        - website_sessions
      parameters:
        - name: sid
          in: path
          required: true
          description: The sg_ws_* sid of the row to read.
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_ws_
            description: The sg_ws_* sid of the row to read.
        - name: include[]
          in: query
          required: false
          description: Relations to attach to the row; omit for the bare row.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - visitor
                - person
                - company
              description: "visitor: the browser's row; person and company: the owner's sid (the cards are owed)."
            description: Relations to attach to the row; omit for the bare row.
      responses:
        "200":
          description: "`get` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWebsiteSessionResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: get_website_session
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_sessions
      x-gs-operation: get
      x-gs-envelope: get
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
  /api/website-sites:
    post:
      operationId: create_website_site
      summary: Create website site
      description: |-
        Register a site for the website lane: a host or a URL (reduced to the bare host), its level (identification), the switches (link codes, the two carriers, consent, fingerprint, anonymize_ip, ignored addresses, the live alert level, the inbound table) and its key pages in the same call: key_pages absent = the default four (pricing, demo, signup, contact), [] = none. Ask the person first: explain the level (companies, the default: links carry the recipient's company code and visits show the company, never a person; people: visits from the people the team writes to are shown by name), and that collecting consent from EU, EEA and UK visitors and saying so in their privacy policy is their own duty. Send confirm_identification true, which is required, only after they confirm. Born pending, no codes until verified. A host the team already registered is 409 duplicate_rejected. Not idempotent.

        Contract:
        - MCP tool `create_website_site`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `create`, response envelope `create`.
        - Flags: none.
      tags:
        - website_sites
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWebsiteSiteRequest"
      responses:
        "200":
          description: "`create` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateWebsiteSiteResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: create_website_site
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: create
      x-gs-envelope: create
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: complex
  /api/website-sites/search:
    post:
      operationId: search_website_sites
      summary: Search website sites
      description: |-
        The team's registered sites and their state: find a site sid (sg_si_) by domain or q, read status (pending = waiting for the script, verified = receiving, broken = stopped receiving, see broken_reason, disabled = switched off), last_hit_at and hits_count_24h to answer "why does acme.com show no visits". page_size 0 returns the counts per status. The loader to install is on get_website_site; the visits themselves are search_website_sessions.

        Contract:
        - MCP tool `search_website_sites`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - website_sites
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchWebsiteSitesRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchWebsiteSitesResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_website_sites
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-sites/{sid}:
    get:
      operationId: get_website_site
      summary: Get website site
      description: |-
        One site with its settings, its last check and, in included.loader, the two script tags to paste into its pages: hand the loader to the user after create_website_site, then verify_website_site.

        Contract:
        - MCP tool `get_website_site`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `get`, response envelope `get`.
        - Flags: read only.
      tags:
        - website_sites
      parameters:
        - name: sid
          in: path
          required: true
          description: Website site sid (sg_si_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_si_
            description: Website site sid (sg_si_...).
      responses:
        "200":
          description: "`get` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWebsiteSiteResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: get_website_site
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: get
      x-gs-envelope: get
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
    patch:
      operationId: update_website_site
      summary: Update website site
      description: |-
        Change a site's settings: identification, include_subdomains, link_codes_enabled (this site only; team-wide: update_signal_settings), carrier_linkedin and carrier_email (fragment or query), consent_mode, fingerprint_mode, anonymize_ip, ignored_ips (replaced whole), live_alerts, live_alert_tasks, live_alert_task_minutes, inbound_playtable_sid; enabled false switches the site off, true brings it back as verified or pending. A switch to people needs confirm_identification true in the same call (else 422 confirmation_required): first tell the person that visits from the people the team writes to will be shown by name and that collecting consent from EU, EEA and UK visitors and saying so in their privacy policy is their own duty, and send it only after they confirm. A switch to companies (visits show the company, never a person) needs none. confirm_identification true alone records a confirmation for the current level. domain and site_key are not editable (rotate_website_site_key mints a key). Nothing changed is 422 nothing_to_update.

        Contract:
        - MCP tool `update_website_site`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `update`, response envelope `update`.
        - Flags: none.
      tags:
        - website_sites
      parameters:
        - name: sid
          in: path
          required: true
          description: Website site sid (sg_si_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_si_
            description: Website site sid (sg_si_...).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWebsiteSiteRequest"
      responses:
        "200":
          description: "`update` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateWebsiteSiteResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: update_website_site
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: update
      x-gs-envelope: update
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: complex
    delete:
      operationId: delete_website_site
      summary: Delete website site
      description: |-
        Soft-delete a site: its key stops naming it at once, its hits are dropped, its key pages and tracked events follow in a job; sessions and visitors stay. Idempotent (already_deleted on a repeat).

        Contract:
        - MCP tool `delete_website_site`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `delete`, response envelope `delete_simple`.
        - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.
      tags:
        - website_sites
      parameters:
        - name: sid
          in: path
          required: true
          description: The sg_si_* sid of the row to delete.
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_si_
            description: The sg_si_* sid of the row to delete.
      responses:
        "200":
          description: "`delete_simple` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteWebsiteSiteResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: delete_website_site
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: delete
      x-gs-envelope: delete_simple
      x-gs-availability: ga
      x-gs-dangerous: true
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
  /api/website-sites/{sid}/rotate-key:
    post:
      operationId: rotate_website_site_key
      summary: Rotate website site key
      description: |-
        Mint a new site key. The old key stops naming the site at once, so the loader on the site has to be replaced with result.loader, and the site returns to pending until the new loader is seen (a disabled site stays disabled; the hit history stays). For a key that leaked or was lost; every call is another key.

        Contract:
        - MCP tool `rotate_website_site_key`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `action`, response envelope `action`.
        - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.
      tags:
        - website_sites
      parameters:
        - name: sid
          in: path
          required: true
          description: Website site sid (sg_si_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_si_
            description: Website site sid (sg_si_...).
      responses:
        "200":
          description: "`action` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RotateWebsiteSiteKeyResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: rotate_website_site_key
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: action
      x-gs-envelope: action
      x-gs-availability: ga
      x-gs-dangerous: true
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-sites/{sid}/verify:
    post:
      operationId: verify_website_site
      summary: Verify website site
      description: |-
        Check a site now: fetch its home page and up to five key page URLs, look for the loader with this site's key, store the result and apply the health rule. Any page carrying the key verifies the site; a key page without it is flagged in last_check_result.pages. A loader installed through a tag manager is not in the page source: such a site is verified by its first hit instead, so loader_missing on a receiving site is not a fault. A disabled site is 409 invalid_transition. Up to a minute.

        Contract:
        - MCP tool `verify_website_site`, registry package `mcp.signals/website_sites`, mount `signals.website`.
        - Operation `action`, response envelope `action`.
        - Flags: none.
      tags:
        - website_sites
      parameters:
        - name: sid
          in: path
          required: true
          description: Website site sid (sg_si_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_si_
            description: Website site sid (sg_si_...).
      responses:
        "200":
          description: "`action` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VerifyWebsiteSiteResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: verify_website_site
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_sites
      x-gs-operation: action
      x-gs-envelope: action
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-tracked-events:
    post:
      operationId: create_website_tracked_event
      summary: Create website tracked event
      description: |-
        Register a custom event of a site so that it counts: site_sid, the name the site sends (event, matched without letter case, immutable), a label and is_conversion. From then on a session that sends the name carries the fact website_event. A name the site already tracks is 409 duplicate_rejected with the existing sid. A page visit is a key page (create_website_key_page) and a marked form is a fact by itself: neither needs this.

        Contract:
        - MCP tool `create_website_tracked_event`, registry package `mcp.signals/website_tracked_events`, mount `signals.website`.
        - Operation `create`, response envelope `create`.
        - Flags: none.
      tags:
        - website_tracked_events
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateWebsiteTrackedEventRequest"
      responses:
        "200":
          description: "`create` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateWebsiteTrackedEventResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: create_website_tracked_event
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_tracked_events
      x-gs-operation: create
      x-gs-envelope: create
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-tracked-events/search:
    post:
      operationId: search_website_tracked_events
      summary: Search website tracked events
      description: |-
        The custom events a site sends that the team registered by name (gs('event', name) in the site's script): one row per tracked event with its label and is_conversion. Only a registered name becomes the fact website_event and a session filter (search_website_sessions filter.event); every event is still kept on the session's events[] for the feed. site_sid.eq is the usual scope, q searches event and label.

        Contract:
        - MCP tool `search_website_tracked_events`, registry package `mcp.signals/website_tracked_events`, mount `signals.website`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - website_tracked_events
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchWebsiteTrackedEventsRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchWebsiteTrackedEventsResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_website_tracked_events
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_tracked_events
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-tracked-events/{sid}:
    patch:
      operationId: update_website_tracked_event
      summary: Update website tracked event
      description: |-
        Change a tracked event's label or is_conversion; the name and the site are immutable (delete and create for a new name). Nothing changed is 422 nothing_to_update.

        Contract:
        - MCP tool `update_website_tracked_event`, registry package `mcp.signals/website_tracked_events`, mount `signals.website`.
        - Operation `update`, response envelope `update`.
        - Flags: none.
      tags:
        - website_tracked_events
      parameters:
        - name: sid
          in: path
          required: true
          description: Website tracked event sid (sg_te_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_te_
            description: Website tracked event sid (sg_te_...).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UpdateWebsiteTrackedEventRequest"
      responses:
        "200":
          description: "`update` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UpdateWebsiteTrackedEventResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: update_website_tracked_event
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_tracked_events
      x-gs-operation: update
      x-gs-envelope: update
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
    delete:
      operationId: delete_website_tracked_event
      summary: Delete website tracked event
      description: |-
        Soft-delete a tracked event; the name stops becoming a fact from then on, and facts already written keep it. Idempotent (already_deleted on a repeat).

        Contract:
        - MCP tool `delete_website_tracked_event`, registry package `mcp.signals/website_tracked_events`, mount `signals.website`.
        - Operation `delete`, response envelope `delete_simple`.
        - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.
      tags:
        - website_tracked_events
      parameters:
        - name: sid
          in: path
          required: true
          description: The sg_te_* sid of the row to delete.
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_te_
            description: The sg_te_* sid of the row to delete.
      responses:
        "200":
          description: "`delete_simple` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeleteWebsiteTrackedEventResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: delete_website_tracked_event
      x-gs-mcp-mount: signals.website
      x-gs-entity: website_tracked_events
      x-gs-operation: delete
      x-gs-envelope: delete_simple
      x-gs-availability: ga
      x-gs-dangerous: true
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
  /api/website-visitors/identify:
    post:
      operationId: identify_website_visitor_by_email
      summary: Identify website visitor by email
      description: |-
        Name the person behind a browser from the customer's own backend, after a login or a signup: the site, the first-party visitor id the page holds (_gs_vid), the email, and a form name when a form was submitted (it becomes the fact website_form_submitted of the open session). The person is found by email in the team's tables; nobody matched leaves the email on the row as identified_email; an address on the team's own site marks the visit internal; a visitor bound by a code or by hand keeps its person. On a site set to companies it names nobody: no bind, no identified_email, no fact, only the internal rule; the form still joins the session's events. A visitor id the collector has not seen yet is 422 relation_not_found: retry in a few seconds. For an agent in the app, identify_website_visitor is the tool.

        Contract:
        - MCP tool `identify_website_visitor_by_email`, registry package `mcp.signals/website_visitors`, mount `signals.visits`.
        - Operation `action`, response envelope `action`.
        - Flags: none.
      tags:
        - website_visitors
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IdentifyWebsiteVisitorByEmailRequest"
      responses:
        "200":
          description: "`action` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentifyWebsiteVisitorByEmailResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: identify_website_visitor_by_email
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_visitors
      x-gs-operation: action
      x-gs-envelope: action
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: complex
  /api/website-visitors/search:
    post:
      operationId: search_website_visitors
      summary: Search website visitors
      description: |-
        The browsers that visited the team's sites, one row per browser per site: the person it is bound to (person_sid, bound_by: code, identify, fingerprint or manual), the email an identify or a form gave when nobody matched (identified_email: the "Add to table" rows), how often it came (sessions_count), when (first_seen_at, last_seen_at), and what the newest session told about the browser, the place and the network. identified_email is_null false with person_sid is_null true = emails nobody has yet; person_sid eq = one person's browsers ("the same person on two devices"); is_ephemeral eq false hides the one-day strangers. q searches the email and the network name. page_size 0 returns the counts by bound_by and network type. The visits themselves are search_website_sessions; people by a signal are search_people. Private context: never tell the lead we know.

        Contract:
        - MCP tool `search_website_visitors`, registry package `mcp.signals/website_visitors`, mount `signals.visits`.
        - Operation `search`, response envelope `search`.
        - Flags: read only.
      tags:
        - website_visitors
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SearchWebsiteVisitorsRequest"
      responses:
        "200":
          description: "`search` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SearchWebsiteVisitorsResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: search_website_visitors
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_visitors
      x-gs-operation: search
      x-gs-envelope: search
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: complex
  /api/website-visitors/{sid}:
    get:
      operationId: get_website_visitor
      summary: Get website visitor
      description: |-
        One visitor row, with include the person it is bound to and its newest session (last_session). Private context: never repeated to the lead.

        Contract:
        - MCP tool `get_website_visitor`, registry package `mcp.signals/website_visitors`, mount `signals.visits`.
        - Operation `get`, response envelope `get`.
        - Flags: read only.
      tags:
        - website_visitors
      parameters:
        - name: sid
          in: path
          required: true
          description: The sg_wv_* sid of the row to read.
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_wv_
            description: The sg_wv_* sid of the row to read.
        - name: include[]
          in: query
          required: false
          description: Relations to attach to the row; omit for the bare row.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - person
                - last_session
              description: "person: the bound person's sid (the card is owed); last_session: the visitor's newest session, one ranked read per page."
            description: Relations to attach to the row; omit for the bare row.
      responses:
        "200":
          description: "`get` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWebsiteVisitorResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: get_website_visitor
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_visitors
      x-gs-operation: get
      x-gs-envelope: get
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
  /api/website-visitors/{sid}/identify:
    post:
      operationId: identify_website_visitor
      summary: Identify website visitor
      description: |-
        Bind a visitor to a person of the team by hand ("the visitor from Acme's network yesterday is John"): person_sid, a live playtables person (cr_pp_), else 422 relation_not_found. It overrides any automatic bind; the visitor's open session and its sessions of the last 30 days nobody owned go to the person, their facts written by a queued job. On a site set to companies it is 409 invalid_transition (companies_level). The same person again changes nothing. Undo with unlink_website_visitor.

        Contract:
        - MCP tool `identify_website_visitor`, registry package `mcp.signals/website_visitors`, mount `signals.visits`.
        - Operation `action`, response envelope `action`.
        - Flags: none.
      tags:
        - website_visitors
      parameters:
        - name: sid
          in: path
          required: true
          description: Website visitor sid (sg_wv_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_wv_
            description: Website visitor sid (sg_wv_...).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/IdentifyWebsiteVisitorRequest"
      responses:
        "200":
          description: "`action` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/IdentifyWebsiteVisitorResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: identify_website_visitor
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_visitors
      x-gs-operation: action
      x-gs-envelope: action
      x-gs-availability: ga
      x-gs-dangerous: false
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: typical
  /api/website-visitors/{sid}/unlink:
    post:
      operationId: unlink_website_visitor
      summary: Unlink website visitor
      description: |-
        Clear a visitor's bind: person_sid, bound_by, bound_at and identified_email. Sessions already attributed keep their person and the facts written stay. Already unbound answers was_bound false.

        Contract:
        - MCP tool `unlink_website_visitor`, registry package `mcp.signals/website_visitors`, mount `signals.visits`.
        - Operation `action`, response envelope `action`.
        - Flags: dangerous: the MCP layer gates it behind a preview/commit token, and the effect cannot be undone through this API.
      tags:
        - website_visitors
      parameters:
        - name: sid
          in: path
          required: true
          description: Website visitor sid (sg_wv_...).
          schema:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^sg_wv_
            description: Website visitor sid (sg_wv_...).
      responses:
        "200":
          description: "`action` success envelope."
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UnlinkWebsiteVisitorResponse"
        4XX:
          $ref: "#/components/responses/McpClientError"
        5XX:
          $ref: "#/components/responses/McpServerError"
      x-gs-mcp-tool: unlink_website_visitor
      x-gs-mcp-mount: signals.visits
      x-gs-entity: website_visitors
      x-gs-operation: action
      x-gs-envelope: action
      x-gs-availability: ga
      x-gs-dangerous: true
      x-gs-mass-action: false
      x-gs-step-eligible: false
      x-gs-schedule-required: false
      x-gs-tool-class: trivial
components:
  securitySchemes:
    BearerJwt:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Access token issued by gs.service.id. Its `access_identity` claim carries `team_sid`, `actor_sid` and `actor_type`, and that team scope is authoritative.
    TeamSid:
      type: apiKey
      in: header
      name: Team-SID
      description: Team scope for tokens that do not carry one. Ignored when the token already names a team.
  responses:
    McpClientError:
      description: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/McpError"
    McpServerError:
      description: MCP error envelope with `error.code` internal_error or service_unavailable.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/McpError"
  schemas:
    CreateWebsiteKeyPageRequest:
      type: object
      description: Request body of `create_website_key_page`.
      properties:
        site_sid:
          type: string
          minLength: 18
          maxLength: 18
          pattern: ^sg_si_
          description: Website site sid (sg_si_...), the page's site.
        key:
          type: string
          maxLength: 64
          pattern: ^[a-z0-9][a-z0-9_-]*$
          description: "A stable lowercase slug, unique within the site, immutable: the name facts, the key_page filter and the signal visited_key_page carry."
        label:
          type: string
          minLength: 1
          maxLength: 120
          description: What the page is called in the feed (Pricing).
        pattern:
          type: string
          maxLength: 2048
          description: "A path glob or a pasted URL (reduced to its path): * stands for any run of characters, matching ignores case and a trailing slash (/plans*). No path readable is 422 invalid_pattern."
        is_conversion:
          type: boolean
          description: "Count a visit as a conversion. Default false: visiting /signup is not a signup."
      required:
        - site_sid
        - key
        - label
        - pattern
    CreateWebsiteKeyPageResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - create
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website key page sid (sg_kp_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: The site the page belongs to (sg_si_...).
            key:
              type: string
              description: The stable lowercase slug (pricing) facts and signals carry; immutable.
            label:
              type: string
              description: What the page is called in the feed.
            pattern:
              type: string
              description: "The path glob as stored: a leading slash, lowercased, no query or fragment, * for any run of characters (/pricing*)."
            is_conversion:
              type: boolean
              description: Counted as a conversion in the feed and the Overview card.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that named the page (the site create, or this entity's create).
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
          required:
            - sid
            - team_sid
            - site_sid
            - key
            - label
            - pattern
            - is_conversion
            - created_by
            - created_at
            - updated_at
            - deleted_at
        already_exists:
          type: boolean
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - already_exists
        - meta
    CreateWebsiteSiteRequest:
      type: object
      description: Request body of `create_website_site`.
      properties:
        domain:
          type: string
          maxLength: 2048
          description: "A host or a URL (acme.com, https://www.acme.com/pricing): reduced to the bare host. app.acme.com registers that host alone."
        identification:
          type: string
          enum:
            - companies
            - people
          description: "What a visit may name: companies (default) or people. The person picks it once both are explained."
        confirm_identification:
          type: boolean
          enum:
            - true
          description: Required, true only after the person confirmed that, for the level chosen, collecting consent from visitors in the EU, the EEA and the UK and saying so in their privacy policy is their own duty. Stored as identification_confirmation.
        include_subdomains:
          type: boolean
          description: Hosts under the domain belong to the site. Default true.
        link_codes_enabled:
          type: boolean
          description: Code the links to this site (once it is verified and confirmed for its level, and while the team switch is on). Default true.
        carrier_linkedin:
          type: string
          enum:
            - fragment
            - query
          description: "Where the code rides in a LinkedIn link: fragment (default) or query."
        carrier_email:
          type: string
          enum:
            - fragment
            - query
          description: "Where the code rides in an email link: query (default) or fragment."
        consent_mode:
          type: string
          enum:
            - not_required
            - required
          description: not_required (default) stores the visitor id on the first hit; required waits for the site's banner to call gs('consent', true).
        fingerprint_mode:
          type: string
          enum:
            - "on"
            - consent
            - "off"
          description: on (default), consent (only after consent) or off.
        anonymize_ip:
          type: boolean
          description: Keep a resolved session's address as its network part only. Default false.
        ignored_ips:
          type: array
          items:
            type: string
          maxItems: 50
          description: IPv4 or IPv6 addresses or CIDR ranges of internal traffic (the office, the VPN). Replaced whole; at most 50; an entry that is neither is 422 invalid_ip.
        live_alerts:
          type: string
          enum:
            - "off"
            - key_pages
            - all_known
          description: "off | key_pages (default) | all_known: when a known person on the site alerts the team now."
        live_alert_tasks:
          type: boolean
          description: A live alert also opens a task, due now, on the person's open threads. Default true; false sends the notice alone.
        live_alert_task_minutes:
          type: integer
          nullable: true
          minimum: 5
          maximum: 43200
          description: "The life of that task in minutes, 5 to 43200 (30 days): still open by then, the sweep cancels it. null = it never expires. Default 30."
        inbound_playtable_sid:
          type: string
          nullable: true
          minLength: 18
          maxLength: 18
          pattern: ^pt_tb_
          description: The table an identified visitor nobody has would be handed to; stored only today. null clears it.
        key_pages:
          type: array
          nullable: true
          items:
            type: object
            properties:
              key:
                type: string
                maxLength: 64
                pattern: ^[a-z0-9][a-z0-9_-]*$
                description: "A stable lowercase slug (pricing), unique within the site, immutable: the name facts and signals carry."
              label:
                type: string
                minLength: 1
                maxLength: 120
                description: What the page is called in the feed (Pricing).
              pattern:
                type: string
                maxLength: 2048
                description: "A path glob or a pasted URL (reduced to its path): * stands for any run of characters, matching ignores case and a trailing slash (/pricing*)."
              is_conversion:
                type: boolean
                description: Count it as a conversion in the feed and the Overview card. Default false.
            required:
              - key
              - label
              - pattern
          maxItems: 20
          description: The pages whose visits matter, created with the site in one transaction. Absent or null = the default four (pricing, demo, signup, contact, none a conversion); [] = none. At most 20.
      required:
        - domain
        - confirm_identification
    CreateWebsiteSiteResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - create
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website site sid (sg_si_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            domain:
              type: string
              description: "The host as the team typed it, reduced to a bare hostname: lowercased, no scheme, port or path, a leading www. dropped. Immutable: a different host is a different site."
            include_subdomains:
              type: boolean
              description: Hosts under domain belong to the site (default true).
            site_key:
              type: string
              description: The public 20-character key the loader carries (gs.k). It names the site to the collector; not a secret. Changes only through rotate_website_site_key.
            status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: pending = waiting for the script (links to it are not coded yet); verified = receiving; broken = the health rule flagged it (see broken_reason); disabled = switched off by update enabled false.
            verified_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last transition into verified; null never.
            last_check_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last active check (verify_website_site or the daily job); null never.
            last_check_result:
              type: object
              nullable: true
              properties:
                outcome:
                  type: string
                  enum:
                    - found
                    - site_key_mismatch
                    - loader_missing
                    - fetch_failed
                  description: "The best outcome over pages: found wins over site_key_mismatch, over loader_missing, over fetch_failed."
                pages:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL requested last for this page.
                      key_page_sid:
                        type: string
                        nullable: true
                        description: sg_kp_... the key page this row checked; null for the home page.
                      outcome:
                        type: string
                        enum:
                          - found
                          - site_key_mismatch
                          - loader_missing
                          - fetch_failed
                        description: "found: the page carries this site's key. site_key_mismatch: a loader with another key. loader_missing: no loader in the page source (a tag manager installs it outside the source, so such a site is verified by its first hit instead). fetch_failed: no page to read, see failure."
                      http_status:
                        type: integer
                        nullable: true
                        description: The final HTTP status; null when no answer arrived.
                      failure:
                        type: string
                        nullable: true
                        enum:
                          - invalid_url
                          - scheme_not_allowed
                          - credentials_in_url
                          - port_not_allowed
                          - ip_literal
                          - host_unresolvable
                          - private_address
                          - redirect_without_location
                          - too_many_redirects
                          - redirected_off_site
                          - connection_failed
                          - http_status
                        description: "Why the fetch failed, when outcome is fetch_failed: the guard refused the URL (scheme, port, credentials, an IP literal, a private address), the host did not resolve, the redirects ran out or left the site, the connection failed, or the status was outside 2xx. Null otherwise."
                    required:
                      - url
                      - key_page_sid
                      - outcome
                      - http_status
                      - failure
                  description: The home page first, then the checkable key pages (a pattern that names one URL).
              required:
                - outcome
                - pages
              description: What the last active check found, page by page; null while no check ran, and cleared by a key rotation.
            broken_reason:
              type: string
              nullable: true
              enum:
                - loader_missing
                - fetch_failed
                - site_key_mismatch
                - no_hits
              description: "Set while broken: loader_missing (the source lost the loader and the hits stopped), fetch_failed (two checks in a row could not read the site while it was silent), site_key_mismatch (another key in the loader), no_hits (a tag-manager install whose hits stopped). Null otherwise."
            last_hit_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the newest hit the collector reported; null while nothing was received.
            hits_count_24h:
              type: integer
              minimum: 0
              description: Hits in the current UTC hour and the 23 before it, refreshed on every hit batch and every check (a rolling window, not "today").
            identification:
              type: string
              enum:
                - companies
                - people
              description: "What a visit to the site may name. companies (default): links carry the recipient's company code and a visit shows the company, never a person. people: visits from the people the team writes to are shown by name."
            identification_confirmation:
              type: object
              nullable: true
              properties:
                identification:
                  type: string
                  enum:
                    - companies
                    - people
                  description: "The level confirmed: people covers both levels, companies only itself."
                confirmed_at:
                  type: string
                  description: ISO 8601 UTC.
                confirmed_by:
                  type: object
                  properties:
                    actor_type:
                      type: string
                      enum:
                        - user
                        - support
                        - api_key
                        - system
                        - agent
                    actor_sid:
                      type: string
                      nullable: true
                    team_sid:
                      type: string
                    actor_name:
                      type: string
                      nullable: true
                      description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                    oauth_client_sid:
                      type: string
                      nullable: true
                      description: The acting OAuth client (id_oc_*); null off the OAuth path.
                    reason:
                      type: string
                      nullable: true
                      description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                    permissions:
                      type: object
                      additionalProperties: {}
                      description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                    cluster_id:
                      type: integer
                      nullable: true
                      description: "Internal audit context: the cluster that served the write."
                    trace_id:
                      type: string
                      nullable: true
                      description: "Internal audit context: the trace id of the request that wrote the row."
                  required:
                    - actor_type
                    - actor_sid
                    - team_sid
                    - permissions
                  description: Who confirmed.
              required:
                - identification
                - confirmed_at
                - confirmed_by
              description: The customer's latest confirmation of its duties for a level, by whom and when. Links are coded only while it covers the site's level; null = none yet.
            link_codes_enabled:
              type: boolean
              description: Links to this site get a code (the company's or the person's, by identification) when the site is verified, identification_confirmation covers its level and the team switch (signal_settings.website_link_codes) is on. Default true.
            carrier_linkedin:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent on LinkedIn: fragment (#g_<code>, default) or query (?gs=<code>)."
            carrier_email:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent by email: query (default) or fragment."
            consent_mode:
              type: string
              enum:
                - not_required
                - required
              description: "not_required (default): the first-party visitor id is stored on the first hit. required: nothing is stored until the site's banner calls gs('consent', true); until then a visit is attributed by the code in the link alone."
            fingerprint_mode:
              type: string
              enum:
                - "on"
                - consent
                - "off"
              description: "on (default): the device fingerprint is collected (answered as consent when consent_mode is required); consent: only after consent; off: never."
            anonymize_ip:
              type: boolean
              description: Once a session's network is resolved, keep the address's network part only (the last octet, or the last 80 bits of IPv6, zeroed). Default false.
            ignored_ips:
              type: array
              items:
                type: string
              description: "IPv4 or IPv6 addresses or CIDR ranges whose visits are internal (the office, the VPN egress): shown under their own filter, never a fact, never a signal. At most 50."
            live_alerts:
              type: string
              enum:
                - "off"
                - key_pages
                - all_known
              description: "When a known person on the site alerts the team now: off, key_pages (default: a key page reached), all_known (any visit)."
            live_alert_tasks:
              type: boolean
              description: "A live alert also opens a task, due now, on each of the person's open threads. false: only the notice goes. Default true."
            live_alert_task_minutes:
              type: integer
              nullable: true
              description: "How long that task lives: still open after this many minutes, the sweep cancels it and it reads as expired. 5 to 43200 (30 days); null = it never expires. Default 30."
            inbound_playtable_sid:
              type: string
              nullable: true
              description: pt_tb_... the table an identified visitor nobody has would be handed to; stored only today, nothing reads it yet.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the site.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. A deleted site keeps its sessions and visitors.
          required:
            - sid
            - team_sid
            - domain
            - include_subdomains
            - site_key
            - status
            - verified_at
            - last_check_at
            - last_check_result
            - broken_reason
            - last_hit_at
            - hits_count_24h
            - identification
            - identification_confirmation
            - link_codes_enabled
            - carrier_linkedin
            - carrier_email
            - consent_mode
            - fingerprint_mode
            - anonymize_ip
            - ignored_ips
            - live_alerts
            - live_alert_tasks
            - live_alert_task_minutes
            - inbound_playtable_sid
            - created_by
            - created_at
            - updated_at
            - deleted_at
        already_exists:
          type: boolean
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - already_exists
        - meta
    CreateWebsiteTrackedEventRequest:
      type: object
      description: Request body of `create_website_tracked_event`.
      properties:
        site_sid:
          type: string
          minLength: 18
          maxLength: 18
          pattern: ^sg_si_
          description: Website site sid (sg_si_...), the event's site.
        event:
          type: string
          maxLength: 64
          pattern: ^[A-Za-z0-9][A-Za-z0-9 _.:-]*$
          description: "The name the site's script sends (trial_started), 1..64 characters of letters, digits, space, _ . : -; matched without letter case; immutable."
        label:
          type: string
          minLength: 1
          maxLength: 120
          description: What the event is called in the feed (Trial started).
        is_conversion:
          type: boolean
          description: Count it as a conversion. Default false.
      required:
        - site_sid
        - event
        - label
    CreateWebsiteTrackedEventResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - create
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website tracked event sid (sg_te_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: The site the event belongs to (sg_si_...).
            event:
              type: string
              description: The name the site sends, stored as entered, matched without letter case; immutable (a fact's key carries it).
            label:
              type: string
              description: What the event is called in the feed.
            is_conversion:
              type: boolean
              description: Counted as a conversion in the feed and the Overview card.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the event.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
          required:
            - sid
            - team_sid
            - site_sid
            - event
            - label
            - is_conversion
            - created_by
            - created_at
            - updated_at
            - deleted_at
        already_exists:
          type: boolean
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - already_exists
        - meta
    DeleteWebsiteKeyPageResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - delete
        item:
          type: object
          additionalProperties: {}
        already_deleted:
          type: boolean
        soft_deleted:
          type: boolean
        retained:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - already_deleted
        - soft_deleted
        - retained
        - meta
    DeleteWebsiteSiteResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - delete
        item:
          type: object
          additionalProperties: {}
        already_deleted:
          type: boolean
        soft_deleted:
          type: boolean
        retained:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - already_deleted
        - soft_deleted
        - retained
        - meta
    DeleteWebsiteTrackedEventResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - delete
        item:
          type: object
          additionalProperties: {}
        already_deleted:
          type: boolean
        soft_deleted:
          type: boolean
        retained:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - already_deleted
        - soft_deleted
        - retained
        - meta
    GetProfileViewSightingResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - get
        item:
          type: object
          properties:
            sid:
              type: string
              description: Profile view sighting sid (sg_pv_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            sender_profile_sid:
              type: string
              description: "The sender profile whose \"Who viewed your profile\" list the viewer was on (ub_sp_..., external: unibox). The same person on two sender profiles is two rows: the view is the sender profile's."
            viewer_key:
              type: string
              description: "The one key of the viewer per sender profile: the member id (digits) for a named viewer, nick:<slug> when the list named them by the public slug alone, anon:<hash> for an anonymous row or a named row with no identifier. Never a URL."
            is_anonymous:
              type: boolean
              description: 'LinkedIn printed a descriptor instead of a name ("Someone at Acme"), or no identifier at all: counted, never resolved, never told to the product.'
            ln_member_id:
              type: string
              nullable: true
              description: The canonical member id (the member URN or the profile URN decoded); null for an anonymous or slug-only viewer.
            ln_nickname:
              type: string
              nullable: true
              description: The public profile slug the list carried, lowercased; null when none.
            person_sid:
              type: string
              nullable: true
              description: The team's person the viewer resolved to (cr_pp_..., playtables), by member id then by slug; null while unknown (asked about again at every run for ninety days).
            display_name:
              type: string
              nullable: true
              description: The list's words at the last sighting (the descriptor for an anonymous row); null when none.
            headline:
              type: string
              nullable: true
              description: The viewer's headline as the list printed it; null when none.
            image_url:
              type: string
              nullable: true
              description: The avatar the list carried (not a profile URL); null when none.
            viewed_at_text:
              type: string
              nullable: true
              description: 'The relative text LinkedIn printed last ("2 days ago"): the list carries no date; null when none.'
            times_seen:
              type: integer
              minimum: 1
              description: The first sighting and every re-view since (a listing that moved the viewer up).
            last_position:
              type: integer
              minimum: 0
              description: "The row's absolute rank on the list at the last sighting: the collector's stop rule."
            first_seen_at:
              type: string
              description: 'ISO 8601 UTC, when the collector first saw the viewer on this sender profile: the "since" the product can honestly say.'
            previous_seen_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the sighting before the last; null on a viewer seen once.
            last_seen_at:
              type: string
              description: "ISO 8601 UTC, the last sighting: the default sort and the week's window."
            last_fact_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last sighting the ledger and the thread were told about (or that needed no telling); null while the first sighting of a known person is owed, always null for an anonymous or unknown viewer.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - sender_profile_sid
            - viewer_key
            - is_anonymous
            - ln_member_id
            - ln_nickname
            - person_sid
            - display_name
            - headline
            - image_url
            - viewed_at_text
            - times_seen
            - last_position
            - first_seen_at
            - previous_seen_at
            - last_seen_at
            - last_fact_at
            - created_at
            - updated_at
        included:
          type: object
          properties:
            person:
              type: object
              properties:
                sid:
                  type: string
              required:
                - sid
              description: "The team's person the viewer resolved to: { sid } today (cr_pp_...), the compact card is owed. Absent for an anonymous viewer or one the team does not hold."
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - included
        - includes
        - meta
    GetSignalPreferencesResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - get
        item:
          type: object
          properties:
            sid:
              type: string
              description: Signal preference sid (sg_up_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            user_sid:
              type: string
              description: "The member the row belongs to: the caller's actor sid (an agent acting for a member is the member; an api key has a row of its own). Exactly one row per team and user."
            hidden_types:
              type: array
              items:
                type: string
              description: Signal types (SignalFeedType) the feed leaves out, as a set in the page's order. Default ["email_bounced"]. Hiding is opt-out, so a type added to the list later shows at once. The shown types are every SignalFeedType not in this list.
            notify_types:
              type: array
              items:
                type: string
              description: "Signal types the user is told about (the badge on the Signals menu entry counts the ones that are also shown, and each raises a toast while the user works elsewhere), as a set in the page's order. Default: website_key_page_visited, website_form_submitted, linkedin_connection_request_accepted, linkedin_message_replied, linkedin_inmail_replied, linkedin_invitation_received, email_replied. Opt-in, so a type added later tells nobody until chosen."
            sender_profile_scope:
              type: string
              enum:
                - all
                - mine
                - chosen
              description: "Whose sender profiles the feed's sender profile filter starts on: all (default, no sender profile filter), mine (the user's own sender profiles) or chosen (sender_profile_sids). A default of the filter and nothing more."
            sender_profile_sids:
              type: array
              items:
                type: string
              description: "The chosen sender profiles (unibox sender profile sids, ub_sp_...), at most 200, read when sender_profile_scope is chosen (chosen with [] is every sender profile: no sender profile filter) and kept when it moves off it, so moving back restores the picks. [] by default."
            toast_enabled:
              type: boolean
              description: Whether a notify type raises a toast. Default true.
            seen_at:
              type: string
              description: "ISO 8601 UTC, whole seconds: up to when the user has seen the feed. A fact is new when it reached the ledger after this (created_at > seen_at in search_activities). Born a day before the row, so a first visit shows the last day as new; moved forward by mark_signals_seen only, never back."
            saved_views:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: 10 base62 characters, minted by the server for an item sent without one and kept across writes.
                  name:
                    type: string
                    description: 1..60 characters.
                  view:
                    type: string
                    enum:
                      - needs_me
                      - all
                      - posts
                      - moments
                      - website
                      - linkedin
                      - email
                    description: "all | website | linkedin | email: the view the saved view opens on."
                  filter:
                    type: object
                    properties:
                      object_type:
                        type: string
                        nullable: true
                        enum:
                          - person
                          - company
                        description: "person | company: the All / People / Companies switch; null = both."
                      playtable_sid:
                        type: string
                        nullable: true
                        description: The table (pt_tb_...); null = every table.
                      sender_profile_sids:
                        type: array
                        items:
                          type: string
                        description: The sender profiles (unibox sender profile sids, ub_sp_...); [] = not filtered.
                      types:
                        type: array
                        items:
                          type: string
                        description: "The quick filter: signal types (SignalFeedType) in the page's order; [] = every shown type of the view."
                      q:
                        type: string
                        nullable: true
                        description: The name search, up to 128 characters; null = none.
                    required:
                      - object_type
                      - playtable_sid
                      - sender_profile_sids
                      - types
                      - q
                required:
                  - id
                  - name
                  - view
                  - filter
              description: The saved views of the page, at most 20, ids unique within the list. [] by default.
            created_at:
              type: string
              description: ISO 8601 UTC, the first call.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - user_sid
            - hidden_types
            - notify_types
            - sender_profile_scope
            - sender_profile_sids
            - toast_enabled
            - seen_at
            - saved_views
            - created_at
            - updated_at
        included:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - included
        - includes
        - meta
    GetSignalSettingsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - get
        item:
          type: object
          properties:
            sid:
              type: string
              description: Signal setting sid (sg_st_...). Stable for the life of the team.
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id). Exactly one row per team."
            website_link_codes:
              type: boolean
              description: "The master switch for the code in the links the send paths emit (the company's or the person's, by the site's identification). Off: no link of the team is coded, whatever the sites say. On (default): a link is coded when its site is verified, its identification_confirmation covers its level and the site's own link_codes_enabled is on."
            profile_views_enabled:
              type: boolean
              description: "The P0 switch of the LinkedIn leg. On (default): every live sender profile with a LinkedIn account and a premium plan has its \"Who viewed your profile\" list read once a day, but the sender profiles in profile_views_excluded_sender_profiles. Off: no sender profile's list is read."
            profile_views_excluded_sender_profiles:
              type: array
              items:
                type: string
              description: The sender profiles kept out of the profile view collection (sender profile sids, ub_sp_...); [] by default, at most 500.
            created_at:
              type: string
              description: ISO 8601 UTC, the first read.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - website_link_codes
            - profile_views_enabled
            - profile_views_excluded_sender_profiles
            - created_at
            - updated_at
        included:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - included
        - includes
        - meta
    GetWebsiteSessionResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - get
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website session sid (sg_ws_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: The registered site (sg_si_...).
            visitor_sid:
              type: string
              description: The browser behind the visit (sg_wv_...); a person may own several.
            person_sid:
              type: string
              nullable: true
              description: The person a rung named (cr_pp_..., playtables); null while nobody did. A person always takes a session over from a company.
            company_sid:
              type: string
              nullable: true
              description: The company a company code in our link or the network named when no person did (cr_co_..., playtables); cleared when a person takes the session over.
            attribution:
              type: string
              enum:
                - code
                - identified
                - fingerprint
                - manual
                - company_code
                - company_network
                - none
              description: "Which rung named the owner: code (the person code in our link), identified (an identify or a form), fingerprint (the device), manual (a bind by hand), company_code (the company code in our link: the company, never a person; every code on a site set to companies), company_network (the network, a company); none while nothing did."
            fingerprint_sid:
              type: string
              nullable: true
              description: The device the fingerprint base saw the session from (sg_fp_...); null when none was stored.
            started_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the first hit. The feed's order, newest first.
            last_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the newest hit; the row grows until the close.
            closed_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, set by the sweep 30 minutes after last_seen_at; null = the visitor may still be on the site.
            pageviews_count:
              type: integer
              minimum: 0
              description: Every page view, beyond the cap of pages too.
            engaged_seconds:
              type: integer
              minimum: 0
              description: The sum over page views of the largest engaged time each reported.
            entry_path:
              type: string
              description: The path of the first page view, with its query.
            exit_path:
              type: string
              description: The path of the last page view.
            pages:
              type: array
              items:
                type: object
                properties:
                  page_id:
                    type: string
                    description: The page view's id from the wire (12 characters).
                  path:
                    type: string
                    description: The page's path with its query, the code in our link removed by the script.
                  title:
                    type: string
                    nullable: true
                    description: The document title; null when none.
                  engaged_seconds:
                    type: integer
                    minimum: 0
                    description: The largest engaged time a ping of this page view reported, in whole seconds.
                  first_seen_at:
                    type: string
                    description: ISO 8601 UTC, the receipt time of the pageview hit.
                  scroll_pct:
                    type: integer
                    nullable: true
                    minimum: 0
                    maximum: 100
                    description: The deepest scroll a ping of this page view reported, 0 to 100; null until one did (and on visits folded before 2026-10-07).
                required:
                  - page_id
                  - path
                  - title
                  - engaged_seconds
                  - first_seen_at
                  - scroll_pct
              description: The first 50 page views, in order, each with its engaged time.
            events:
              type: array
              items:
                type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - event
                      - form
                    description: "event: a custom event the site sent; form: a form it reported (a marked form's submit, or a form a server-side identify named)."
                  name:
                    type: string
                    description: The event's name or the form's name as the site sent it. A form's email never rides here.
                  at:
                    type: string
                    description: ISO 8601 UTC, the receipt time of the hit.
                  page_id:
                    type: string
                    description: The page view the hit belonged to.
                required:
                  - kind
                  - name
                  - at
                  - page_id
              description: The first 50 custom events and forms, in order; every event the site sent, registered or not.
            key_pages:
              type: array
              items:
                type: string
              description: "The keys (slugs) of the site's key pages reached, in the order first reached: what the key_page filter matches and the signal visited_key_page reads."
            referrer_type:
              type: string
              enum:
                - direct
                - internal
                - search
                - social
                - email
                - ads
                - referral
                - ai_assistant
                - unknown
              description: "Where the visit came from, decided on the first page view: direct, internal (another page of the site), search, social, email, ads (a click id or a paid utm_medium), referral, ai_assistant (ChatGPT, Perplexity, Claude and the like), unknown."
            referrer_host:
              type: string
              nullable: true
              description: The referrer's host, lowercased, no www.; null when absent or unreadable.
            utm_source:
              type: string
              nullable: true
            utm_medium:
              type: string
              nullable: true
            utm_campaign:
              type: string
              nullable: true
            utm_content:
              type: string
              nullable: true
            utm_term:
              type: string
              nullable: true
            landing_code:
              type: string
              nullable: true
              description: The first code a hit of the session carried (the person code or the company code in the link we sent); null when none.
            browser:
              type: string
              nullable: true
              description: The parser's name (Chrome, Safari, Firefox...); null when unknown.
            browser_version:
              type: string
              nullable: true
            os:
              type: string
              nullable: true
              description: Windows, macOS, iOS, Android, Linux...; null when unknown.
            os_version:
              type: string
              nullable: true
            device:
              type: string
              enum:
                - desktop
                - mobile
                - tablet
                - unknown
              description: desktop | mobile | tablet | unknown.
            screen:
              type: string
              nullable: true
              description: "{width}x{height} of the screen; null when the first page view did not report it."
            language:
              type: string
              nullable: true
              description: The browser's first language; null when not reported.
            timezone:
              type: string
              nullable: true
              description: The browser's IANA zone; null when not reported.
            geo_country:
              type: string
              nullable: true
              description: ISO 3166-1 alpha-2 from the edge's location header; null when the edge gave none.
            geo_region:
              type: string
              nullable: true
            geo_city:
              type: string
              nullable: true
            ip:
              type: string
              description: The client address of the first hit (IPv4 or IPv6); its network part only once the network answer is stored on a site with anonymize_ip.
            network_status:
              type: string
              enum:
                - pending
                - resolved
                - failed
                - private
              description: pending until the data service answered for the address; resolved with the network columns filled; failed (no answer after the asks); private (an address nobody is asked about).
            network_type:
              type: string
              nullable: true
              description: "The data service's classification of the block: business, isp, mobile, hosting, education, government or unknown; null until resolved."
            network_name:
              type: string
              nullable: true
              description: The organization the block is registered to, else the registry's name of the block ("Deutsche Telekom", "Hetzner"); null until resolved.
            network_domain:
              type: string
              nullable: true
              description: The company domain the data service derived for a business network; null when none.
            asn:
              type: integer
              nullable: true
              description: The origin AS; null until resolved.
            as_name:
              type: string
              nullable: true
              description: The AS holder; null until resolved.
            is_internal:
              type: boolean
              description: "A hit came from one of the site's ignored_ips, or an identified email of the team's own domains: the team's own traffic, never a fact, never a signal."
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - site_sid
            - visitor_sid
            - person_sid
            - company_sid
            - attribution
            - fingerprint_sid
            - started_at
            - last_seen_at
            - closed_at
            - pageviews_count
            - engaged_seconds
            - entry_path
            - exit_path
            - pages
            - events
            - key_pages
            - referrer_type
            - referrer_host
            - utm_source
            - utm_medium
            - utm_campaign
            - utm_content
            - utm_term
            - landing_code
            - browser
            - browser_version
            - os
            - os_version
            - device
            - screen
            - language
            - timezone
            - geo_country
            - geo_region
            - geo_city
            - ip
            - network_status
            - network_type
            - network_name
            - network_domain
            - asn
            - as_name
            - is_internal
            - created_at
            - updated_at
        included:
          type: object
          properties:
            visitor:
              type: object
              properties:
                sid:
                  type: string
              required:
                - sid
              description: The browser behind the visit, the WebsiteVisitorDomain verbatim (bound person, identified email, sessions_count, the latest attributes; // see ./website_visitors.md).
            person:
              type: object
              properties:
                sid:
                  type: string
              required:
                - sid
              description: "The person a rung named: { sid } today (cr_pp_...), the compact card is owed. Absent while person_sid is null."
            company:
              type: object
              properties:
                sid:
                  type: string
              required:
                - sid
              description: "The company a company code or the network named when nobody else did: { sid } today (cr_co_...). Absent while company_sid is null."
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - included
        - includes
        - meta
    GetWebsiteSiteResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - get
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website site sid (sg_si_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            domain:
              type: string
              description: "The host as the team typed it, reduced to a bare hostname: lowercased, no scheme, port or path, a leading www. dropped. Immutable: a different host is a different site."
            include_subdomains:
              type: boolean
              description: Hosts under domain belong to the site (default true).
            site_key:
              type: string
              description: The public 20-character key the loader carries (gs.k). It names the site to the collector; not a secret. Changes only through rotate_website_site_key.
            status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: pending = waiting for the script (links to it are not coded yet); verified = receiving; broken = the health rule flagged it (see broken_reason); disabled = switched off by update enabled false.
            verified_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last transition into verified; null never.
            last_check_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last active check (verify_website_site or the daily job); null never.
            last_check_result:
              type: object
              nullable: true
              properties:
                outcome:
                  type: string
                  enum:
                    - found
                    - site_key_mismatch
                    - loader_missing
                    - fetch_failed
                  description: "The best outcome over pages: found wins over site_key_mismatch, over loader_missing, over fetch_failed."
                pages:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL requested last for this page.
                      key_page_sid:
                        type: string
                        nullable: true
                        description: sg_kp_... the key page this row checked; null for the home page.
                      outcome:
                        type: string
                        enum:
                          - found
                          - site_key_mismatch
                          - loader_missing
                          - fetch_failed
                        description: "found: the page carries this site's key. site_key_mismatch: a loader with another key. loader_missing: no loader in the page source (a tag manager installs it outside the source, so such a site is verified by its first hit instead). fetch_failed: no page to read, see failure."
                      http_status:
                        type: integer
                        nullable: true
                        description: The final HTTP status; null when no answer arrived.
                      failure:
                        type: string
                        nullable: true
                        enum:
                          - invalid_url
                          - scheme_not_allowed
                          - credentials_in_url
                          - port_not_allowed
                          - ip_literal
                          - host_unresolvable
                          - private_address
                          - redirect_without_location
                          - too_many_redirects
                          - redirected_off_site
                          - connection_failed
                          - http_status
                        description: "Why the fetch failed, when outcome is fetch_failed: the guard refused the URL (scheme, port, credentials, an IP literal, a private address), the host did not resolve, the redirects ran out or left the site, the connection failed, or the status was outside 2xx. Null otherwise."
                    required:
                      - url
                      - key_page_sid
                      - outcome
                      - http_status
                      - failure
                  description: The home page first, then the checkable key pages (a pattern that names one URL).
              required:
                - outcome
                - pages
              description: What the last active check found, page by page; null while no check ran, and cleared by a key rotation.
            broken_reason:
              type: string
              nullable: true
              enum:
                - loader_missing
                - fetch_failed
                - site_key_mismatch
                - no_hits
              description: "Set while broken: loader_missing (the source lost the loader and the hits stopped), fetch_failed (two checks in a row could not read the site while it was silent), site_key_mismatch (another key in the loader), no_hits (a tag-manager install whose hits stopped). Null otherwise."
            last_hit_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the newest hit the collector reported; null while nothing was received.
            hits_count_24h:
              type: integer
              minimum: 0
              description: Hits in the current UTC hour and the 23 before it, refreshed on every hit batch and every check (a rolling window, not "today").
            identification:
              type: string
              enum:
                - companies
                - people
              description: "What a visit to the site may name. companies (default): links carry the recipient's company code and a visit shows the company, never a person. people: visits from the people the team writes to are shown by name."
            identification_confirmation:
              type: object
              nullable: true
              properties:
                identification:
                  type: string
                  enum:
                    - companies
                    - people
                  description: "The level confirmed: people covers both levels, companies only itself."
                confirmed_at:
                  type: string
                  description: ISO 8601 UTC.
                confirmed_by:
                  type: object
                  properties:
                    actor_type:
                      type: string
                      enum:
                        - user
                        - support
                        - api_key
                        - system
                        - agent
                    actor_sid:
                      type: string
                      nullable: true
                    team_sid:
                      type: string
                    actor_name:
                      type: string
                      nullable: true
                      description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                    oauth_client_sid:
                      type: string
                      nullable: true
                      description: The acting OAuth client (id_oc_*); null off the OAuth path.
                    reason:
                      type: string
                      nullable: true
                      description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                    permissions:
                      type: object
                      additionalProperties: {}
                      description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                    cluster_id:
                      type: integer
                      nullable: true
                      description: "Internal audit context: the cluster that served the write."
                    trace_id:
                      type: string
                      nullable: true
                      description: "Internal audit context: the trace id of the request that wrote the row."
                  required:
                    - actor_type
                    - actor_sid
                    - team_sid
                    - permissions
                  description: Who confirmed.
              required:
                - identification
                - confirmed_at
                - confirmed_by
              description: The customer's latest confirmation of its duties for a level, by whom and when. Links are coded only while it covers the site's level; null = none yet.
            link_codes_enabled:
              type: boolean
              description: Links to this site get a code (the company's or the person's, by identification) when the site is verified, identification_confirmation covers its level and the team switch (signal_settings.website_link_codes) is on. Default true.
            carrier_linkedin:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent on LinkedIn: fragment (#g_<code>, default) or query (?gs=<code>)."
            carrier_email:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent by email: query (default) or fragment."
            consent_mode:
              type: string
              enum:
                - not_required
                - required
              description: "not_required (default): the first-party visitor id is stored on the first hit. required: nothing is stored until the site's banner calls gs('consent', true); until then a visit is attributed by the code in the link alone."
            fingerprint_mode:
              type: string
              enum:
                - "on"
                - consent
                - "off"
              description: "on (default): the device fingerprint is collected (answered as consent when consent_mode is required); consent: only after consent; off: never."
            anonymize_ip:
              type: boolean
              description: Once a session's network is resolved, keep the address's network part only (the last octet, or the last 80 bits of IPv6, zeroed). Default false.
            ignored_ips:
              type: array
              items:
                type: string
              description: "IPv4 or IPv6 addresses or CIDR ranges whose visits are internal (the office, the VPN egress): shown under their own filter, never a fact, never a signal. At most 50."
            live_alerts:
              type: string
              enum:
                - "off"
                - key_pages
                - all_known
              description: "When a known person on the site alerts the team now: off, key_pages (default: a key page reached), all_known (any visit)."
            live_alert_tasks:
              type: boolean
              description: "A live alert also opens a task, due now, on each of the person's open threads. false: only the notice goes. Default true."
            live_alert_task_minutes:
              type: integer
              nullable: true
              description: "How long that task lives: still open after this many minutes, the sweep cancels it and it reads as expired. 5 to 43200 (30 days); null = it never expires. Default 30."
            inbound_playtable_sid:
              type: string
              nullable: true
              description: pt_tb_... the table an identified visitor nobody has would be handed to; stored only today, nothing reads it yet.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the site.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. A deleted site keeps its sessions and visitors.
          required:
            - sid
            - team_sid
            - domain
            - include_subdomains
            - site_key
            - status
            - verified_at
            - last_check_at
            - last_check_result
            - broken_reason
            - last_hit_at
            - hits_count_24h
            - identification
            - identification_confirmation
            - link_codes_enabled
            - carrier_linkedin
            - carrier_email
            - consent_mode
            - fingerprint_mode
            - anonymize_ip
            - ignored_ips
            - live_alerts
            - live_alert_tasks
            - live_alert_task_minutes
            - inbound_playtable_sid
            - created_by
            - created_at
            - updated_at
            - deleted_at
        included:
          type: object
          properties:
            loader:
              type: object
              properties:
                html:
                  type: string
                  description: "The two script tags to paste into every page of the site, before </body>: the inline part with this site's key (it captures the fragment and the query before a router rewrites the address), then the async collector script."
                script_url:
                  type: string
                  description: The collector script's URL, as the second tag loads it.
              required:
                - html
                - script_url
              description: "The loader of this site, always present on get: what the user pastes into the pages."
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - included
        - includes
        - meta
    GetWebsiteVisitorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - get
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website visitor sid (sg_wv_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: "The site the browser visited (sg_si_...): the same browser on two sites is two rows."
            visitor_id:
              type: string
              description: The first-party visitor id the script stores (_gs_vid, a lowercase UUID v4), or eph_ plus 40 hex characters for a hit that carried none.
            is_ephemeral:
              type: boolean
              description: "The row belongs to a day, not to a browser (consent not given, storage blocked): a stranger the next day, never bound."
            person_sid:
              type: string
              nullable: true
              description: The person the visitor is bound to (cr_pp_..., playtables); null while unbound.
            identified_email:
              type: string
              nullable: true
              description: 'The email an identify or a form gave when no person matched: the "Add to table" rows of the feed. Null otherwise.'
            bound_by:
              type: string
              nullable: true
              enum:
                - code
                - identify
                - fingerprint
                - manual
              description: "Which rung bound the visitor: code (the person code in our link), identify (an email a person matched), fingerprint (the device), manual (a bind by hand). Null while unbound."
            bound_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, when the bind was written; null while unbound.
            first_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the first hit.
            last_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the newest hit.
            sessions_count:
              type: integer
              minimum: 0
              description: "Sessions opened for this visitor: the returning visitors."
            browser:
              type: string
              nullable: true
              description: From the newest session; null when unknown.
            browser_version:
              type: string
              nullable: true
            os:
              type: string
              nullable: true
            os_version:
              type: string
              nullable: true
            device:
              type: string
              enum:
                - desktop
                - mobile
                - tablet
                - unknown
              description: desktop | mobile | tablet | unknown, from the newest session.
            screen:
              type: string
              nullable: true
            language:
              type: string
              nullable: true
            timezone:
              type: string
              nullable: true
            geo_country:
              type: string
              nullable: true
              description: ISO 3166-1 alpha-2 of the newest session; null when the edge gave none.
            geo_region:
              type: string
              nullable: true
            geo_city:
              type: string
              nullable: true
            network_type:
              type: string
              nullable: true
              description: "The newest resolved session's classification: business, isp, mobile, hosting, education, government or unknown; null until one resolved."
            network_name:
              type: string
              nullable: true
              description: The organization behind the newest resolved session's address; null until one resolved.
            network_domain:
              type: string
              nullable: true
              description: The company domain the data service derived; null when none.
            asn:
              type: integer
              nullable: true
            as_name:
              type: string
              nullable: true
            is_internal:
              type: boolean
              description: The newest session was internal (the site's ignored_ips, or an identified email of the team's own domains).
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - site_sid
            - visitor_id
            - is_ephemeral
            - person_sid
            - identified_email
            - bound_by
            - bound_at
            - first_seen_at
            - last_seen_at
            - sessions_count
            - browser
            - browser_version
            - os
            - os_version
            - device
            - screen
            - language
            - timezone
            - geo_country
            - geo_region
            - geo_city
            - network_type
            - network_name
            - network_domain
            - asn
            - as_name
            - is_internal
            - created_at
            - updated_at
        included:
          type: object
          properties:
            person:
              type: object
              properties:
                sid:
                  type: string
              required:
                - sid
              description: "The bound person: { sid } today (cr_pp_...), the compact card is owed. Absent while person_sid is null."
            last_session:
              type: object
              properties:
                sid:
                  type: string
              required:
                - sid
              description: The visitor's newest session, the WebsiteSessionDomain verbatim (pages, key pages, events, the source, the network; // see ./website_sessions.md). Absent for a visitor with no session.
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - included
        - includes
        - meta
    IdentifyWebsiteVisitorByEmailRequest:
      type: object
      description: Request body of `identify_website_visitor_by_email`.
      properties:
        site_sid:
          type: string
          minLength: 18
          maxLength: 18
          pattern: ^sg_si_
          description: The site the page belongs to.
        visitor_id:
          type: string
          maxLength: 64
          description: The first-party visitor id the page holds (_gs_vid), as the customer's backend read it from the browser.
        email:
          type: string
          maxLength: 320
          description: The address the person logged in or signed up with; the person is found by it in the team's tables.
        name:
          type: string
          nullable: true
          maxLength: 200
          description: Taken as the script's identify takes it; not stored until the inbound lead slice.
        company:
          type: string
          nullable: true
          maxLength: 200
          description: Taken as the script's identify takes it; not stored until the inbound lead slice.
        form:
          type: string
          nullable: true
          pattern: ^[A-Za-z0-9_.:-]{1,64}$
          description: "The form the person submitted (signup): it joins the open session's events once per name and becomes the fact website_form_submitted."
      required:
        - site_sid
        - visitor_id
        - email
    IdentifyWebsiteVisitorByEmailResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item:
          type: object
          nullable: true
          properties:
            sid:
              type: string
              description: Website visitor sid (sg_wv_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: "The site the browser visited (sg_si_...): the same browser on two sites is two rows."
            visitor_id:
              type: string
              description: The first-party visitor id the script stores (_gs_vid, a lowercase UUID v4), or eph_ plus 40 hex characters for a hit that carried none.
            is_ephemeral:
              type: boolean
              description: "The row belongs to a day, not to a browser (consent not given, storage blocked): a stranger the next day, never bound."
            person_sid:
              type: string
              nullable: true
              description: The person the visitor is bound to (cr_pp_..., playtables); null while unbound.
            identified_email:
              type: string
              nullable: true
              description: 'The email an identify or a form gave when no person matched: the "Add to table" rows of the feed. Null otherwise.'
            bound_by:
              type: string
              nullable: true
              enum:
                - code
                - identify
                - fingerprint
                - manual
              description: "Which rung bound the visitor: code (the person code in our link), identify (an email a person matched), fingerprint (the device), manual (a bind by hand). Null while unbound."
            bound_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, when the bind was written; null while unbound.
            first_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the first hit.
            last_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the newest hit.
            sessions_count:
              type: integer
              minimum: 0
              description: "Sessions opened for this visitor: the returning visitors."
            browser:
              type: string
              nullable: true
              description: From the newest session; null when unknown.
            browser_version:
              type: string
              nullable: true
            os:
              type: string
              nullable: true
            os_version:
              type: string
              nullable: true
            device:
              type: string
              enum:
                - desktop
                - mobile
                - tablet
                - unknown
              description: desktop | mobile | tablet | unknown, from the newest session.
            screen:
              type: string
              nullable: true
            language:
              type: string
              nullable: true
            timezone:
              type: string
              nullable: true
            geo_country:
              type: string
              nullable: true
              description: ISO 3166-1 alpha-2 of the newest session; null when the edge gave none.
            geo_region:
              type: string
              nullable: true
            geo_city:
              type: string
              nullable: true
            network_type:
              type: string
              nullable: true
              description: "The newest resolved session's classification: business, isp, mobile, hosting, education, government or unknown; null until one resolved."
            network_name:
              type: string
              nullable: true
              description: The organization behind the newest resolved session's address; null until one resolved.
            network_domain:
              type: string
              nullable: true
              description: The company domain the data service derived; null when none.
            asn:
              type: integer
              nullable: true
            as_name:
              type: string
              nullable: true
            is_internal:
              type: boolean
              description: The newest session was internal (the site's ignored_ips, or an identified email of the team's own domains).
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - site_sid
            - visitor_id
            - is_ephemeral
            - person_sid
            - identified_email
            - bound_by
            - bound_at
            - first_seen_at
            - last_seen_at
            - sessions_count
            - browser
            - browser_version
            - os
            - os_version
            - device
            - screen
            - language
            - timezone
            - geo_country
            - geo_region
            - geo_city
            - network_type
            - network_name
            - network_domain
            - asn
            - as_name
            - is_internal
            - created_at
            - updated_at
        result:
          type: object
          properties:
            bound:
              type: boolean
              description: A person is bound after the call (always true by hand; from the backend, false when the email matched nobody and stayed on the row as identified_email, or the site is set to companies).
            person_sid:
              type: string
              nullable: true
              description: The bound person (cr_pp_...), or null.
          required:
            - bound
            - person_sid
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
    IdentifyWebsiteVisitorRequest:
      type: object
      description: Request body of `identify_website_visitor`.
      properties:
        person_sid:
          type: string
          minLength: 18
          maxLength: 18
          pattern: ^cr_pp_
          description: The person this browser is (a live playtables person of the team). The bind is manual and overrides any automatic one.
      required:
        - person_sid
    IdentifyWebsiteVisitorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item:
          type: object
          nullable: true
          properties:
            sid:
              type: string
              description: Website visitor sid (sg_wv_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: "The site the browser visited (sg_si_...): the same browser on two sites is two rows."
            visitor_id:
              type: string
              description: The first-party visitor id the script stores (_gs_vid, a lowercase UUID v4), or eph_ plus 40 hex characters for a hit that carried none.
            is_ephemeral:
              type: boolean
              description: "The row belongs to a day, not to a browser (consent not given, storage blocked): a stranger the next day, never bound."
            person_sid:
              type: string
              nullable: true
              description: The person the visitor is bound to (cr_pp_..., playtables); null while unbound.
            identified_email:
              type: string
              nullable: true
              description: 'The email an identify or a form gave when no person matched: the "Add to table" rows of the feed. Null otherwise.'
            bound_by:
              type: string
              nullable: true
              enum:
                - code
                - identify
                - fingerprint
                - manual
              description: "Which rung bound the visitor: code (the person code in our link), identify (an email a person matched), fingerprint (the device), manual (a bind by hand). Null while unbound."
            bound_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, when the bind was written; null while unbound.
            first_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the first hit.
            last_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the newest hit.
            sessions_count:
              type: integer
              minimum: 0
              description: "Sessions opened for this visitor: the returning visitors."
            browser:
              type: string
              nullable: true
              description: From the newest session; null when unknown.
            browser_version:
              type: string
              nullable: true
            os:
              type: string
              nullable: true
            os_version:
              type: string
              nullable: true
            device:
              type: string
              enum:
                - desktop
                - mobile
                - tablet
                - unknown
              description: desktop | mobile | tablet | unknown, from the newest session.
            screen:
              type: string
              nullable: true
            language:
              type: string
              nullable: true
            timezone:
              type: string
              nullable: true
            geo_country:
              type: string
              nullable: true
              description: ISO 3166-1 alpha-2 of the newest session; null when the edge gave none.
            geo_region:
              type: string
              nullable: true
            geo_city:
              type: string
              nullable: true
            network_type:
              type: string
              nullable: true
              description: "The newest resolved session's classification: business, isp, mobile, hosting, education, government or unknown; null until one resolved."
            network_name:
              type: string
              nullable: true
              description: The organization behind the newest resolved session's address; null until one resolved.
            network_domain:
              type: string
              nullable: true
              description: The company domain the data service derived; null when none.
            asn:
              type: integer
              nullable: true
            as_name:
              type: string
              nullable: true
            is_internal:
              type: boolean
              description: The newest session was internal (the site's ignored_ips, or an identified email of the team's own domains).
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - site_sid
            - visitor_id
            - is_ephemeral
            - person_sid
            - identified_email
            - bound_by
            - bound_at
            - first_seen_at
            - last_seen_at
            - sessions_count
            - browser
            - browser_version
            - os
            - os_version
            - device
            - screen
            - language
            - timezone
            - geo_country
            - geo_region
            - geo_city
            - network_type
            - network_name
            - network_domain
            - asn
            - as_name
            - is_internal
            - created_at
            - updated_at
        result:
          type: object
          properties:
            bound:
              type: boolean
              description: A person is bound after the call (always true by hand; from the backend, false when the email matched nobody and stayed on the row as identified_email, or the site is set to companies).
            person_sid:
              type: string
              nullable: true
              description: The bound person (cr_pp_...), or null.
          required:
            - bound
            - person_sid
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
    MarkSignalsSeenRequest:
      type: object
      description: Request body of `mark_signals_seen`.
      properties:
        seen_at:
          type: string
          nullable: true
          description: "ISO 8601 (an offset is read): the instant the feed was read. Absent or null = now. Cut to the second, capped at now plus one minute, and never moves seen_at back."
    MarkSignalsSeenResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item:
          type: object
          nullable: true
          properties:
            sid:
              type: string
              description: Signal preference sid (sg_up_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            user_sid:
              type: string
              description: "The member the row belongs to: the caller's actor sid (an agent acting for a member is the member; an api key has a row of its own). Exactly one row per team and user."
            hidden_types:
              type: array
              items:
                type: string
              description: Signal types (SignalFeedType) the feed leaves out, as a set in the page's order. Default ["email_bounced"]. Hiding is opt-out, so a type added to the list later shows at once. The shown types are every SignalFeedType not in this list.
            notify_types:
              type: array
              items:
                type: string
              description: "Signal types the user is told about (the badge on the Signals menu entry counts the ones that are also shown, and each raises a toast while the user works elsewhere), as a set in the page's order. Default: website_key_page_visited, website_form_submitted, linkedin_connection_request_accepted, linkedin_message_replied, linkedin_inmail_replied, linkedin_invitation_received, email_replied. Opt-in, so a type added later tells nobody until chosen."
            sender_profile_scope:
              type: string
              enum:
                - all
                - mine
                - chosen
              description: "Whose sender profiles the feed's sender profile filter starts on: all (default, no sender profile filter), mine (the user's own sender profiles) or chosen (sender_profile_sids). A default of the filter and nothing more."
            sender_profile_sids:
              type: array
              items:
                type: string
              description: "The chosen sender profiles (unibox sender profile sids, ub_sp_...), at most 200, read when sender_profile_scope is chosen (chosen with [] is every sender profile: no sender profile filter) and kept when it moves off it, so moving back restores the picks. [] by default."
            toast_enabled:
              type: boolean
              description: Whether a notify type raises a toast. Default true.
            seen_at:
              type: string
              description: "ISO 8601 UTC, whole seconds: up to when the user has seen the feed. A fact is new when it reached the ledger after this (created_at > seen_at in search_activities). Born a day before the row, so a first visit shows the last day as new; moved forward by mark_signals_seen only, never back."
            saved_views:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: 10 base62 characters, minted by the server for an item sent without one and kept across writes.
                  name:
                    type: string
                    description: 1..60 characters.
                  view:
                    type: string
                    enum:
                      - needs_me
                      - all
                      - posts
                      - moments
                      - website
                      - linkedin
                      - email
                    description: "all | website | linkedin | email: the view the saved view opens on."
                  filter:
                    type: object
                    properties:
                      object_type:
                        type: string
                        nullable: true
                        enum:
                          - person
                          - company
                        description: "person | company: the All / People / Companies switch; null = both."
                      playtable_sid:
                        type: string
                        nullable: true
                        description: The table (pt_tb_...); null = every table.
                      sender_profile_sids:
                        type: array
                        items:
                          type: string
                        description: The sender profiles (unibox sender profile sids, ub_sp_...); [] = not filtered.
                      types:
                        type: array
                        items:
                          type: string
                        description: "The quick filter: signal types (SignalFeedType) in the page's order; [] = every shown type of the view."
                      q:
                        type: string
                        nullable: true
                        description: The name search, up to 128 characters; null = none.
                    required:
                      - object_type
                      - playtable_sid
                      - sender_profile_sids
                      - types
                      - q
                required:
                  - id
                  - name
                  - view
                  - filter
              description: The saved views of the page, at most 20, ids unique within the list. [] by default.
            created_at:
              type: string
              description: ISO 8601 UTC, the first call.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - user_sid
            - hidden_types
            - notify_types
            - sender_profile_scope
            - sender_profile_sids
            - toast_enabled
            - seen_at
            - saved_views
            - created_at
            - updated_at
        result:
          type: object
          properties:
            previous_seen_at:
              type: string
              description: "ISO 8601 UTC: seen_at before the call."
            moved:
              type: boolean
              description: Whether seen_at moved forward (false for an instant at or before the stored one).
          required:
            - previous_seen_at
            - moved
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
    McpError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_failed
                - nothing_to_update
                - not_found
                - relation_not_found
                - invalid_transition
                - limit_exceeded
                - payment_required
                - duplicate_rejected
                - conflict
                - delete_blocked
                - unauthorized
                - forbidden
                - rate_limited
                - internal_error
                - service_unavailable
                - not_implemented
            message:
              type: string
            recoverable:
              type: boolean
            suggestion:
              type: string
            field_errors:
              type: object
              additionalProperties:
                type: array
                items:
                  type: object
                  properties:
                    rule:
                      type: string
                    message:
                      type: string
                  required:
                    - rule
                    - message
            blockers:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    description: Machine-readable blocker type (active_flow, pending_tasks, …).
                  severity:
                    type: string
                    enum:
                      - hard
                      - soft
                    description: hard = external action required; soft = acknowledge is enough.
                  description:
                    type: string
                  entity_sid:
                    type: string
                    nullable: true
                  count:
                    type: integer
                  resolution:
                    type: string
                    description: "Hard: tool name to call. Soft: code for acknowledge[]."
                  resolution_hint:
                    type: string
                required:
                  - type
                  - severity
                  - description
                  - entity_sid
                  - resolution
                  - resolution_hint
            context:
              type: object
              additionalProperties: {}
          required:
            - code
            - message
            - recoverable
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - error
    RotateWebsiteSiteKeyResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item:
          type: object
          nullable: true
          properties:
            sid:
              type: string
              description: Website site sid (sg_si_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            domain:
              type: string
              description: "The host as the team typed it, reduced to a bare hostname: lowercased, no scheme, port or path, a leading www. dropped. Immutable: a different host is a different site."
            include_subdomains:
              type: boolean
              description: Hosts under domain belong to the site (default true).
            site_key:
              type: string
              description: The public 20-character key the loader carries (gs.k). It names the site to the collector; not a secret. Changes only through rotate_website_site_key.
            status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: pending = waiting for the script (links to it are not coded yet); verified = receiving; broken = the health rule flagged it (see broken_reason); disabled = switched off by update enabled false.
            verified_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last transition into verified; null never.
            last_check_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last active check (verify_website_site or the daily job); null never.
            last_check_result:
              type: object
              nullable: true
              properties:
                outcome:
                  type: string
                  enum:
                    - found
                    - site_key_mismatch
                    - loader_missing
                    - fetch_failed
                  description: "The best outcome over pages: found wins over site_key_mismatch, over loader_missing, over fetch_failed."
                pages:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL requested last for this page.
                      key_page_sid:
                        type: string
                        nullable: true
                        description: sg_kp_... the key page this row checked; null for the home page.
                      outcome:
                        type: string
                        enum:
                          - found
                          - site_key_mismatch
                          - loader_missing
                          - fetch_failed
                        description: "found: the page carries this site's key. site_key_mismatch: a loader with another key. loader_missing: no loader in the page source (a tag manager installs it outside the source, so such a site is verified by its first hit instead). fetch_failed: no page to read, see failure."
                      http_status:
                        type: integer
                        nullable: true
                        description: The final HTTP status; null when no answer arrived.
                      failure:
                        type: string
                        nullable: true
                        enum:
                          - invalid_url
                          - scheme_not_allowed
                          - credentials_in_url
                          - port_not_allowed
                          - ip_literal
                          - host_unresolvable
                          - private_address
                          - redirect_without_location
                          - too_many_redirects
                          - redirected_off_site
                          - connection_failed
                          - http_status
                        description: "Why the fetch failed, when outcome is fetch_failed: the guard refused the URL (scheme, port, credentials, an IP literal, a private address), the host did not resolve, the redirects ran out or left the site, the connection failed, or the status was outside 2xx. Null otherwise."
                    required:
                      - url
                      - key_page_sid
                      - outcome
                      - http_status
                      - failure
                  description: The home page first, then the checkable key pages (a pattern that names one URL).
              required:
                - outcome
                - pages
              description: What the last active check found, page by page; null while no check ran, and cleared by a key rotation.
            broken_reason:
              type: string
              nullable: true
              enum:
                - loader_missing
                - fetch_failed
                - site_key_mismatch
                - no_hits
              description: "Set while broken: loader_missing (the source lost the loader and the hits stopped), fetch_failed (two checks in a row could not read the site while it was silent), site_key_mismatch (another key in the loader), no_hits (a tag-manager install whose hits stopped). Null otherwise."
            last_hit_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the newest hit the collector reported; null while nothing was received.
            hits_count_24h:
              type: integer
              minimum: 0
              description: Hits in the current UTC hour and the 23 before it, refreshed on every hit batch and every check (a rolling window, not "today").
            identification:
              type: string
              enum:
                - companies
                - people
              description: "What a visit to the site may name. companies (default): links carry the recipient's company code and a visit shows the company, never a person. people: visits from the people the team writes to are shown by name."
            identification_confirmation:
              type: object
              nullable: true
              properties:
                identification:
                  type: string
                  enum:
                    - companies
                    - people
                  description: "The level confirmed: people covers both levels, companies only itself."
                confirmed_at:
                  type: string
                  description: ISO 8601 UTC.
                confirmed_by:
                  type: object
                  properties:
                    actor_type:
                      type: string
                      enum:
                        - user
                        - support
                        - api_key
                        - system
                        - agent
                    actor_sid:
                      type: string
                      nullable: true
                    team_sid:
                      type: string
                    actor_name:
                      type: string
                      nullable: true
                      description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                    oauth_client_sid:
                      type: string
                      nullable: true
                      description: The acting OAuth client (id_oc_*); null off the OAuth path.
                    reason:
                      type: string
                      nullable: true
                      description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                    permissions:
                      type: object
                      additionalProperties: {}
                      description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                    cluster_id:
                      type: integer
                      nullable: true
                      description: "Internal audit context: the cluster that served the write."
                    trace_id:
                      type: string
                      nullable: true
                      description: "Internal audit context: the trace id of the request that wrote the row."
                  required:
                    - actor_type
                    - actor_sid
                    - team_sid
                    - permissions
                  description: Who confirmed.
              required:
                - identification
                - confirmed_at
                - confirmed_by
              description: The customer's latest confirmation of its duties for a level, by whom and when. Links are coded only while it covers the site's level; null = none yet.
            link_codes_enabled:
              type: boolean
              description: Links to this site get a code (the company's or the person's, by identification) when the site is verified, identification_confirmation covers its level and the team switch (signal_settings.website_link_codes) is on. Default true.
            carrier_linkedin:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent on LinkedIn: fragment (#g_<code>, default) or query (?gs=<code>)."
            carrier_email:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent by email: query (default) or fragment."
            consent_mode:
              type: string
              enum:
                - not_required
                - required
              description: "not_required (default): the first-party visitor id is stored on the first hit. required: nothing is stored until the site's banner calls gs('consent', true); until then a visit is attributed by the code in the link alone."
            fingerprint_mode:
              type: string
              enum:
                - "on"
                - consent
                - "off"
              description: "on (default): the device fingerprint is collected (answered as consent when consent_mode is required); consent: only after consent; off: never."
            anonymize_ip:
              type: boolean
              description: Once a session's network is resolved, keep the address's network part only (the last octet, or the last 80 bits of IPv6, zeroed). Default false.
            ignored_ips:
              type: array
              items:
                type: string
              description: "IPv4 or IPv6 addresses or CIDR ranges whose visits are internal (the office, the VPN egress): shown under their own filter, never a fact, never a signal. At most 50."
            live_alerts:
              type: string
              enum:
                - "off"
                - key_pages
                - all_known
              description: "When a known person on the site alerts the team now: off, key_pages (default: a key page reached), all_known (any visit)."
            live_alert_tasks:
              type: boolean
              description: "A live alert also opens a task, due now, on each of the person's open threads. false: only the notice goes. Default true."
            live_alert_task_minutes:
              type: integer
              nullable: true
              description: "How long that task lives: still open after this many minutes, the sweep cancels it and it reads as expired. 5 to 43200 (30 days); null = it never expires. Default 30."
            inbound_playtable_sid:
              type: string
              nullable: true
              description: pt_tb_... the table an identified visitor nobody has would be handed to; stored only today, nothing reads it yet.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the site.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. A deleted site keeps its sessions and visitors.
          required:
            - sid
            - team_sid
            - domain
            - include_subdomains
            - site_key
            - status
            - verified_at
            - last_check_at
            - last_check_result
            - broken_reason
            - last_hit_at
            - hits_count_24h
            - identification
            - identification_confirmation
            - link_codes_enabled
            - carrier_linkedin
            - carrier_email
            - consent_mode
            - fingerprint_mode
            - anonymize_ip
            - ignored_ips
            - live_alerts
            - live_alert_tasks
            - live_alert_task_minutes
            - inbound_playtable_sid
            - created_by
            - created_at
            - updated_at
            - deleted_at
        result:
          type: object
          properties:
            loader:
              type: object
              properties:
                html:
                  type: string
                  description: "The two script tags to paste into every page of the site, before </body>: the inline part with this site's key (it captures the fragment and the query before a router rewrites the address), then the async collector script."
                script_url:
                  type: string
                  description: The collector script's URL, as the second tag loads it.
              required:
                - html
                - script_url
              description: "The loader with the new key: what replaces the one on the site."
          required:
            - loader
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
    SearchProfileViewSightingsRequest:
      type: object
      description: Request body of `search_profile_view_sightings`.
      properties:
        filter:
          type: object
          properties:
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_pv_
                  description: Profile view sighting sid (sg_pv_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_pv_
                    description: Profile view sighting sid (sg_pv_...).
              additionalProperties: false
              description: Sighting sid(s), sg_pv_ prefix.
            sender_profile_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^ub_sp_
                  description: "Sender profile sid (ub_sp_..., external: unibox), the sender profile whose list the viewer was on."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^ub_sp_
                    description: "Sender profile sid (ub_sp_..., external: unibox), the sender profile whose list the viewer was on."
              additionalProperties: false
              description: "One sender profile's list: the sender profile's card (find the sid with search_sender_profiles)."
            person_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_pp_
                  description: "Person sid (cr_pp_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_pp_
                    description: "Person sid (cr_pp_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: One person's sightings; is_null false = the viewers the team holds as people, is_null true = the ones it does not (anonymous rows among them).
            is_anonymous:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: true = a descriptor or no identifier; false = a named viewer, held as a person or not.
            first_seen_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: "ISO 8601 bounds on the first sighting: the viewers new in a window. Combine bounds in one object."
            last_seen_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: "ISO 8601 bounds on the last sighting: the week's window (\"this week\" is gte seven days ago). Combine bounds in one object."
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        include:
          type: array
          items:
            type: string
            enum:
              - person
            description: "person: the person's sid (the card is owed)."
          description: Relations to attach to every item; omit for the bare rows.
        sort:
          type: object
          properties:
            field:
              type: string
              enum:
                - first_seen_at
                - last_seen_at
                - times_seen
              description: The column to order by.
            direction:
              type: string
              enum:
                - asc
                - desc
              description: asc or desc; default desc.
          required:
            - field
          description: One column and its direction; omit for the default order.
        page_size:
          type: integer
          minimum: 0
          maximum: 500
          description: 0..500, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
    SearchProfileViewSightingsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  sid:
                    type: string
                    description: Profile view sighting sid (sg_pv_...).
                  team_sid:
                    type: string
                    description: "Owning team (ts_tm_..., external: gs.service.id)."
                  sender_profile_sid:
                    type: string
                    description: "The sender profile whose \"Who viewed your profile\" list the viewer was on (ub_sp_..., external: unibox). The same person on two sender profiles is two rows: the view is the sender profile's."
                  viewer_key:
                    type: string
                    description: "The one key of the viewer per sender profile: the member id (digits) for a named viewer, nick:<slug> when the list named them by the public slug alone, anon:<hash> for an anonymous row or a named row with no identifier. Never a URL."
                  is_anonymous:
                    type: boolean
                    description: 'LinkedIn printed a descriptor instead of a name ("Someone at Acme"), or no identifier at all: counted, never resolved, never told to the product.'
                  ln_member_id:
                    type: string
                    nullable: true
                    description: The canonical member id (the member URN or the profile URN decoded); null for an anonymous or slug-only viewer.
                  ln_nickname:
                    type: string
                    nullable: true
                    description: The public profile slug the list carried, lowercased; null when none.
                  person_sid:
                    type: string
                    nullable: true
                    description: The team's person the viewer resolved to (cr_pp_..., playtables), by member id then by slug; null while unknown (asked about again at every run for ninety days).
                  display_name:
                    type: string
                    nullable: true
                    description: The list's words at the last sighting (the descriptor for an anonymous row); null when none.
                  headline:
                    type: string
                    nullable: true
                    description: The viewer's headline as the list printed it; null when none.
                  image_url:
                    type: string
                    nullable: true
                    description: The avatar the list carried (not a profile URL); null when none.
                  viewed_at_text:
                    type: string
                    nullable: true
                    description: 'The relative text LinkedIn printed last ("2 days ago"): the list carries no date; null when none.'
                  times_seen:
                    type: integer
                    minimum: 1
                    description: The first sighting and every re-view since (a listing that moved the viewer up).
                  last_position:
                    type: integer
                    minimum: 0
                    description: "The row's absolute rank on the list at the last sighting: the collector's stop rule."
                  first_seen_at:
                    type: string
                    description: 'ISO 8601 UTC, when the collector first saw the viewer on this sender profile: the "since" the product can honestly say.'
                  previous_seen_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, the sighting before the last; null on a viewer seen once.
                  last_seen_at:
                    type: string
                    description: "ISO 8601 UTC, the last sighting: the default sort and the week's window."
                  last_fact_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, the last sighting the ledger and the thread were told about (or that needed no telling); null while the first sighting of a known person is owed, always null for an anonymous or unknown viewer.
                  created_at:
                    type: string
                    description: ISO 8601 UTC.
                  updated_at:
                    type: string
                    description: ISO 8601 UTC.
                required:
                  - sid
                  - team_sid
                  - sender_profile_sid
                  - viewer_key
                  - is_anonymous
                  - ln_member_id
                  - ln_nickname
                  - person_sid
                  - display_name
                  - headline
                  - image_url
                  - viewed_at_text
                  - times_seen
                  - last_position
                  - first_seen_at
                  - previous_seen_at
                  - last_seen_at
                  - last_fact_at
                  - created_at
                  - updated_at
              included:
                type: object
                properties:
                  person:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: "The team's person the viewer resolved to: { sid } today (cr_pp_...), the compact card is owed. Absent for an anonymous viewer or one the team does not hold."
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          properties:
            total_count:
              type: integer
              minimum: 0
              description: Sightings matching the filter (full filter scope, not the page).
            groups:
              type: object
              properties:
                is_anonymous:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: "Sightings per is_anonymous, keyed false and true: the named viewers against the anonymous rows; [] when none."
                sender_profile_sid:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sightings per sender profile (ub_sp_...); [] when none.
              required:
                - is_anonymous
                - sender_profile_sid
          required:
            - total_count
            - groups
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    SearchWebsiteKeyPagesRequest:
      type: object
      description: Request body of `search_website_key_pages`.
      properties:
        filter:
          type: object
          properties:
            q:
              type: string
              maxLength: 128
              description: Free text over key, label and pattern (a LIKE).
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_kp_
                  description: Website key page sid (sg_kp_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_kp_
                    description: Website key page sid (sg_kp_...).
              additionalProperties: false
              description: "Key page sid(s), sg_kp_ prefix: also the point lookup (there is no get tool)."
            site_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...), the page's site.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...), the page's site.
              additionalProperties: false
              description: "The usual scope: one site's pages."
            key:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: "The slug(s): key.eq pricing finds the page a session's key_pages name."
            is_conversion:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: The conversion pages only.
            created_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: ISO 8601 range; combine bounds in one object.
            deleted_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "Default scope is { is_null: true } (live rows); stating it at all lifts the soft-delete scope."
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        sort:
          type: object
          properties:
            field:
              type: string
              enum:
                - created_at
                - key
              description: The column to order by.
            direction:
              type: string
              enum:
                - asc
                - desc
              description: asc or desc; default desc.
          required:
            - field
          description: One column and its direction; omit for the default order.
        page_size:
          type: integer
          minimum: 0
          maximum: 500
          description: 0..500, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
    SearchWebsiteKeyPagesResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  sid:
                    type: string
                    description: Website key page sid (sg_kp_...).
                  team_sid:
                    type: string
                    description: "Owning team (ts_tm_..., external: gs.service.id)."
                  site_sid:
                    type: string
                    description: The site the page belongs to (sg_si_...).
                  key:
                    type: string
                    description: The stable lowercase slug (pricing) facts and signals carry; immutable.
                  label:
                    type: string
                    description: What the page is called in the feed.
                  pattern:
                    type: string
                    description: "The path glob as stored: a leading slash, lowercased, no query or fragment, * for any run of characters (/pricing*)."
                  is_conversion:
                    type: boolean
                    description: Counted as a conversion in the feed and the Overview card.
                  created_by:
                    type: object
                    properties:
                      actor_type:
                        type: string
                        enum:
                          - user
                          - support
                          - api_key
                          - system
                          - agent
                      actor_sid:
                        type: string
                        nullable: true
                      team_sid:
                        type: string
                      actor_name:
                        type: string
                        nullable: true
                        description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                      oauth_client_sid:
                        type: string
                        nullable: true
                        description: The acting OAuth client (id_oc_*); null off the OAuth path.
                      reason:
                        type: string
                        nullable: true
                        description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                      permissions:
                        type: object
                        additionalProperties: {}
                        description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                      cluster_id:
                        type: integer
                        nullable: true
                        description: "Internal audit context: the cluster that served the write."
                      trace_id:
                        type: string
                        nullable: true
                        description: "Internal audit context: the trace id of the request that wrote the row."
                    required:
                      - actor_type
                      - actor_sid
                      - team_sid
                      - permissions
                    description: Actor that named the page (the site create, or this entity's create).
                  created_at:
                    type: string
                    description: ISO 8601 UTC.
                  updated_at:
                    type: string
                    description: ISO 8601 UTC.
                  deleted_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
                required:
                  - sid
                  - team_sid
                  - site_sid
                  - key
                  - label
                  - pattern
                  - is_conversion
                  - created_by
                  - created_at
                  - updated_at
                  - deleted_at
              included:
                type: object
                additionalProperties: {}
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          additionalProperties: {}
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    SearchWebsiteSessionOwnersRequest:
      type: object
      description: Request body of `search_website_session_owners`.
      properties:
        filter:
          type: object
          properties:
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_ws_
                  description: Website session sid (sg_ws_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_ws_
                    description: Website session sid (sg_ws_...).
              additionalProperties: false
              description: Session sid(s), sg_ws_ prefix.
            site_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...).
              additionalProperties: false
              description: One site's visits (find the sid with search_website_sites).
            visitor_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_wv_
                  description: Website visitor sid (sg_wv_...), the browser behind the visit.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_wv_
                    description: Website visitor sid (sg_wv_...), the browser behind the visit.
              additionalProperties: false
              description: One browser's visits.
            person_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_pp_
                  description: "Person sid (cr_pp_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_pp_
                    description: "Person sid (cr_pp_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: One person's visits; is_null false = known people, is_null true = nobody named.
            company_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_co_
                  description: "Company sid (cr_co_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_co_
                    description: "Company sid (cr_co_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: The visits a company code or a network gave to one company; is_null false = known companies (a person's session carries no company_sid).
            fingerprint_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_fp_
                  description: Website fingerprint sid (sg_fp_...), a device of the fingerprint base.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_fp_
                    description: Website fingerprint sid (sg_fp_...), a device of the fingerprint base.
                is_null:
                  type: boolean
              additionalProperties: false
              description: The sessions of one device of the fingerprint base; is_null true = no device known.
            attribution:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - code
                    - identified
                    - fingerprint
                    - manual
                    - company_code
                    - company_network
                    - none
                ne:
                  type: string
                  enum:
                    - code
                    - identified
                    - fingerprint
                    - manual
                    - company_code
                    - company_network
                    - none
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
              additionalProperties: false
              description: Which rung named the owner; ne none = every attributed visit.
            network_type:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: business | isp | mobile | hosting | education | government | unknown; eq business over company_sid is_null true = companies we do not hold.
            referrer_type:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - direct
                    - internal
                    - search
                    - social
                    - email
                    - ads
                    - referral
                    - ai_assistant
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
              additionalProperties: false
              description: Where the visit came from.
            key_page:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A key page slug (pricing): the sessions that reached it; is_null false = reached any key page, is_null true = none. The slugs are search_website_key_pages' keys."
            form:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A form name: the sessions with a form of that name in events[]; is_null false = submitted any form (anonymous and company-only sessions included), is_null true = none."
            event:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A custom event name: the sessions with an event of that name in events[] (registered or not), letter case ignored as the tracked-event registry matches it; is_null false = sent any custom event, is_null true = none."
            geo_country:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: ISO 3166-1 alpha-2.
            device:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - desktop
                    - mobile
                    - tablet
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - desktop
                      - mobile
                      - tablet
                      - unknown
              additionalProperties: false
              description: desktop | mobile | tablet | unknown.
            browser:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: As the parser names it (Chrome, Safari...).
            os:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: As the parser names it (Windows, macOS, iOS...).
            is_internal:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: "The team's own traffic (the site's ignored_ips, an email of its own domains). No default scope: internal visits are shown unless this says otherwise."
            started_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: 'ISO 8601 bounds: the period ("this week" is gte seven days ago). Combine bounds in one object.'
            closed_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: is_null true = the sessions open now (someone may still be on the site).
            created_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: "ISO 8601 bounds on when the session was opened here: \"new since I looked\" is created_at gt the member's seen_at (get_signal_preferences). \"When\" stays started_at."
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        include:
          type: array
          items:
            type: string
            enum:
              - visitor
              - person
              - company
            description: "visitor: the browser's row; person and company: the owner's sid (the cards are owed)."
          description: Relations to attach to every item; omit for the bare rows.
        page_size:
          type: integer
          minimum: 0
          maximum: 200
          description: 0..200, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
        fresh:
          type: object
          properties:
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_ws_
                  description: Website session sid (sg_ws_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_ws_
                    description: Website session sid (sg_ws_...).
              additionalProperties: false
              description: Session sid(s), sg_ws_ prefix.
            site_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...).
              additionalProperties: false
              description: One site's visits (find the sid with search_website_sites).
            visitor_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_wv_
                  description: Website visitor sid (sg_wv_...), the browser behind the visit.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_wv_
                    description: Website visitor sid (sg_wv_...), the browser behind the visit.
              additionalProperties: false
              description: One browser's visits.
            person_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_pp_
                  description: "Person sid (cr_pp_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_pp_
                    description: "Person sid (cr_pp_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: One person's visits; is_null false = known people, is_null true = nobody named.
            company_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_co_
                  description: "Company sid (cr_co_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_co_
                    description: "Company sid (cr_co_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: The visits a company code or a network gave to one company; is_null false = known companies (a person's session carries no company_sid).
            fingerprint_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_fp_
                  description: Website fingerprint sid (sg_fp_...), a device of the fingerprint base.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_fp_
                    description: Website fingerprint sid (sg_fp_...), a device of the fingerprint base.
                is_null:
                  type: boolean
              additionalProperties: false
              description: The sessions of one device of the fingerprint base; is_null true = no device known.
            attribution:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - code
                    - identified
                    - fingerprint
                    - manual
                    - company_code
                    - company_network
                    - none
                ne:
                  type: string
                  enum:
                    - code
                    - identified
                    - fingerprint
                    - manual
                    - company_code
                    - company_network
                    - none
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
              additionalProperties: false
              description: Which rung named the owner; ne none = every attributed visit.
            network_type:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: business | isp | mobile | hosting | education | government | unknown; eq business over company_sid is_null true = companies we do not hold.
            referrer_type:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - direct
                    - internal
                    - search
                    - social
                    - email
                    - ads
                    - referral
                    - ai_assistant
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
              additionalProperties: false
              description: Where the visit came from.
            key_page:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A key page slug (pricing): the sessions that reached it; is_null false = reached any key page, is_null true = none. The slugs are search_website_key_pages' keys."
            form:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A form name: the sessions with a form of that name in events[]; is_null false = submitted any form (anonymous and company-only sessions included), is_null true = none."
            event:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A custom event name: the sessions with an event of that name in events[] (registered or not), letter case ignored as the tracked-event registry matches it; is_null false = sent any custom event, is_null true = none."
            geo_country:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: ISO 3166-1 alpha-2.
            device:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - desktop
                    - mobile
                    - tablet
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - desktop
                      - mobile
                      - tablet
                      - unknown
              additionalProperties: false
              description: desktop | mobile | tablet | unknown.
            browser:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: As the parser names it (Chrome, Safari...).
            os:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: As the parser names it (Windows, macOS, iOS...).
            is_internal:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: "The team's own traffic (the site's ignored_ips, an email of its own domains). No default scope: internal visits are shown unless this says otherwise."
            started_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: 'ISO 8601 bounds: the period ("this week" is gte seven days ago). Combine bounds in one object.'
            closed_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: is_null true = the sessions open now (someone may still be on the site).
            created_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: "ISO 8601 bounds on when the session was opened here: \"new since I looked\" is created_at gt the member's seen_at (get_signal_preferences). \"When\" stays started_at."
          description: 'A second filter with the same leaves that marks visits inside `filter` (a visit is fresh when both keep it): "new since I looked" is created_at {gt: seen_at}. No leaf marks nothing.'
        fresh_owners:
          type: string
          enum:
            - only
            - without
          description: only = list the owners holding a fresh visit; without = list the owners holding none. Absent lists every owner. With no `fresh`, only lists nothing.
    SearchWebsiteSessionOwnersResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  owner_type:
                    type: string
                    enum:
                      - person
                      - company
                      - visitor
                    description: "person: a rung of the ladder named someone; company: only a company code in our link or the visitor's network named one; visitor: nobody is named for the browser yet."
                  owner_sid:
                    type: string
                    description: "cr_pp_... (person, playtables), cr_co_... (company, playtables) or sg_wv_... (visitor): the row's key."
                  latest:
                    type: object
                    properties:
                      sid:
                        type: string
                        description: Website session sid (sg_ws_...).
                      team_sid:
                        type: string
                        description: "Owning team (ts_tm_..., external: gs.service.id)."
                      site_sid:
                        type: string
                        description: The registered site (sg_si_...).
                      visitor_sid:
                        type: string
                        description: The browser behind the visit (sg_wv_...); a person may own several.
                      person_sid:
                        type: string
                        nullable: true
                        description: The person a rung named (cr_pp_..., playtables); null while nobody did. A person always takes a session over from a company.
                      company_sid:
                        type: string
                        nullable: true
                        description: The company a company code in our link or the network named when no person did (cr_co_..., playtables); cleared when a person takes the session over.
                      attribution:
                        type: string
                        enum:
                          - code
                          - identified
                          - fingerprint
                          - manual
                          - company_code
                          - company_network
                          - none
                        description: "Which rung named the owner: code (the person code in our link), identified (an identify or a form), fingerprint (the device), manual (a bind by hand), company_code (the company code in our link: the company, never a person; every code on a site set to companies), company_network (the network, a company); none while nothing did."
                      fingerprint_sid:
                        type: string
                        nullable: true
                        description: The device the fingerprint base saw the session from (sg_fp_...); null when none was stored.
                      started_at:
                        type: string
                        description: ISO 8601 UTC, the receipt time of the first hit. The feed's order, newest first.
                      last_seen_at:
                        type: string
                        description: ISO 8601 UTC, the receipt time of the newest hit; the row grows until the close.
                      closed_at:
                        type: string
                        nullable: true
                        description: ISO 8601 UTC, set by the sweep 30 minutes after last_seen_at; null = the visitor may still be on the site.
                      pageviews_count:
                        type: integer
                        minimum: 0
                        description: Every page view, beyond the cap of pages too.
                      engaged_seconds:
                        type: integer
                        minimum: 0
                        description: The sum over page views of the largest engaged time each reported.
                      entry_path:
                        type: string
                        description: The path of the first page view, with its query.
                      exit_path:
                        type: string
                        description: The path of the last page view.
                      pages:
                        type: array
                        items:
                          type: object
                          properties:
                            page_id:
                              type: string
                              description: The page view's id from the wire (12 characters).
                            path:
                              type: string
                              description: The page's path with its query, the code in our link removed by the script.
                            title:
                              type: string
                              nullable: true
                              description: The document title; null when none.
                            engaged_seconds:
                              type: integer
                              minimum: 0
                              description: The largest engaged time a ping of this page view reported, in whole seconds.
                            first_seen_at:
                              type: string
                              description: ISO 8601 UTC, the receipt time of the pageview hit.
                            scroll_pct:
                              type: integer
                              nullable: true
                              minimum: 0
                              maximum: 100
                              description: The deepest scroll a ping of this page view reported, 0 to 100; null until one did (and on visits folded before 2026-10-07).
                          required:
                            - page_id
                            - path
                            - title
                            - engaged_seconds
                            - first_seen_at
                            - scroll_pct
                        description: The first 50 page views, in order, each with its engaged time.
                      events:
                        type: array
                        items:
                          type: object
                          properties:
                            kind:
                              type: string
                              enum:
                                - event
                                - form
                              description: "event: a custom event the site sent; form: a form it reported (a marked form's submit, or a form a server-side identify named)."
                            name:
                              type: string
                              description: The event's name or the form's name as the site sent it. A form's email never rides here.
                            at:
                              type: string
                              description: ISO 8601 UTC, the receipt time of the hit.
                            page_id:
                              type: string
                              description: The page view the hit belonged to.
                          required:
                            - kind
                            - name
                            - at
                            - page_id
                        description: The first 50 custom events and forms, in order; every event the site sent, registered or not.
                      key_pages:
                        type: array
                        items:
                          type: string
                        description: "The keys (slugs) of the site's key pages reached, in the order first reached: what the key_page filter matches and the signal visited_key_page reads."
                      referrer_type:
                        type: string
                        enum:
                          - direct
                          - internal
                          - search
                          - social
                          - email
                          - ads
                          - referral
                          - ai_assistant
                          - unknown
                        description: "Where the visit came from, decided on the first page view: direct, internal (another page of the site), search, social, email, ads (a click id or a paid utm_medium), referral, ai_assistant (ChatGPT, Perplexity, Claude and the like), unknown."
                      referrer_host:
                        type: string
                        nullable: true
                        description: The referrer's host, lowercased, no www.; null when absent or unreadable.
                      utm_source:
                        type: string
                        nullable: true
                      utm_medium:
                        type: string
                        nullable: true
                      utm_campaign:
                        type: string
                        nullable: true
                      utm_content:
                        type: string
                        nullable: true
                      utm_term:
                        type: string
                        nullable: true
                      landing_code:
                        type: string
                        nullable: true
                        description: The first code a hit of the session carried (the person code or the company code in the link we sent); null when none.
                      browser:
                        type: string
                        nullable: true
                        description: The parser's name (Chrome, Safari, Firefox...); null when unknown.
                      browser_version:
                        type: string
                        nullable: true
                      os:
                        type: string
                        nullable: true
                        description: Windows, macOS, iOS, Android, Linux...; null when unknown.
                      os_version:
                        type: string
                        nullable: true
                      device:
                        type: string
                        enum:
                          - desktop
                          - mobile
                          - tablet
                          - unknown
                        description: desktop | mobile | tablet | unknown.
                      screen:
                        type: string
                        nullable: true
                        description: "{width}x{height} of the screen; null when the first page view did not report it."
                      language:
                        type: string
                        nullable: true
                        description: The browser's first language; null when not reported.
                      timezone:
                        type: string
                        nullable: true
                        description: The browser's IANA zone; null when not reported.
                      geo_country:
                        type: string
                        nullable: true
                        description: ISO 3166-1 alpha-2 from the edge's location header; null when the edge gave none.
                      geo_region:
                        type: string
                        nullable: true
                      geo_city:
                        type: string
                        nullable: true
                      ip:
                        type: string
                        description: The client address of the first hit (IPv4 or IPv6); its network part only once the network answer is stored on a site with anonymize_ip.
                      network_status:
                        type: string
                        enum:
                          - pending
                          - resolved
                          - failed
                          - private
                        description: pending until the data service answered for the address; resolved with the network columns filled; failed (no answer after the asks); private (an address nobody is asked about).
                      network_type:
                        type: string
                        nullable: true
                        description: "The data service's classification of the block: business, isp, mobile, hosting, education, government or unknown; null until resolved."
                      network_name:
                        type: string
                        nullable: true
                        description: The organization the block is registered to, else the registry's name of the block ("Deutsche Telekom", "Hetzner"); null until resolved.
                      network_domain:
                        type: string
                        nullable: true
                        description: The company domain the data service derived for a business network; null when none.
                      asn:
                        type: integer
                        nullable: true
                        description: The origin AS; null until resolved.
                      as_name:
                        type: string
                        nullable: true
                        description: The AS holder; null until resolved.
                      is_internal:
                        type: boolean
                        description: "A hit came from one of the site's ignored_ips, or an identified email of the team's own domains: the team's own traffic, never a fact, never a signal."
                      created_at:
                        type: string
                        description: ISO 8601 UTC.
                      updated_at:
                        type: string
                        description: ISO 8601 UTC.
                    required:
                      - sid
                      - team_sid
                      - site_sid
                      - visitor_sid
                      - person_sid
                      - company_sid
                      - attribution
                      - fingerprint_sid
                      - started_at
                      - last_seen_at
                      - closed_at
                      - pageviews_count
                      - engaged_seconds
                      - entry_path
                      - exit_path
                      - pages
                      - events
                      - key_pages
                      - referrer_type
                      - referrer_host
                      - utm_source
                      - utm_medium
                      - utm_campaign
                      - utm_content
                      - utm_term
                      - landing_code
                      - browser
                      - browser_version
                      - os
                      - os_version
                      - device
                      - screen
                      - language
                      - timezone
                      - geo_country
                      - geo_region
                      - geo_city
                      - ip
                      - network_status
                      - network_type
                      - network_name
                      - network_domain
                      - asn
                      - as_name
                      - is_internal
                      - created_at
                      - updated_at
                    description: The owner's newest visit under the filter, the session's own row, verbatim.
                  sessions_count:
                    type: integer
                    minimum: 0
                    exclusiveMinimum: true
                    description: How many visits the filter keeps of the owner.
                  fresh_count:
                    type: integer
                    minimum: 0
                    description: Of them, the visits the `fresh` filter keeps too; 0 when the request marked nothing.
                  recent_types:
                    type: array
                    items:
                      type: string
                      enum:
                        - website_form_submitted
                        - website_key_page_visited
                        - website_event
                        - website_visited
                    maxItems: 3
                    description: "The strongest moment of each of the owner's newest visits, newest first, at most 3: a form submitted, else a key page reached, else a custom event the site registered, else the visit itself. The first is latest's."
                required:
                  - owner_type
                  - owner_sid
                  - latest
                  - sessions_count
                  - fresh_count
                  - recent_types
              included:
                type: object
                properties:
                  visitor:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: The browser behind the visit, the WebsiteVisitorDomain verbatim (bound person, identified email, sessions_count, the latest attributes; // see ./website_visitors.md).
                  person:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: "The person a rung named: { sid } today (cr_pp_...), the compact card is owed. Absent while person_sid is null."
                  company:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: "The company a company code or the network named when nobody else did: { sid } today (cr_co_...). Absent while company_sid is null."
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          properties:
            total_count:
              type: integer
              minimum: 0
              description: The owners the request lists.
            sessions_count:
              type: integer
              minimum: 0
              description: The visits the filter keeps of them.
            groups:
              type: object
              properties:
                owner_type:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: The listed owners of each kind (person, company, visitor); the kinds that occur only, [] when none.
                fresh:
                  type: object
                  properties:
                    "true":
                      type: integer
                      minimum: 0
                    "false":
                      type: integer
                      minimum: 0
                  required:
                    - "true"
                    - "false"
                  description: The listed owners split by whether they hold a fresh visit.
              required:
                - owner_type
                - fresh
          required:
            - total_count
            - sessions_count
            - groups
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    SearchWebsiteSessionsRequest:
      type: object
      description: Request body of `search_website_sessions`.
      properties:
        filter:
          type: object
          properties:
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_ws_
                  description: Website session sid (sg_ws_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_ws_
                    description: Website session sid (sg_ws_...).
              additionalProperties: false
              description: Session sid(s), sg_ws_ prefix.
            site_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...).
              additionalProperties: false
              description: One site's visits (find the sid with search_website_sites).
            visitor_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_wv_
                  description: Website visitor sid (sg_wv_...), the browser behind the visit.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_wv_
                    description: Website visitor sid (sg_wv_...), the browser behind the visit.
              additionalProperties: false
              description: One browser's visits.
            person_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_pp_
                  description: "Person sid (cr_pp_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_pp_
                    description: "Person sid (cr_pp_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: One person's visits; is_null false = known people, is_null true = nobody named.
            company_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_co_
                  description: "Company sid (cr_co_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_co_
                    description: "Company sid (cr_co_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: The visits a company code or a network gave to one company; is_null false = known companies (a person's session carries no company_sid).
            fingerprint_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_fp_
                  description: Website fingerprint sid (sg_fp_...), a device of the fingerprint base.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_fp_
                    description: Website fingerprint sid (sg_fp_...), a device of the fingerprint base.
                is_null:
                  type: boolean
              additionalProperties: false
              description: The sessions of one device of the fingerprint base; is_null true = no device known.
            attribution:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - code
                    - identified
                    - fingerprint
                    - manual
                    - company_code
                    - company_network
                    - none
                ne:
                  type: string
                  enum:
                    - code
                    - identified
                    - fingerprint
                    - manual
                    - company_code
                    - company_network
                    - none
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
              additionalProperties: false
              description: Which rung named the owner; ne none = every attributed visit.
            network_type:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: business | isp | mobile | hosting | education | government | unknown; eq business over company_sid is_null true = companies we do not hold.
            referrer_type:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - direct
                    - internal
                    - search
                    - social
                    - email
                    - ads
                    - referral
                    - ai_assistant
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
              additionalProperties: false
              description: Where the visit came from.
            key_page:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A key page slug (pricing): the sessions that reached it; is_null false = reached any key page, is_null true = none. The slugs are search_website_key_pages' keys."
            form:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A form name: the sessions with a form of that name in events[]; is_null false = submitted any form (anonymous and company-only sessions included), is_null true = none."
            event:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "A custom event name: the sessions with an event of that name in events[] (registered or not), letter case ignored as the tracked-event registry matches it; is_null false = sent any custom event, is_null true = none."
            geo_country:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: ISO 3166-1 alpha-2.
            device:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - desktop
                    - mobile
                    - tablet
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - desktop
                      - mobile
                      - tablet
                      - unknown
              additionalProperties: false
              description: desktop | mobile | tablet | unknown.
            browser:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: As the parser names it (Chrome, Safari...).
            os:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: As the parser names it (Windows, macOS, iOS...).
            is_internal:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: "The team's own traffic (the site's ignored_ips, an email of its own domains). No default scope: internal visits are shown unless this says otherwise."
            started_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: 'ISO 8601 bounds: the period ("this week" is gte seven days ago). Combine bounds in one object.'
            closed_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: is_null true = the sessions open now (someone may still be on the site).
            created_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: "ISO 8601 bounds on when the session was opened here: \"new since I looked\" is created_at gt the member's seen_at (get_signal_preferences). \"When\" stays started_at."
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        include:
          type: array
          items:
            type: string
            enum:
              - visitor
              - person
              - company
            description: "visitor: the browser's row; person and company: the owner's sid (the cards are owed)."
          description: Relations to attach to every item; omit for the bare rows.
        sort:
          type: object
          properties:
            field:
              type: string
              enum:
                - started_at
                - last_seen_at
                - engaged_seconds
                - pageviews_count
              description: The column to order by.
            direction:
              type: string
              enum:
                - asc
                - desc
              description: asc or desc; default desc.
          required:
            - field
          description: One column and its direction; omit for the default order.
        page_size:
          type: integer
          minimum: 0
          maximum: 500
          description: 0..500, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
    SearchWebsiteSessionsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  sid:
                    type: string
                    description: Website session sid (sg_ws_...).
                  team_sid:
                    type: string
                    description: "Owning team (ts_tm_..., external: gs.service.id)."
                  site_sid:
                    type: string
                    description: The registered site (sg_si_...).
                  visitor_sid:
                    type: string
                    description: The browser behind the visit (sg_wv_...); a person may own several.
                  person_sid:
                    type: string
                    nullable: true
                    description: The person a rung named (cr_pp_..., playtables); null while nobody did. A person always takes a session over from a company.
                  company_sid:
                    type: string
                    nullable: true
                    description: The company a company code in our link or the network named when no person did (cr_co_..., playtables); cleared when a person takes the session over.
                  attribution:
                    type: string
                    enum:
                      - code
                      - identified
                      - fingerprint
                      - manual
                      - company_code
                      - company_network
                      - none
                    description: "Which rung named the owner: code (the person code in our link), identified (an identify or a form), fingerprint (the device), manual (a bind by hand), company_code (the company code in our link: the company, never a person; every code on a site set to companies), company_network (the network, a company); none while nothing did."
                  fingerprint_sid:
                    type: string
                    nullable: true
                    description: The device the fingerprint base saw the session from (sg_fp_...); null when none was stored.
                  started_at:
                    type: string
                    description: ISO 8601 UTC, the receipt time of the first hit. The feed's order, newest first.
                  last_seen_at:
                    type: string
                    description: ISO 8601 UTC, the receipt time of the newest hit; the row grows until the close.
                  closed_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, set by the sweep 30 minutes after last_seen_at; null = the visitor may still be on the site.
                  pageviews_count:
                    type: integer
                    minimum: 0
                    description: Every page view, beyond the cap of pages too.
                  engaged_seconds:
                    type: integer
                    minimum: 0
                    description: The sum over page views of the largest engaged time each reported.
                  entry_path:
                    type: string
                    description: The path of the first page view, with its query.
                  exit_path:
                    type: string
                    description: The path of the last page view.
                  pages:
                    type: array
                    items:
                      type: object
                      properties:
                        page_id:
                          type: string
                          description: The page view's id from the wire (12 characters).
                        path:
                          type: string
                          description: The page's path with its query, the code in our link removed by the script.
                        title:
                          type: string
                          nullable: true
                          description: The document title; null when none.
                        engaged_seconds:
                          type: integer
                          minimum: 0
                          description: The largest engaged time a ping of this page view reported, in whole seconds.
                        first_seen_at:
                          type: string
                          description: ISO 8601 UTC, the receipt time of the pageview hit.
                        scroll_pct:
                          type: integer
                          nullable: true
                          minimum: 0
                          maximum: 100
                          description: The deepest scroll a ping of this page view reported, 0 to 100; null until one did (and on visits folded before 2026-10-07).
                      required:
                        - page_id
                        - path
                        - title
                        - engaged_seconds
                        - first_seen_at
                        - scroll_pct
                    description: The first 50 page views, in order, each with its engaged time.
                  events:
                    type: array
                    items:
                      type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - event
                            - form
                          description: "event: a custom event the site sent; form: a form it reported (a marked form's submit, or a form a server-side identify named)."
                        name:
                          type: string
                          description: The event's name or the form's name as the site sent it. A form's email never rides here.
                        at:
                          type: string
                          description: ISO 8601 UTC, the receipt time of the hit.
                        page_id:
                          type: string
                          description: The page view the hit belonged to.
                      required:
                        - kind
                        - name
                        - at
                        - page_id
                    description: The first 50 custom events and forms, in order; every event the site sent, registered or not.
                  key_pages:
                    type: array
                    items:
                      type: string
                    description: "The keys (slugs) of the site's key pages reached, in the order first reached: what the key_page filter matches and the signal visited_key_page reads."
                  referrer_type:
                    type: string
                    enum:
                      - direct
                      - internal
                      - search
                      - social
                      - email
                      - ads
                      - referral
                      - ai_assistant
                      - unknown
                    description: "Where the visit came from, decided on the first page view: direct, internal (another page of the site), search, social, email, ads (a click id or a paid utm_medium), referral, ai_assistant (ChatGPT, Perplexity, Claude and the like), unknown."
                  referrer_host:
                    type: string
                    nullable: true
                    description: The referrer's host, lowercased, no www.; null when absent or unreadable.
                  utm_source:
                    type: string
                    nullable: true
                  utm_medium:
                    type: string
                    nullable: true
                  utm_campaign:
                    type: string
                    nullable: true
                  utm_content:
                    type: string
                    nullable: true
                  utm_term:
                    type: string
                    nullable: true
                  landing_code:
                    type: string
                    nullable: true
                    description: The first code a hit of the session carried (the person code or the company code in the link we sent); null when none.
                  browser:
                    type: string
                    nullable: true
                    description: The parser's name (Chrome, Safari, Firefox...); null when unknown.
                  browser_version:
                    type: string
                    nullable: true
                  os:
                    type: string
                    nullable: true
                    description: Windows, macOS, iOS, Android, Linux...; null when unknown.
                  os_version:
                    type: string
                    nullable: true
                  device:
                    type: string
                    enum:
                      - desktop
                      - mobile
                      - tablet
                      - unknown
                    description: desktop | mobile | tablet | unknown.
                  screen:
                    type: string
                    nullable: true
                    description: "{width}x{height} of the screen; null when the first page view did not report it."
                  language:
                    type: string
                    nullable: true
                    description: The browser's first language; null when not reported.
                  timezone:
                    type: string
                    nullable: true
                    description: The browser's IANA zone; null when not reported.
                  geo_country:
                    type: string
                    nullable: true
                    description: ISO 3166-1 alpha-2 from the edge's location header; null when the edge gave none.
                  geo_region:
                    type: string
                    nullable: true
                  geo_city:
                    type: string
                    nullable: true
                  ip:
                    type: string
                    description: The client address of the first hit (IPv4 or IPv6); its network part only once the network answer is stored on a site with anonymize_ip.
                  network_status:
                    type: string
                    enum:
                      - pending
                      - resolved
                      - failed
                      - private
                    description: pending until the data service answered for the address; resolved with the network columns filled; failed (no answer after the asks); private (an address nobody is asked about).
                  network_type:
                    type: string
                    nullable: true
                    description: "The data service's classification of the block: business, isp, mobile, hosting, education, government or unknown; null until resolved."
                  network_name:
                    type: string
                    nullable: true
                    description: The organization the block is registered to, else the registry's name of the block ("Deutsche Telekom", "Hetzner"); null until resolved.
                  network_domain:
                    type: string
                    nullable: true
                    description: The company domain the data service derived for a business network; null when none.
                  asn:
                    type: integer
                    nullable: true
                    description: The origin AS; null until resolved.
                  as_name:
                    type: string
                    nullable: true
                    description: The AS holder; null until resolved.
                  is_internal:
                    type: boolean
                    description: "A hit came from one of the site's ignored_ips, or an identified email of the team's own domains: the team's own traffic, never a fact, never a signal."
                  created_at:
                    type: string
                    description: ISO 8601 UTC.
                  updated_at:
                    type: string
                    description: ISO 8601 UTC.
                required:
                  - sid
                  - team_sid
                  - site_sid
                  - visitor_sid
                  - person_sid
                  - company_sid
                  - attribution
                  - fingerprint_sid
                  - started_at
                  - last_seen_at
                  - closed_at
                  - pageviews_count
                  - engaged_seconds
                  - entry_path
                  - exit_path
                  - pages
                  - events
                  - key_pages
                  - referrer_type
                  - referrer_host
                  - utm_source
                  - utm_medium
                  - utm_campaign
                  - utm_content
                  - utm_term
                  - landing_code
                  - browser
                  - browser_version
                  - os
                  - os_version
                  - device
                  - screen
                  - language
                  - timezone
                  - geo_country
                  - geo_region
                  - geo_city
                  - ip
                  - network_status
                  - network_type
                  - network_name
                  - network_domain
                  - asn
                  - as_name
                  - is_internal
                  - created_at
                  - updated_at
              included:
                type: object
                properties:
                  visitor:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: The browser behind the visit, the WebsiteVisitorDomain verbatim (bound person, identified email, sessions_count, the latest attributes; // see ./website_visitors.md).
                  person:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: "The person a rung named: { sid } today (cr_pp_...), the compact card is owed. Absent while person_sid is null."
                  company:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: "The company a company code or the network named when nobody else did: { sid } today (cr_co_...). Absent while company_sid is null."
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          properties:
            total_count:
              type: integer
              minimum: 0
              description: Sessions matching the filter (full filter scope, not the page).
            groups:
              type: object
              properties:
                attribution:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sessions per attribution (code, identified, fingerprint, manual, company_code, company_network, none); the values that occur only, [] when none.
                network_type:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sessions per network classification (business, isp, mobile, hosting, education, government, unknown); unresolved sessions are not a group.
                referrer_type:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sessions per referrer type.
                device:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sessions per device class.
                key_page:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sessions per key page slug reached; a session that reached two pages counts in both.
              required:
                - attribution
                - network_type
                - referrer_type
                - device
                - key_page
          required:
            - total_count
            - groups
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    SearchWebsiteSitesRequest:
      type: object
      description: Request body of `search_website_sites`.
      properties:
        filter:
          type: object
          properties:
            q:
              type: string
              maxLength: 128
              description: 'Free text over the host (a LIKE): "acme" finds acme.com and app.acme.com.'
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...).
              additionalProperties: false
              description: Site sid(s), sg_si_ prefix.
            domain:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: "The host as stored: bare, lowercased, no www."
            status:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - pending
                    - verified
                    - broken
                    - disabled
                ne:
                  type: string
                  enum:
                    - pending
                    - verified
                    - broken
                    - disabled
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - pending
                      - verified
                      - broken
                      - disabled
                nin:
                  type: array
                  items:
                    type: string
                    enum:
                      - pending
                      - verified
                      - broken
                      - disabled
              additionalProperties: false
              description: pending | verified | broken | disabled.
            identification:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - companies
                    - people
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - companies
                      - people
              additionalProperties: false
              description: "companies | people: what a visit to the site may name."
            link_codes_enabled:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: The per-site switch for codes in links.
            last_hit_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: ISO 8601 bounds on the newest hit; is_null true = never received anything.
            created_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: ISO 8601 range; combine bounds in one object.
            deleted_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "Default scope is { is_null: true } (live rows); stating it at all lifts the soft-delete scope."
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        sort:
          type: object
          properties:
            field:
              type: string
              enum:
                - created_at
                - updated_at
                - domain
                - last_hit_at
              description: The column to order by.
            direction:
              type: string
              enum:
                - asc
                - desc
              description: asc or desc; default desc.
          required:
            - field
          description: One column and its direction; omit for the default order.
        page_size:
          type: integer
          minimum: 0
          maximum: 500
          description: 0..500, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
    SearchWebsiteSitesResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  sid:
                    type: string
                    description: Website site sid (sg_si_...).
                  team_sid:
                    type: string
                    description: "Owning team (ts_tm_..., external: gs.service.id)."
                  domain:
                    type: string
                    description: "The host as the team typed it, reduced to a bare hostname: lowercased, no scheme, port or path, a leading www. dropped. Immutable: a different host is a different site."
                  include_subdomains:
                    type: boolean
                    description: Hosts under domain belong to the site (default true).
                  site_key:
                    type: string
                    description: The public 20-character key the loader carries (gs.k). It names the site to the collector; not a secret. Changes only through rotate_website_site_key.
                  status:
                    type: string
                    enum:
                      - pending
                      - verified
                      - broken
                      - disabled
                    description: pending = waiting for the script (links to it are not coded yet); verified = receiving; broken = the health rule flagged it (see broken_reason); disabled = switched off by update enabled false.
                  verified_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, the last transition into verified; null never.
                  last_check_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, the last active check (verify_website_site or the daily job); null never.
                  last_check_result:
                    type: object
                    nullable: true
                    properties:
                      outcome:
                        type: string
                        enum:
                          - found
                          - site_key_mismatch
                          - loader_missing
                          - fetch_failed
                        description: "The best outcome over pages: found wins over site_key_mismatch, over loader_missing, over fetch_failed."
                      pages:
                        type: array
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              description: The URL requested last for this page.
                            key_page_sid:
                              type: string
                              nullable: true
                              description: sg_kp_... the key page this row checked; null for the home page.
                            outcome:
                              type: string
                              enum:
                                - found
                                - site_key_mismatch
                                - loader_missing
                                - fetch_failed
                              description: "found: the page carries this site's key. site_key_mismatch: a loader with another key. loader_missing: no loader in the page source (a tag manager installs it outside the source, so such a site is verified by its first hit instead). fetch_failed: no page to read, see failure."
                            http_status:
                              type: integer
                              nullable: true
                              description: The final HTTP status; null when no answer arrived.
                            failure:
                              type: string
                              nullable: true
                              enum:
                                - invalid_url
                                - scheme_not_allowed
                                - credentials_in_url
                                - port_not_allowed
                                - ip_literal
                                - host_unresolvable
                                - private_address
                                - redirect_without_location
                                - too_many_redirects
                                - redirected_off_site
                                - connection_failed
                                - http_status
                              description: "Why the fetch failed, when outcome is fetch_failed: the guard refused the URL (scheme, port, credentials, an IP literal, a private address), the host did not resolve, the redirects ran out or left the site, the connection failed, or the status was outside 2xx. Null otherwise."
                          required:
                            - url
                            - key_page_sid
                            - outcome
                            - http_status
                            - failure
                        description: The home page first, then the checkable key pages (a pattern that names one URL).
                    required:
                      - outcome
                      - pages
                    description: What the last active check found, page by page; null while no check ran, and cleared by a key rotation.
                  broken_reason:
                    type: string
                    nullable: true
                    enum:
                      - loader_missing
                      - fetch_failed
                      - site_key_mismatch
                      - no_hits
                    description: "Set while broken: loader_missing (the source lost the loader and the hits stopped), fetch_failed (two checks in a row could not read the site while it was silent), site_key_mismatch (another key in the loader), no_hits (a tag-manager install whose hits stopped). Null otherwise."
                  last_hit_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, the newest hit the collector reported; null while nothing was received.
                  hits_count_24h:
                    type: integer
                    minimum: 0
                    description: Hits in the current UTC hour and the 23 before it, refreshed on every hit batch and every check (a rolling window, not "today").
                  identification:
                    type: string
                    enum:
                      - companies
                      - people
                    description: "What a visit to the site may name. companies (default): links carry the recipient's company code and a visit shows the company, never a person. people: visits from the people the team writes to are shown by name."
                  identification_confirmation:
                    type: object
                    nullable: true
                    properties:
                      identification:
                        type: string
                        enum:
                          - companies
                          - people
                        description: "The level confirmed: people covers both levels, companies only itself."
                      confirmed_at:
                        type: string
                        description: ISO 8601 UTC.
                      confirmed_by:
                        type: object
                        properties:
                          actor_type:
                            type: string
                            enum:
                              - user
                              - support
                              - api_key
                              - system
                              - agent
                          actor_sid:
                            type: string
                            nullable: true
                          team_sid:
                            type: string
                          actor_name:
                            type: string
                            nullable: true
                            description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                          oauth_client_sid:
                            type: string
                            nullable: true
                            description: The acting OAuth client (id_oc_*); null off the OAuth path.
                          reason:
                            type: string
                            nullable: true
                            description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                          permissions:
                            type: object
                            additionalProperties: {}
                            description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                          cluster_id:
                            type: integer
                            nullable: true
                            description: "Internal audit context: the cluster that served the write."
                          trace_id:
                            type: string
                            nullable: true
                            description: "Internal audit context: the trace id of the request that wrote the row."
                        required:
                          - actor_type
                          - actor_sid
                          - team_sid
                          - permissions
                        description: Who confirmed.
                    required:
                      - identification
                      - confirmed_at
                      - confirmed_by
                    description: The customer's latest confirmation of its duties for a level, by whom and when. Links are coded only while it covers the site's level; null = none yet.
                  link_codes_enabled:
                    type: boolean
                    description: Links to this site get a code (the company's or the person's, by identification) when the site is verified, identification_confirmation covers its level and the team switch (signal_settings.website_link_codes) is on. Default true.
                  carrier_linkedin:
                    type: string
                    enum:
                      - fragment
                      - query
                    description: "Where the code rides in a link sent on LinkedIn: fragment (#g_<code>, default) or query (?gs=<code>)."
                  carrier_email:
                    type: string
                    enum:
                      - fragment
                      - query
                    description: "Where the code rides in a link sent by email: query (default) or fragment."
                  consent_mode:
                    type: string
                    enum:
                      - not_required
                      - required
                    description: "not_required (default): the first-party visitor id is stored on the first hit. required: nothing is stored until the site's banner calls gs('consent', true); until then a visit is attributed by the code in the link alone."
                  fingerprint_mode:
                    type: string
                    enum:
                      - "on"
                      - consent
                      - "off"
                    description: "on (default): the device fingerprint is collected (answered as consent when consent_mode is required); consent: only after consent; off: never."
                  anonymize_ip:
                    type: boolean
                    description: Once a session's network is resolved, keep the address's network part only (the last octet, or the last 80 bits of IPv6, zeroed). Default false.
                  ignored_ips:
                    type: array
                    items:
                      type: string
                    description: "IPv4 or IPv6 addresses or CIDR ranges whose visits are internal (the office, the VPN egress): shown under their own filter, never a fact, never a signal. At most 50."
                  live_alerts:
                    type: string
                    enum:
                      - "off"
                      - key_pages
                      - all_known
                    description: "When a known person on the site alerts the team now: off, key_pages (default: a key page reached), all_known (any visit)."
                  live_alert_tasks:
                    type: boolean
                    description: "A live alert also opens a task, due now, on each of the person's open threads. false: only the notice goes. Default true."
                  live_alert_task_minutes:
                    type: integer
                    nullable: true
                    description: "How long that task lives: still open after this many minutes, the sweep cancels it and it reads as expired. 5 to 43200 (30 days); null = it never expires. Default 30."
                  inbound_playtable_sid:
                    type: string
                    nullable: true
                    description: pt_tb_... the table an identified visitor nobody has would be handed to; stored only today, nothing reads it yet.
                  created_by:
                    type: object
                    properties:
                      actor_type:
                        type: string
                        enum:
                          - user
                          - support
                          - api_key
                          - system
                          - agent
                      actor_sid:
                        type: string
                        nullable: true
                      team_sid:
                        type: string
                      actor_name:
                        type: string
                        nullable: true
                        description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                      oauth_client_sid:
                        type: string
                        nullable: true
                        description: The acting OAuth client (id_oc_*); null off the OAuth path.
                      reason:
                        type: string
                        nullable: true
                        description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                      permissions:
                        type: object
                        additionalProperties: {}
                        description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                      cluster_id:
                        type: integer
                        nullable: true
                        description: "Internal audit context: the cluster that served the write."
                      trace_id:
                        type: string
                        nullable: true
                        description: "Internal audit context: the trace id of the request that wrote the row."
                    required:
                      - actor_type
                      - actor_sid
                      - team_sid
                      - permissions
                    description: Actor that registered the site.
                  created_at:
                    type: string
                    description: ISO 8601 UTC.
                  updated_at:
                    type: string
                    description: ISO 8601 UTC.
                  deleted_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC; null = live. A deleted site keeps its sessions and visitors.
                required:
                  - sid
                  - team_sid
                  - domain
                  - include_subdomains
                  - site_key
                  - status
                  - verified_at
                  - last_check_at
                  - last_check_result
                  - broken_reason
                  - last_hit_at
                  - hits_count_24h
                  - identification
                  - identification_confirmation
                  - link_codes_enabled
                  - carrier_linkedin
                  - carrier_email
                  - consent_mode
                  - fingerprint_mode
                  - anonymize_ip
                  - ignored_ips
                  - live_alerts
                  - live_alert_tasks
                  - live_alert_task_minutes
                  - inbound_playtable_sid
                  - created_by
                  - created_at
                  - updated_at
                  - deleted_at
              included:
                type: object
                additionalProperties: {}
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          properties:
            total_count:
              type: integer
              minimum: 0
              description: Sites matching the filter (full filter scope, not the page).
            groups:
              type: object
              properties:
                status:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Sites per status, the statuses that occur only (pending, verified, broken, disabled); [] when none.
              required:
                - status
          required:
            - total_count
            - groups
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    SearchWebsiteTrackedEventsRequest:
      type: object
      description: Request body of `search_website_tracked_events`.
      properties:
        filter:
          type: object
          properties:
            q:
              type: string
              maxLength: 128
              description: Free text over event and label (a LIKE).
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_te_
                  description: Website tracked event sid (sg_te_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_te_
                    description: Website tracked event sid (sg_te_...).
              additionalProperties: false
              description: "Tracked event sid(s), sg_te_ prefix: also the point lookup (there is no get tool)."
            site_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...), the event's site.
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...), the event's site.
              additionalProperties: false
              description: "The usual scope: one site's events."
            event:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: The name(s) as registered.
            is_conversion:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: The conversion events only.
            created_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: ISO 8601 range; combine bounds in one object.
            deleted_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: "Default scope is { is_null: true } (live rows); stating it at all lifts the soft-delete scope."
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        sort:
          type: object
          properties:
            field:
              type: string
              enum:
                - created_at
                - event
              description: The column to order by.
            direction:
              type: string
              enum:
                - asc
                - desc
              description: asc or desc; default desc.
          required:
            - field
          description: One column and its direction; omit for the default order.
        page_size:
          type: integer
          minimum: 0
          maximum: 500
          description: 0..500, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
    SearchWebsiteTrackedEventsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  sid:
                    type: string
                    description: Website tracked event sid (sg_te_...).
                  team_sid:
                    type: string
                    description: "Owning team (ts_tm_..., external: gs.service.id)."
                  site_sid:
                    type: string
                    description: The site the event belongs to (sg_si_...).
                  event:
                    type: string
                    description: The name the site sends, stored as entered, matched without letter case; immutable (a fact's key carries it).
                  label:
                    type: string
                    description: What the event is called in the feed.
                  is_conversion:
                    type: boolean
                    description: Counted as a conversion in the feed and the Overview card.
                  created_by:
                    type: object
                    properties:
                      actor_type:
                        type: string
                        enum:
                          - user
                          - support
                          - api_key
                          - system
                          - agent
                      actor_sid:
                        type: string
                        nullable: true
                      team_sid:
                        type: string
                      actor_name:
                        type: string
                        nullable: true
                        description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                      oauth_client_sid:
                        type: string
                        nullable: true
                        description: The acting OAuth client (id_oc_*); null off the OAuth path.
                      reason:
                        type: string
                        nullable: true
                        description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                      permissions:
                        type: object
                        additionalProperties: {}
                        description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                      cluster_id:
                        type: integer
                        nullable: true
                        description: "Internal audit context: the cluster that served the write."
                      trace_id:
                        type: string
                        nullable: true
                        description: "Internal audit context: the trace id of the request that wrote the row."
                    required:
                      - actor_type
                      - actor_sid
                      - team_sid
                      - permissions
                    description: Actor that registered the event.
                  created_at:
                    type: string
                    description: ISO 8601 UTC.
                  updated_at:
                    type: string
                    description: ISO 8601 UTC.
                  deleted_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
                required:
                  - sid
                  - team_sid
                  - site_sid
                  - event
                  - label
                  - is_conversion
                  - created_by
                  - created_at
                  - updated_at
                  - deleted_at
              included:
                type: object
                additionalProperties: {}
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          additionalProperties: {}
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    SearchWebsiteVisitorsRequest:
      type: object
      description: Request body of `search_website_visitors`.
      properties:
        filter:
          type: object
          properties:
            q:
              type: string
              maxLength: 128
              description: Free text over the identified email and the network's name and domain (a LIKE).
            sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_wv_
                  description: Website visitor sid (sg_wv_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_wv_
                    description: Website visitor sid (sg_wv_...).
              additionalProperties: false
              description: Visitor sid(s), sg_wv_ prefix.
            site_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^sg_si_
                  description: Website site sid (sg_si_...).
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^sg_si_
                    description: Website site sid (sg_si_...).
              additionalProperties: false
              description: One site's visitors.
            person_sid:
              type: object
              properties:
                eq:
                  type: string
                  minLength: 18
                  maxLength: 18
                  pattern: ^cr_pp_
                  description: "Person sid (cr_pp_..., external: playtables)."
                in:
                  type: array
                  items:
                    type: string
                    minLength: 18
                    maxLength: 18
                    pattern: ^cr_pp_
                    description: "Person sid (cr_pp_..., external: playtables)."
                is_null:
                  type: boolean
              additionalProperties: false
              description: One person's browsers; is_null false = bound visitors, is_null true = unbound.
            identified_email:
              type: object
              properties:
                eq:
                  type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: 'is_null false = an email nobody has yet (with person_sid is_null true: the "Add to table" rows).'
            bound_by:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - code
                    - identify
                    - fingerprint
                    - manual
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - code
                      - identify
                      - fingerprint
                      - manual
                is_null:
                  type: boolean
              additionalProperties: false
              description: The rung that bound the visitor; is_null true = unbound.
            is_ephemeral:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: eq false hides the one-day strangers (a hit without a visitor id).
            is_internal:
              type: object
              properties:
                eq:
                  type: boolean
              additionalProperties: false
              description: The team's own traffic, by the newest session.
            network_type:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
                is_null:
                  type: boolean
              additionalProperties: false
              description: business | isp | mobile | hosting | education | government | unknown; is_null true = no network resolved yet.
            geo_country:
              type: object
              properties:
                eq:
                  type: string
                in:
                  type: array
                  items:
                    type: string
              additionalProperties: false
              description: ISO 3166-1 alpha-2 of the newest session.
            device:
              type: object
              properties:
                eq:
                  type: string
                  enum:
                    - desktop
                    - mobile
                    - tablet
                    - unknown
                in:
                  type: array
                  items:
                    type: string
                    enum:
                      - desktop
                      - mobile
                      - tablet
                      - unknown
              additionalProperties: false
              description: desktop | mobile | tablet | unknown.
            sessions_count:
              type: object
              properties:
                gte:
                  type: integer
                  minimum: 0
                lte:
                  type: integer
                  minimum: 0
                gt:
                  type: integer
                  minimum: 0
                lt:
                  type: integer
                  minimum: 0
              additionalProperties: false
              description: gte 2 = the returning visitors.
            first_seen_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: ISO 8601 bounds on the first hit.
            last_seen_at:
              type: object
              properties:
                gte:
                  type: string
                lte:
                  type: string
                gt:
                  type: string
                lt:
                  type: string
              additionalProperties: false
              description: ISO 8601 bounds on the newest hit ("seen this week").
          description: "Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row."
        include:
          type: array
          items:
            type: string
            enum:
              - person
              - last_session
            description: "person: the bound person's sid (the card is owed); last_session: the visitor's newest session, one ranked read per page."
          description: Relations to attach to every item; omit for the bare rows.
        sort:
          type: object
          properties:
            field:
              type: string
              enum:
                - last_seen_at
                - first_seen_at
                - sessions_count
              description: The column to order by.
            direction:
              type: string
              enum:
                - asc
                - desc
              description: asc or desc; default desc.
          required:
            - field
          description: One column and its direction; omit for the default order.
        page_size:
          type: integer
          minimum: 0
          maximum: 500
          description: 0..500, default 50; 0 = counts only, 1 = the first row.
        cursor:
          type: string
          nullable: true
          description: pagination.next_cursor of the previous page.
    SearchWebsiteVisitorsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - search
        items:
          type: array
          items:
            type: object
            properties:
              item:
                type: object
                properties:
                  sid:
                    type: string
                    description: Website visitor sid (sg_wv_...).
                  team_sid:
                    type: string
                    description: "Owning team (ts_tm_..., external: gs.service.id)."
                  site_sid:
                    type: string
                    description: "The site the browser visited (sg_si_...): the same browser on two sites is two rows."
                  visitor_id:
                    type: string
                    description: The first-party visitor id the script stores (_gs_vid, a lowercase UUID v4), or eph_ plus 40 hex characters for a hit that carried none.
                  is_ephemeral:
                    type: boolean
                    description: "The row belongs to a day, not to a browser (consent not given, storage blocked): a stranger the next day, never bound."
                  person_sid:
                    type: string
                    nullable: true
                    description: The person the visitor is bound to (cr_pp_..., playtables); null while unbound.
                  identified_email:
                    type: string
                    nullable: true
                    description: 'The email an identify or a form gave when no person matched: the "Add to table" rows of the feed. Null otherwise.'
                  bound_by:
                    type: string
                    nullable: true
                    enum:
                      - code
                      - identify
                      - fingerprint
                      - manual
                    description: "Which rung bound the visitor: code (the person code in our link), identify (an email a person matched), fingerprint (the device), manual (a bind by hand). Null while unbound."
                  bound_at:
                    type: string
                    nullable: true
                    description: ISO 8601 UTC, when the bind was written; null while unbound.
                  first_seen_at:
                    type: string
                    description: ISO 8601 UTC, the receipt time of the first hit.
                  last_seen_at:
                    type: string
                    description: ISO 8601 UTC, the receipt time of the newest hit.
                  sessions_count:
                    type: integer
                    minimum: 0
                    description: "Sessions opened for this visitor: the returning visitors."
                  browser:
                    type: string
                    nullable: true
                    description: From the newest session; null when unknown.
                  browser_version:
                    type: string
                    nullable: true
                  os:
                    type: string
                    nullable: true
                  os_version:
                    type: string
                    nullable: true
                  device:
                    type: string
                    enum:
                      - desktop
                      - mobile
                      - tablet
                      - unknown
                    description: desktop | mobile | tablet | unknown, from the newest session.
                  screen:
                    type: string
                    nullable: true
                  language:
                    type: string
                    nullable: true
                  timezone:
                    type: string
                    nullable: true
                  geo_country:
                    type: string
                    nullable: true
                    description: ISO 3166-1 alpha-2 of the newest session; null when the edge gave none.
                  geo_region:
                    type: string
                    nullable: true
                  geo_city:
                    type: string
                    nullable: true
                  network_type:
                    type: string
                    nullable: true
                    description: "The newest resolved session's classification: business, isp, mobile, hosting, education, government or unknown; null until one resolved."
                  network_name:
                    type: string
                    nullable: true
                    description: The organization behind the newest resolved session's address; null until one resolved.
                  network_domain:
                    type: string
                    nullable: true
                    description: The company domain the data service derived; null when none.
                  asn:
                    type: integer
                    nullable: true
                  as_name:
                    type: string
                    nullable: true
                  is_internal:
                    type: boolean
                    description: The newest session was internal (the site's ignored_ips, or an identified email of the team's own domains).
                  created_at:
                    type: string
                    description: ISO 8601 UTC.
                  updated_at:
                    type: string
                    description: ISO 8601 UTC.
                required:
                  - sid
                  - team_sid
                  - site_sid
                  - visitor_id
                  - is_ephemeral
                  - person_sid
                  - identified_email
                  - bound_by
                  - bound_at
                  - first_seen_at
                  - last_seen_at
                  - sessions_count
                  - browser
                  - browser_version
                  - os
                  - os_version
                  - device
                  - screen
                  - language
                  - timezone
                  - geo_country
                  - geo_region
                  - geo_city
                  - network_type
                  - network_name
                  - network_domain
                  - asn
                  - as_name
                  - is_internal
                  - created_at
                  - updated_at
              included:
                type: object
                properties:
                  person:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: "The bound person: { sid } today (cr_pp_...), the compact card is owed. Absent while person_sid is null."
                  last_session:
                    type: object
                    properties:
                      sid:
                        type: string
                    required:
                      - sid
                    description: The visitor's newest session, the WebsiteSessionDomain verbatim (pages, key pages, events, the source, the network; // see ./website_sessions.md). Absent for a visitor with no session.
            required:
              - item
              - included
        pagination:
          type: object
          properties:
            next_cursor:
              type: string
              nullable: true
            has_more:
              type: boolean
            total_count:
              type: integer
              nullable: true
          required:
            - next_cursor
            - has_more
            - total_count
        applied_filters:
          type: object
          additionalProperties: {}
        includes:
          type: array
          items:
            type: string
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
        counts:
          type: object
          properties:
            total_count:
              type: integer
              minimum: 0
              description: Visitors matching the filter (full filter scope, not the page).
            groups:
              type: object
              properties:
                bound_by:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Bound visitors per rung (code, identify, fingerprint, manual); the unbound are not a group; [] when none.
                network_type:
                  anyOf:
                    - type: object
                      additionalProperties: {}
                    - type: array
                      items: {}
                  description: Visitors per network classification of their newest resolved session.
              required:
                - bound_by
                - network_type
          required:
            - total_count
            - groups
      required:
        - success
        - operation
        - items
        - pagination
        - applied_filters
        - includes
        - meta
    UnlinkWebsiteVisitorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item:
          type: object
          nullable: true
          properties:
            sid:
              type: string
              description: Website visitor sid (sg_wv_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: "The site the browser visited (sg_si_...): the same browser on two sites is two rows."
            visitor_id:
              type: string
              description: The first-party visitor id the script stores (_gs_vid, a lowercase UUID v4), or eph_ plus 40 hex characters for a hit that carried none.
            is_ephemeral:
              type: boolean
              description: "The row belongs to a day, not to a browser (consent not given, storage blocked): a stranger the next day, never bound."
            person_sid:
              type: string
              nullable: true
              description: The person the visitor is bound to (cr_pp_..., playtables); null while unbound.
            identified_email:
              type: string
              nullable: true
              description: 'The email an identify or a form gave when no person matched: the "Add to table" rows of the feed. Null otherwise.'
            bound_by:
              type: string
              nullable: true
              enum:
                - code
                - identify
                - fingerprint
                - manual
              description: "Which rung bound the visitor: code (the person code in our link), identify (an email a person matched), fingerprint (the device), manual (a bind by hand). Null while unbound."
            bound_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, when the bind was written; null while unbound.
            first_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the first hit.
            last_seen_at:
              type: string
              description: ISO 8601 UTC, the receipt time of the newest hit.
            sessions_count:
              type: integer
              minimum: 0
              description: "Sessions opened for this visitor: the returning visitors."
            browser:
              type: string
              nullable: true
              description: From the newest session; null when unknown.
            browser_version:
              type: string
              nullable: true
            os:
              type: string
              nullable: true
            os_version:
              type: string
              nullable: true
            device:
              type: string
              enum:
                - desktop
                - mobile
                - tablet
                - unknown
              description: desktop | mobile | tablet | unknown, from the newest session.
            screen:
              type: string
              nullable: true
            language:
              type: string
              nullable: true
            timezone:
              type: string
              nullable: true
            geo_country:
              type: string
              nullable: true
              description: ISO 3166-1 alpha-2 of the newest session; null when the edge gave none.
            geo_region:
              type: string
              nullable: true
            geo_city:
              type: string
              nullable: true
            network_type:
              type: string
              nullable: true
              description: "The newest resolved session's classification: business, isp, mobile, hosting, education, government or unknown; null until one resolved."
            network_name:
              type: string
              nullable: true
              description: The organization behind the newest resolved session's address; null until one resolved.
            network_domain:
              type: string
              nullable: true
              description: The company domain the data service derived; null when none.
            asn:
              type: integer
              nullable: true
            as_name:
              type: string
              nullable: true
            is_internal:
              type: boolean
              description: The newest session was internal (the site's ignored_ips, or an identified email of the team's own domains).
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - site_sid
            - visitor_id
            - is_ephemeral
            - person_sid
            - identified_email
            - bound_by
            - bound_at
            - first_seen_at
            - last_seen_at
            - sessions_count
            - browser
            - browser_version
            - os
            - os_version
            - device
            - screen
            - language
            - timezone
            - geo_country
            - geo_region
            - geo_city
            - network_type
            - network_name
            - network_domain
            - asn
            - as_name
            - is_internal
            - created_at
            - updated_at
        result:
          type: object
          properties:
            was_bound:
              type: boolean
              description: A bind was cleared; false on a visitor that was already unbound.
          required:
            - was_bound
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
    UpdateSignalPreferencesRequest:
      type: object
      description: Request body of `update_signal_preferences`.
      properties:
        hidden_types:
          type: array
          items:
            type: string
            enum:
              - website_visited
              - website_key_page_visited
              - website_form_submitted
              - website_event
              - linkedin_connection_request_accepted
              - linkedin_message_replied
              - linkedin_inmail_replied
              - linkedin_invitation_received
              - linkedin_followed
              - linkedin_message_reacted
              - linkedin_message_deleted
              - linkedin_profile_viewed_us
              - linkedin_connection_removed
              - linkedin_blocked
              - linkedin_post_published
              - linkedin_birthday
              - linkedin_work_anniversary
              - linkedin_job_changed
              - email_opened
              - email_link_clicked
              - email_replied
              - email_bounced
              - email_unsubscribed
              - email_complained
            description: "A signal type: a ledger type (the type of search_activities) the Signals page lists, the website's first, then LinkedIn's, then email's."
          description: The signal types the feed leaves out. Replaces the stored list as a set ([] shows every type); duplicates collapse, stored in the page's order.
        notify_types:
          type: array
          items:
            type: string
            enum:
              - website_visited
              - website_key_page_visited
              - website_form_submitted
              - website_event
              - linkedin_connection_request_accepted
              - linkedin_message_replied
              - linkedin_inmail_replied
              - linkedin_invitation_received
              - linkedin_followed
              - linkedin_message_reacted
              - linkedin_message_deleted
              - linkedin_profile_viewed_us
              - linkedin_connection_removed
              - linkedin_blocked
              - linkedin_post_published
              - linkedin_birthday
              - linkedin_work_anniversary
              - linkedin_job_changed
              - email_opened
              - email_link_clicked
              - email_replied
              - email_bounced
              - email_unsubscribed
              - email_complained
            description: "A signal type: a ledger type (the type of search_activities) the Signals page lists, the website's first, then LinkedIn's, then email's."
          description: "The signal types the user is told about (the badge and the toast). Replaces the stored list as a set ([] tells nothing): to add or drop one type, read the row and send the whole list."
        sender_profile_scope:
          type: string
          enum:
            - all
            - mine
            - chosen
          description: "all | mine | chosen: whose sender profiles the feed starts on. Moving off chosen keeps sender_profile_sids."
        sender_profile_sids:
          type: array
          items:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^ub_sp_
          maxItems: 200
          description: The chosen sender profiles (unibox sender profile sids, ub_sp_..., 18 characters), at most 200; duplicates collapse. Read when sender_profile_scope is chosen, where [] means every sender profile.
        toast_enabled:
          type: boolean
          description: false stops the toasts; the badge still counts.
        saved_views:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9A-Za-z]{10}$
                description: The id of a stored view to keep it (10 base62 characters, unique within the list); absent = the server mints one.
              name:
                type: string
                minLength: 1
                maxLength: 60
                description: 1..60 characters.
              view:
                type: string
                enum:
                  - needs_me
                  - all
                  - posts
                  - moments
                  - website
                  - linkedin
                  - email
                description: all | website | linkedin | email.
              filter:
                type: object
                properties:
                  object_type:
                    type: string
                    nullable: true
                    enum:
                      - person
                      - company
                    description: person | company; null or absent = both.
                  playtable_sid:
                    type: string
                    nullable: true
                    minLength: 18
                    maxLength: 18
                    pattern: ^pt_tb_
                    description: One table (pt_tb_...); null or absent = every table.
                  sender_profile_sids:
                    type: array
                    items:
                      type: string
                      minLength: 18
                      maxLength: 18
                      pattern: ^ub_sp_
                    maxItems: 200
                    description: At most 200 sender profiles (unibox sender profile sids, ub_sp_...), duplicates collapse; absent or [] = not filtered.
                  types:
                    type: array
                    items:
                      type: string
                      enum:
                        - website_visited
                        - website_key_page_visited
                        - website_form_submitted
                        - website_event
                        - linkedin_connection_request_accepted
                        - linkedin_message_replied
                        - linkedin_inmail_replied
                        - linkedin_invitation_received
                        - linkedin_followed
                        - linkedin_message_reacted
                        - linkedin_message_deleted
                        - linkedin_profile_viewed_us
                        - linkedin_connection_removed
                        - linkedin_blocked
                        - linkedin_post_published
                        - linkedin_birthday
                        - linkedin_work_anniversary
                        - linkedin_job_changed
                        - email_opened
                        - email_link_clicked
                        - email_replied
                        - email_bounced
                        - email_unsubscribed
                        - email_complained
                      description: "A signal type: a ledger type (the type of search_activities) the Signals page lists, the website's first, then LinkedIn's, then email's."
                    description: Signal types, stored as a set in the page's order; absent or [] = every shown type of the view. Not checked against the view's source.
                  q:
                    type: string
                    nullable: true
                    maxLength: 128
                    description: A name search, up to 128 characters.
                description: The view's filter; absent = not filtered. Answered with every key.
            required:
              - name
              - view
          maxItems: 20
          description: The whole list of saved views, at most 20; replaces the stored one ([] clears it). Send the stored views with their ids to keep them.
    UpdateSignalPreferencesResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - update
        item:
          type: object
          properties:
            sid:
              type: string
              description: Signal preference sid (sg_up_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            user_sid:
              type: string
              description: "The member the row belongs to: the caller's actor sid (an agent acting for a member is the member; an api key has a row of its own). Exactly one row per team and user."
            hidden_types:
              type: array
              items:
                type: string
              description: Signal types (SignalFeedType) the feed leaves out, as a set in the page's order. Default ["email_bounced"]. Hiding is opt-out, so a type added to the list later shows at once. The shown types are every SignalFeedType not in this list.
            notify_types:
              type: array
              items:
                type: string
              description: "Signal types the user is told about (the badge on the Signals menu entry counts the ones that are also shown, and each raises a toast while the user works elsewhere), as a set in the page's order. Default: website_key_page_visited, website_form_submitted, linkedin_connection_request_accepted, linkedin_message_replied, linkedin_inmail_replied, linkedin_invitation_received, email_replied. Opt-in, so a type added later tells nobody until chosen."
            sender_profile_scope:
              type: string
              enum:
                - all
                - mine
                - chosen
              description: "Whose sender profiles the feed's sender profile filter starts on: all (default, no sender profile filter), mine (the user's own sender profiles) or chosen (sender_profile_sids). A default of the filter and nothing more."
            sender_profile_sids:
              type: array
              items:
                type: string
              description: "The chosen sender profiles (unibox sender profile sids, ub_sp_...), at most 200, read when sender_profile_scope is chosen (chosen with [] is every sender profile: no sender profile filter) and kept when it moves off it, so moving back restores the picks. [] by default."
            toast_enabled:
              type: boolean
              description: Whether a notify type raises a toast. Default true.
            seen_at:
              type: string
              description: "ISO 8601 UTC, whole seconds: up to when the user has seen the feed. A fact is new when it reached the ledger after this (created_at > seen_at in search_activities). Born a day before the row, so a first visit shows the last day as new; moved forward by mark_signals_seen only, never back."
            saved_views:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    description: 10 base62 characters, minted by the server for an item sent without one and kept across writes.
                  name:
                    type: string
                    description: 1..60 characters.
                  view:
                    type: string
                    enum:
                      - needs_me
                      - all
                      - posts
                      - moments
                      - website
                      - linkedin
                      - email
                    description: "all | website | linkedin | email: the view the saved view opens on."
                  filter:
                    type: object
                    properties:
                      object_type:
                        type: string
                        nullable: true
                        enum:
                          - person
                          - company
                        description: "person | company: the All / People / Companies switch; null = both."
                      playtable_sid:
                        type: string
                        nullable: true
                        description: The table (pt_tb_...); null = every table.
                      sender_profile_sids:
                        type: array
                        items:
                          type: string
                        description: The sender profiles (unibox sender profile sids, ub_sp_...); [] = not filtered.
                      types:
                        type: array
                        items:
                          type: string
                        description: "The quick filter: signal types (SignalFeedType) in the page's order; [] = every shown type of the view."
                      q:
                        type: string
                        nullable: true
                        description: The name search, up to 128 characters; null = none.
                    required:
                      - object_type
                      - playtable_sid
                      - sender_profile_sids
                      - types
                      - q
                required:
                  - id
                  - name
                  - view
                  - filter
              description: The saved views of the page, at most 20, ids unique within the list. [] by default.
            created_at:
              type: string
              description: ISO 8601 UTC, the first call.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - user_sid
            - hidden_types
            - notify_types
            - sender_profile_scope
            - sender_profile_sids
            - toast_enabled
            - seen_at
            - saved_views
            - created_at
            - updated_at
        updated_fields:
          type: array
          items:
            type: string
        previous_values:
          type: object
          additionalProperties: {}
        kept_fields:
          type: array
          items:
            type: string
          description: The fields this write did not change because the person's own value stands on them (stamped person); read the item for what landed.
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - updated_fields
        - previous_values
        - meta
    UpdateSignalSettingsRequest:
      type: object
      description: Request body of `update_signal_settings`.
      properties:
        website_link_codes:
          type: boolean
          description: false stops coding every link of the team at once; true lets a verified site with link_codes_enabled code again. The send paths follow within five minutes.
        profile_views_enabled:
          type: boolean
          description: false stops reading every sender profile's "Who viewed your profile" list (a run already queued finishes); true reads them again from the next hourly scan.
        profile_views_excluded_sender_profiles:
          type: array
          items:
            type: string
            minLength: 18
            maxLength: 18
            pattern: ^ub_sp_
          maxItems: 500
          description: The sender profiles to keep out of the profile view collection (unibox sender profile sids, ub_sp_...). Replaces the stored list as a set; [] clears it; a sid outside ub_sp_ is a 422.
    UpdateSignalSettingsResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - update
        item:
          type: object
          properties:
            sid:
              type: string
              description: Signal setting sid (sg_st_...). Stable for the life of the team.
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id). Exactly one row per team."
            website_link_codes:
              type: boolean
              description: "The master switch for the code in the links the send paths emit (the company's or the person's, by the site's identification). Off: no link of the team is coded, whatever the sites say. On (default): a link is coded when its site is verified, its identification_confirmation covers its level and the site's own link_codes_enabled is on."
            profile_views_enabled:
              type: boolean
              description: "The P0 switch of the LinkedIn leg. On (default): every live sender profile with a LinkedIn account and a premium plan has its \"Who viewed your profile\" list read once a day, but the sender profiles in profile_views_excluded_sender_profiles. Off: no sender profile's list is read."
            profile_views_excluded_sender_profiles:
              type: array
              items:
                type: string
              description: The sender profiles kept out of the profile view collection (sender profile sids, ub_sp_...); [] by default, at most 500.
            created_at:
              type: string
              description: ISO 8601 UTC, the first read.
            updated_at:
              type: string
              description: ISO 8601 UTC.
          required:
            - sid
            - team_sid
            - website_link_codes
            - profile_views_enabled
            - profile_views_excluded_sender_profiles
            - created_at
            - updated_at
        updated_fields:
          type: array
          items:
            type: string
        previous_values:
          type: object
          additionalProperties: {}
        kept_fields:
          type: array
          items:
            type: string
          description: The fields this write did not change because the person's own value stands on them (stamped person); read the item for what landed.
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - updated_fields
        - previous_values
        - meta
    UpdateWebsiteKeyPageRequest:
      type: object
      description: Request body of `update_website_key_page`.
      properties:
        label:
          type: string
          minLength: 1
          maxLength: 120
          description: Replacement label.
        pattern:
          type: string
          maxLength: 2048
          description: Replacement path glob or URL; applies to visits from then on.
        is_conversion:
          type: boolean
          description: Flag or unflag the page as a conversion.
    UpdateWebsiteKeyPageResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - update
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website key page sid (sg_kp_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: The site the page belongs to (sg_si_...).
            key:
              type: string
              description: The stable lowercase slug (pricing) facts and signals carry; immutable.
            label:
              type: string
              description: What the page is called in the feed.
            pattern:
              type: string
              description: "The path glob as stored: a leading slash, lowercased, no query or fragment, * for any run of characters (/pricing*)."
            is_conversion:
              type: boolean
              description: Counted as a conversion in the feed and the Overview card.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that named the page (the site create, or this entity's create).
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
          required:
            - sid
            - team_sid
            - site_sid
            - key
            - label
            - pattern
            - is_conversion
            - created_by
            - created_at
            - updated_at
            - deleted_at
        updated_fields:
          type: array
          items:
            type: string
        previous_values:
          type: object
          additionalProperties: {}
        kept_fields:
          type: array
          items:
            type: string
          description: The fields this write did not change because the person's own value stands on them (stamped person); read the item for what landed.
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - updated_fields
        - previous_values
        - meta
    UpdateWebsiteSiteRequest:
      type: object
      description: Request body of `update_website_site`.
      properties:
        identification:
          type: string
          enum:
            - companies
            - people
          description: companies or people. A switch to people needs confirm_identification true in the same call; a switch to companies needs none and keeps the stored confirmation.
        confirm_identification:
          type: boolean
          description: "true only after the person confirmed the customer's duties for the level the site ends at: stored as identification_confirmation, also on its own (a site with none gets no codes). false is the same as leaving it out."
        include_subdomains:
          type: boolean
          description: Hosts under the domain belong to the site. Default true.
        link_codes_enabled:
          type: boolean
          description: Code the links to this site (once it is verified and confirmed for its level, and while the team switch is on). Default true.
        carrier_linkedin:
          type: string
          enum:
            - fragment
            - query
          description: "Where the code rides in a LinkedIn link: fragment (default) or query."
        carrier_email:
          type: string
          enum:
            - fragment
            - query
          description: "Where the code rides in an email link: query (default) or fragment."
        consent_mode:
          type: string
          enum:
            - not_required
            - required
          description: not_required (default) stores the visitor id on the first hit; required waits for the site's banner to call gs('consent', true).
        fingerprint_mode:
          type: string
          enum:
            - "on"
            - consent
            - "off"
          description: on (default), consent (only after consent) or off.
        anonymize_ip:
          type: boolean
          description: Keep a resolved session's address as its network part only. Default false.
        ignored_ips:
          type: array
          items:
            type: string
          maxItems: 50
          description: IPv4 or IPv6 addresses or CIDR ranges of internal traffic (the office, the VPN). Replaced whole; at most 50; an entry that is neither is 422 invalid_ip.
        live_alerts:
          type: string
          enum:
            - "off"
            - key_pages
            - all_known
          description: "off | key_pages (default) | all_known: when a known person on the site alerts the team now."
        live_alert_tasks:
          type: boolean
          description: A live alert also opens a task, due now, on the person's open threads. Default true; false sends the notice alone.
        live_alert_task_minutes:
          type: integer
          nullable: true
          minimum: 5
          maximum: 43200
          description: "The life of that task in minutes, 5 to 43200 (30 days): still open by then, the sweep cancels it. null = it never expires. Default 30."
        inbound_playtable_sid:
          type: string
          nullable: true
          minLength: 18
          maxLength: 18
          pattern: ^pt_tb_
          description: The table an identified visitor nobody has would be handed to; stored only today. null clears it.
        enabled:
          type: boolean
          description: "false switches the site off (status disabled: hits dropped, no codes); true brings it back as verified when it had been verified and was not broken, else as pending. Already in that state changes nothing."
    UpdateWebsiteSiteResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - update
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website site sid (sg_si_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            domain:
              type: string
              description: "The host as the team typed it, reduced to a bare hostname: lowercased, no scheme, port or path, a leading www. dropped. Immutable: a different host is a different site."
            include_subdomains:
              type: boolean
              description: Hosts under domain belong to the site (default true).
            site_key:
              type: string
              description: The public 20-character key the loader carries (gs.k). It names the site to the collector; not a secret. Changes only through rotate_website_site_key.
            status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: pending = waiting for the script (links to it are not coded yet); verified = receiving; broken = the health rule flagged it (see broken_reason); disabled = switched off by update enabled false.
            verified_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last transition into verified; null never.
            last_check_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last active check (verify_website_site or the daily job); null never.
            last_check_result:
              type: object
              nullable: true
              properties:
                outcome:
                  type: string
                  enum:
                    - found
                    - site_key_mismatch
                    - loader_missing
                    - fetch_failed
                  description: "The best outcome over pages: found wins over site_key_mismatch, over loader_missing, over fetch_failed."
                pages:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL requested last for this page.
                      key_page_sid:
                        type: string
                        nullable: true
                        description: sg_kp_... the key page this row checked; null for the home page.
                      outcome:
                        type: string
                        enum:
                          - found
                          - site_key_mismatch
                          - loader_missing
                          - fetch_failed
                        description: "found: the page carries this site's key. site_key_mismatch: a loader with another key. loader_missing: no loader in the page source (a tag manager installs it outside the source, so such a site is verified by its first hit instead). fetch_failed: no page to read, see failure."
                      http_status:
                        type: integer
                        nullable: true
                        description: The final HTTP status; null when no answer arrived.
                      failure:
                        type: string
                        nullable: true
                        enum:
                          - invalid_url
                          - scheme_not_allowed
                          - credentials_in_url
                          - port_not_allowed
                          - ip_literal
                          - host_unresolvable
                          - private_address
                          - redirect_without_location
                          - too_many_redirects
                          - redirected_off_site
                          - connection_failed
                          - http_status
                        description: "Why the fetch failed, when outcome is fetch_failed: the guard refused the URL (scheme, port, credentials, an IP literal, a private address), the host did not resolve, the redirects ran out or left the site, the connection failed, or the status was outside 2xx. Null otherwise."
                    required:
                      - url
                      - key_page_sid
                      - outcome
                      - http_status
                      - failure
                  description: The home page first, then the checkable key pages (a pattern that names one URL).
              required:
                - outcome
                - pages
              description: What the last active check found, page by page; null while no check ran, and cleared by a key rotation.
            broken_reason:
              type: string
              nullable: true
              enum:
                - loader_missing
                - fetch_failed
                - site_key_mismatch
                - no_hits
              description: "Set while broken: loader_missing (the source lost the loader and the hits stopped), fetch_failed (two checks in a row could not read the site while it was silent), site_key_mismatch (another key in the loader), no_hits (a tag-manager install whose hits stopped). Null otherwise."
            last_hit_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the newest hit the collector reported; null while nothing was received.
            hits_count_24h:
              type: integer
              minimum: 0
              description: Hits in the current UTC hour and the 23 before it, refreshed on every hit batch and every check (a rolling window, not "today").
            identification:
              type: string
              enum:
                - companies
                - people
              description: "What a visit to the site may name. companies (default): links carry the recipient's company code and a visit shows the company, never a person. people: visits from the people the team writes to are shown by name."
            identification_confirmation:
              type: object
              nullable: true
              properties:
                identification:
                  type: string
                  enum:
                    - companies
                    - people
                  description: "The level confirmed: people covers both levels, companies only itself."
                confirmed_at:
                  type: string
                  description: ISO 8601 UTC.
                confirmed_by:
                  type: object
                  properties:
                    actor_type:
                      type: string
                      enum:
                        - user
                        - support
                        - api_key
                        - system
                        - agent
                    actor_sid:
                      type: string
                      nullable: true
                    team_sid:
                      type: string
                    actor_name:
                      type: string
                      nullable: true
                      description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                    oauth_client_sid:
                      type: string
                      nullable: true
                      description: The acting OAuth client (id_oc_*); null off the OAuth path.
                    reason:
                      type: string
                      nullable: true
                      description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                    permissions:
                      type: object
                      additionalProperties: {}
                      description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                    cluster_id:
                      type: integer
                      nullable: true
                      description: "Internal audit context: the cluster that served the write."
                    trace_id:
                      type: string
                      nullable: true
                      description: "Internal audit context: the trace id of the request that wrote the row."
                  required:
                    - actor_type
                    - actor_sid
                    - team_sid
                    - permissions
                  description: Who confirmed.
              required:
                - identification
                - confirmed_at
                - confirmed_by
              description: The customer's latest confirmation of its duties for a level, by whom and when. Links are coded only while it covers the site's level; null = none yet.
            link_codes_enabled:
              type: boolean
              description: Links to this site get a code (the company's or the person's, by identification) when the site is verified, identification_confirmation covers its level and the team switch (signal_settings.website_link_codes) is on. Default true.
            carrier_linkedin:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent on LinkedIn: fragment (#g_<code>, default) or query (?gs=<code>)."
            carrier_email:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent by email: query (default) or fragment."
            consent_mode:
              type: string
              enum:
                - not_required
                - required
              description: "not_required (default): the first-party visitor id is stored on the first hit. required: nothing is stored until the site's banner calls gs('consent', true); until then a visit is attributed by the code in the link alone."
            fingerprint_mode:
              type: string
              enum:
                - "on"
                - consent
                - "off"
              description: "on (default): the device fingerprint is collected (answered as consent when consent_mode is required); consent: only after consent; off: never."
            anonymize_ip:
              type: boolean
              description: Once a session's network is resolved, keep the address's network part only (the last octet, or the last 80 bits of IPv6, zeroed). Default false.
            ignored_ips:
              type: array
              items:
                type: string
              description: "IPv4 or IPv6 addresses or CIDR ranges whose visits are internal (the office, the VPN egress): shown under their own filter, never a fact, never a signal. At most 50."
            live_alerts:
              type: string
              enum:
                - "off"
                - key_pages
                - all_known
              description: "When a known person on the site alerts the team now: off, key_pages (default: a key page reached), all_known (any visit)."
            live_alert_tasks:
              type: boolean
              description: "A live alert also opens a task, due now, on each of the person's open threads. false: only the notice goes. Default true."
            live_alert_task_minutes:
              type: integer
              nullable: true
              description: "How long that task lives: still open after this many minutes, the sweep cancels it and it reads as expired. 5 to 43200 (30 days); null = it never expires. Default 30."
            inbound_playtable_sid:
              type: string
              nullable: true
              description: pt_tb_... the table an identified visitor nobody has would be handed to; stored only today, nothing reads it yet.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the site.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. A deleted site keeps its sessions and visitors.
          required:
            - sid
            - team_sid
            - domain
            - include_subdomains
            - site_key
            - status
            - verified_at
            - last_check_at
            - last_check_result
            - broken_reason
            - last_hit_at
            - hits_count_24h
            - identification
            - identification_confirmation
            - link_codes_enabled
            - carrier_linkedin
            - carrier_email
            - consent_mode
            - fingerprint_mode
            - anonymize_ip
            - ignored_ips
            - live_alerts
            - live_alert_tasks
            - live_alert_task_minutes
            - inbound_playtable_sid
            - created_by
            - created_at
            - updated_at
            - deleted_at
        updated_fields:
          type: array
          items:
            type: string
        previous_values:
          type: object
          additionalProperties: {}
        kept_fields:
          type: array
          items:
            type: string
          description: The fields this write did not change because the person's own value stands on them (stamped person); read the item for what landed.
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - updated_fields
        - previous_values
        - meta
    UpdateWebsiteTrackedEventRequest:
      type: object
      description: Request body of `update_website_tracked_event`.
      properties:
        label:
          type: string
          minLength: 1
          maxLength: 120
          description: Replacement label.
        is_conversion:
          type: boolean
          description: Flag or unflag the event as a conversion.
    UpdateWebsiteTrackedEventResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - update
        item:
          type: object
          properties:
            sid:
              type: string
              description: Website tracked event sid (sg_te_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            site_sid:
              type: string
              description: The site the event belongs to (sg_si_...).
            event:
              type: string
              description: The name the site sends, stored as entered, matched without letter case; immutable (a fact's key carries it).
            label:
              type: string
              description: What the event is called in the feed.
            is_conversion:
              type: boolean
              description: Counted as a conversion in the feed and the Overview card.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the event.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
          required:
            - sid
            - team_sid
            - site_sid
            - event
            - label
            - is_conversion
            - created_by
            - created_at
            - updated_at
            - deleted_at
        updated_fields:
          type: array
          items:
            type: string
        previous_values:
          type: object
          additionalProperties: {}
        kept_fields:
          type: array
          items:
            type: string
          description: The fields this write did not change because the person's own value stands on them (stamped person); read the item for what landed.
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - item
        - updated_fields
        - previous_values
        - meta
    VerifyWebsiteSiteResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        operation:
          type: string
          enum:
            - action
        action:
          type: string
          description: kebab-case verb; matches the route segment.
        item:
          type: object
          nullable: true
          properties:
            sid:
              type: string
              description: Website site sid (sg_si_...).
            team_sid:
              type: string
              description: "Owning team (ts_tm_..., external: gs.service.id)."
            domain:
              type: string
              description: "The host as the team typed it, reduced to a bare hostname: lowercased, no scheme, port or path, a leading www. dropped. Immutable: a different host is a different site."
            include_subdomains:
              type: boolean
              description: Hosts under domain belong to the site (default true).
            site_key:
              type: string
              description: The public 20-character key the loader carries (gs.k). It names the site to the collector; not a secret. Changes only through rotate_website_site_key.
            status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: pending = waiting for the script (links to it are not coded yet); verified = receiving; broken = the health rule flagged it (see broken_reason); disabled = switched off by update enabled false.
            verified_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last transition into verified; null never.
            last_check_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the last active check (verify_website_site or the daily job); null never.
            last_check_result:
              type: object
              nullable: true
              properties:
                outcome:
                  type: string
                  enum:
                    - found
                    - site_key_mismatch
                    - loader_missing
                    - fetch_failed
                  description: "The best outcome over pages: found wins over site_key_mismatch, over loader_missing, over fetch_failed."
                pages:
                  type: array
                  items:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL requested last for this page.
                      key_page_sid:
                        type: string
                        nullable: true
                        description: sg_kp_... the key page this row checked; null for the home page.
                      outcome:
                        type: string
                        enum:
                          - found
                          - site_key_mismatch
                          - loader_missing
                          - fetch_failed
                        description: "found: the page carries this site's key. site_key_mismatch: a loader with another key. loader_missing: no loader in the page source (a tag manager installs it outside the source, so such a site is verified by its first hit instead). fetch_failed: no page to read, see failure."
                      http_status:
                        type: integer
                        nullable: true
                        description: The final HTTP status; null when no answer arrived.
                      failure:
                        type: string
                        nullable: true
                        enum:
                          - invalid_url
                          - scheme_not_allowed
                          - credentials_in_url
                          - port_not_allowed
                          - ip_literal
                          - host_unresolvable
                          - private_address
                          - redirect_without_location
                          - too_many_redirects
                          - redirected_off_site
                          - connection_failed
                          - http_status
                        description: "Why the fetch failed, when outcome is fetch_failed: the guard refused the URL (scheme, port, credentials, an IP literal, a private address), the host did not resolve, the redirects ran out or left the site, the connection failed, or the status was outside 2xx. Null otherwise."
                    required:
                      - url
                      - key_page_sid
                      - outcome
                      - http_status
                      - failure
                  description: The home page first, then the checkable key pages (a pattern that names one URL).
              required:
                - outcome
                - pages
              description: What the last active check found, page by page; null while no check ran, and cleared by a key rotation.
            broken_reason:
              type: string
              nullable: true
              enum:
                - loader_missing
                - fetch_failed
                - site_key_mismatch
                - no_hits
              description: "Set while broken: loader_missing (the source lost the loader and the hits stopped), fetch_failed (two checks in a row could not read the site while it was silent), site_key_mismatch (another key in the loader), no_hits (a tag-manager install whose hits stopped). Null otherwise."
            last_hit_at:
              type: string
              nullable: true
              description: ISO 8601 UTC, the newest hit the collector reported; null while nothing was received.
            hits_count_24h:
              type: integer
              minimum: 0
              description: Hits in the current UTC hour and the 23 before it, refreshed on every hit batch and every check (a rolling window, not "today").
            identification:
              type: string
              enum:
                - companies
                - people
              description: "What a visit to the site may name. companies (default): links carry the recipient's company code and a visit shows the company, never a person. people: visits from the people the team writes to are shown by name."
            identification_confirmation:
              type: object
              nullable: true
              properties:
                identification:
                  type: string
                  enum:
                    - companies
                    - people
                  description: "The level confirmed: people covers both levels, companies only itself."
                confirmed_at:
                  type: string
                  description: ISO 8601 UTC.
                confirmed_by:
                  type: object
                  properties:
                    actor_type:
                      type: string
                      enum:
                        - user
                        - support
                        - api_key
                        - system
                        - agent
                    actor_sid:
                      type: string
                      nullable: true
                    team_sid:
                      type: string
                    actor_name:
                      type: string
                      nullable: true
                      description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                    oauth_client_sid:
                      type: string
                      nullable: true
                      description: The acting OAuth client (id_oc_*); null off the OAuth path.
                    reason:
                      type: string
                      nullable: true
                      description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                    permissions:
                      type: object
                      additionalProperties: {}
                      description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                    cluster_id:
                      type: integer
                      nullable: true
                      description: "Internal audit context: the cluster that served the write."
                    trace_id:
                      type: string
                      nullable: true
                      description: "Internal audit context: the trace id of the request that wrote the row."
                  required:
                    - actor_type
                    - actor_sid
                    - team_sid
                    - permissions
                  description: Who confirmed.
              required:
                - identification
                - confirmed_at
                - confirmed_by
              description: The customer's latest confirmation of its duties for a level, by whom and when. Links are coded only while it covers the site's level; null = none yet.
            link_codes_enabled:
              type: boolean
              description: Links to this site get a code (the company's or the person's, by identification) when the site is verified, identification_confirmation covers its level and the team switch (signal_settings.website_link_codes) is on. Default true.
            carrier_linkedin:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent on LinkedIn: fragment (#g_<code>, default) or query (?gs=<code>)."
            carrier_email:
              type: string
              enum:
                - fragment
                - query
              description: "Where the code rides in a link sent by email: query (default) or fragment."
            consent_mode:
              type: string
              enum:
                - not_required
                - required
              description: "not_required (default): the first-party visitor id is stored on the first hit. required: nothing is stored until the site's banner calls gs('consent', true); until then a visit is attributed by the code in the link alone."
            fingerprint_mode:
              type: string
              enum:
                - "on"
                - consent
                - "off"
              description: "on (default): the device fingerprint is collected (answered as consent when consent_mode is required); consent: only after consent; off: never."
            anonymize_ip:
              type: boolean
              description: Once a session's network is resolved, keep the address's network part only (the last octet, or the last 80 bits of IPv6, zeroed). Default false.
            ignored_ips:
              type: array
              items:
                type: string
              description: "IPv4 or IPv6 addresses or CIDR ranges whose visits are internal (the office, the VPN egress): shown under their own filter, never a fact, never a signal. At most 50."
            live_alerts:
              type: string
              enum:
                - "off"
                - key_pages
                - all_known
              description: "When a known person on the site alerts the team now: off, key_pages (default: a key page reached), all_known (any visit)."
            live_alert_tasks:
              type: boolean
              description: "A live alert also opens a task, due now, on each of the person's open threads. false: only the notice goes. Default true."
            live_alert_task_minutes:
              type: integer
              nullable: true
              description: "How long that task lives: still open after this many minutes, the sweep cancels it and it reads as expired. 5 to 43200 (30 days); null = it never expires. Default 30."
            inbound_playtable_sid:
              type: string
              nullable: true
              description: pt_tb_... the table an identified visitor nobody has would be handed to; stored only today, nothing reads it yet.
            created_by:
              type: object
              properties:
                actor_type:
                  type: string
                  enum:
                    - user
                    - support
                    - api_key
                    - system
                    - agent
                actor_sid:
                  type: string
                  nullable: true
                team_sid:
                  type: string
                actor_name:
                  type: string
                  nullable: true
                  description: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
                oauth_client_sid:
                  type: string
                  nullable: true
                  description: The acting OAuth client (id_oc_*); null off the OAuth path.
                reason:
                  type: string
                  nullable: true
                  description: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
                permissions:
                  type: object
                  additionalProperties: {}
                  description: "Internal audit context: the grant set the actor held at write time. Not a contract."
                cluster_id:
                  type: integer
                  nullable: true
                  description: "Internal audit context: the cluster that served the write."
                trace_id:
                  type: string
                  nullable: true
                  description: "Internal audit context: the trace id of the request that wrote the row."
              required:
                - actor_type
                - actor_sid
                - team_sid
                - permissions
              description: Actor that registered the site.
            created_at:
              type: string
              description: ISO 8601 UTC.
            updated_at:
              type: string
              description: ISO 8601 UTC.
            deleted_at:
              type: string
              nullable: true
              description: ISO 8601 UTC; null = live. A deleted site keeps its sessions and visitors.
          required:
            - sid
            - team_sid
            - domain
            - include_subdomains
            - site_key
            - status
            - verified_at
            - last_check_at
            - last_check_result
            - broken_reason
            - last_hit_at
            - hits_count_24h
            - identification
            - identification_confirmation
            - link_codes_enabled
            - carrier_linkedin
            - carrier_email
            - consent_mode
            - fingerprint_mode
            - anonymize_ip
            - ignored_ips
            - live_alerts
            - live_alert_tasks
            - live_alert_task_minutes
            - inbound_playtable_sid
            - created_by
            - created_at
            - updated_at
            - deleted_at
        result:
          type: object
          properties:
            outcome:
              type: string
              enum:
                - found
                - site_key_mismatch
                - loader_missing
                - fetch_failed
              description: The best outcome over the pages fetched.
            previous_status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: The status before the check.
            status:
              type: string
              enum:
                - pending
                - verified
                - broken
                - disabled
              description: "The status after the health rule: verified on found; a silent verified site may turn broken; pending and broken stay as they were on anything but found."
          required:
            - outcome
            - previous_status
            - status
        meta:
          type: object
          properties:
            trace_id:
              type: string
              description: UUID v7; same 128-bit value as the X-Trace-Id header.
            span_id:
              type: string
              pattern: ^[0-9a-f]{16}$
              description: 16 hex chars, root span of this request.
            timestamp:
              type: string
              description: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
            duration_ms:
              type: integer
              minimum: 0
              description: Server-side wall clock.
            team_sid:
              type: string
              nullable: true
              description: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
            actor_type:
              type: string
              nullable: true
              description: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
          required:
            - trace_id
            - span_id
            - timestamp
            - duration_ms
      required:
        - success
        - operation
        - action
        - item
        - result
        - meta
