{
    "openapi": "3.1.0",
    "info": {
        "title": "Seekmodo MCP Gateway — REST API",
        "version": "1.1.0",
        "summary": "REST shim over the Seekmodo tool surface",
        "description": "Authenticated REST endpoints exposed by `mcp.seekmodo.com`.\n\nEvery authenticated request must carry `X-Seekmodo-Tenant`, `X-Seekmodo-Timestamp` (Unix seconds), and `X-Seekmodo-Signature` (HMAC-SHA256 of the raw request body with the tenant shared secret; ±5 minute replay window).\n\n**Convention:** almost every MCP tool is also `POST /v1/<tool.name>` with a JSON body matching that tool's `inputSchema` (see `GET /v1/tools`).\n\nJSON-RPC MCP lives at `POST /` — see https://seekmodo.com/docs/mcp.\n\nImplementer guides: https://seekmodo.com/docs/connectors/custom (custom connectors) and https://seekmodo.com/docs/fitment (vehicle / YMM).\n\n**Tickets:** the ticket API is a single action-dispatch endpoint on `seekmodo.com` (`POST /api/platform/tickets_api`, tag `Tickets`) that also accepts tenant API keys (`Authorization: Bearer smk_tk_...`). Outbound ticket events are under `webhooks`. Guide: https://seekmodo.com/docs/tickets.\n\nThis OpenAPI document is generated from `ToolCatalog` via `services/mcp-gateway/tools/generate_openapi.php` — re-run after adding tools.",
        "contact": {
            "name": "Seekmodo",
            "email": "support@seekmodo.com",
            "url": "https://seekmodo.com/contact"
        },
        "license": {
            "name": "Proprietary"
        }
    },
    "servers": [
        {
            "url": "https://mcp.seekmodo.com",
            "description": "Production gateway"
        },
        {
            "url": "https://dev-mcp.seekmodo.com",
            "description": "Staging / development gateway"
        }
    ],
    "security": [
        {
            "SeekmodoHmac": []
        }
    ],
    "tags": [
        {
            "name": "A/B testing"
        },
        {
            "name": "Analytics"
        },
        {
            "name": "Bot defence"
        },
        {
            "name": "Catalog"
        },
        {
            "name": "Catalog & telemetry"
        },
        {
            "name": "Commerce"
        },
        {
            "name": "ESP integrations"
        },
        {
            "name": "Fitment & vehicles"
        },
        {
            "name": "Health"
        },
        {
            "name": "Learning-to-rank"
        },
        {
            "name": "Merchandising"
        },
        {
            "name": "Other"
        },
        {
            "name": "Recommendations"
        },
        {
            "name": "Search"
        },
        {
            "name": "Shopper UX"
        },
        {
            "name": "Ticket webhooks"
        },
        {
            "name": "Tickets"
        }
    ],
    "paths": {
        "/api/platform/tickets_api": {
            "servers": [
                {
                    "url": "https://seekmodo.com",
                    "description": "Production"
                },
                {
                    "url": "https://dev.seekmodo.com",
                    "description": "Staging"
                }
            ],
            "post": {
                "tags": [
                    "Tickets"
                ],
                "summary": "Ticket API (action dispatch)",
                "description": "One endpoint for every ticket action. The body is `{\"action\": \"<name>\", ...fields}`; see `TicketApiRequest` for each action's fields and `x-required-scope`.\n\n**Auth (pick one):** a tenant API key (`Authorization: Bearer smk_tk_...` plus `X-Seekmodo-Tenant`), or the connector HMAC (`X-Seekmodo-Tenant`, `X-Seekmodo-Timestamp`, `X-Seekmodo-Signature` = hex HMAC-SHA256 of the raw body with the store's paired shared secret; timestamp within 5 minutes).\n\n**Scopes:** `tickets:read` = read actions only; `tickets:write` = reads plus replies, notes, status, assignment of yourself, participants, forwards (Chat role); `tickets:admin` = everything here (Admin role). A write with a read-only key, or an admin-only action (`merge`, `bulk_update`, `suppressions_add`, `suppressions_remove`, `macros_set`, `macros_remove`, `quarantine_reject`, `reports`) with a key that lacks `tickets:admin`, fails with `insufficient_scope` (403) before anything runs. Admin-only fields of otherwise allowed actions (closing via `update`, assigning someone else, `settings_set` fields other than `notify_email`) are checked against the actor's role and fail with `forbidden` (403). A missing or unknown `action` is `action_required` / `unknown_action` (400) for every key, whatever its scope.\n\n**Not available to API keys** (`action_not_allowed`, 403): `api_keys_*`, `webhooks_*` and `email_*` management (admin app only: `email_status`, `email_health`, `email_domain_add`, `email_domain_verify`, `email_domain_remove`, `email_sender_domain_set`, `email_inbound_method_set`, `email_send_test`, `email_receive_test`), `shopper_list`, `shopper_get`, `shopper_reply`, `csat_submit` and `inbound_email` (customer portal and inbound mail).\n\nErrors are `{\"ok\": false, \"error\": \"<code>\"}` with the HTTP status shown below. Full guide with examples: https://seekmodo.com/docs/tickets",
                "operationId": "ticketsApi",
                "security": [
                    {
                        "TicketApiKey": [],
                        "SeekmodoTenant": []
                    },
                    {
                        "SeekmodoHmac": [],
                        "SeekmodoTenant": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketApiRequest"
                            },
                            "examples": {
                                "list": {
                                    "summary": "List open tickets",
                                    "value": {
                                        "action": "list",
                                        "view": "open",
                                        "per_page": 25
                                    }
                                },
                                "reply": {
                                    "summary": "Reply and mark solved",
                                    "value": {
                                        "action": "reply",
                                        "number": 1042,
                                        "body": "Your replacement ships today.",
                                        "status_after": "solved",
                                        "acting_agent": {
                                            "email": "ada@example.com"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Action succeeded (`ok: true`).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketApiResult"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request: `invalid_json`, `action_required`, `unknown_action`, or a validation / state code, for example `body_required`, `body_too_long`, `invalid_requester_email`, `invalid_email`, `invalid_cc_email` (with `email`), `email_required`, `already_requester`, `unknown_agent` (with `agent_ids`), `ticket_closed`, `ticket_merged`, `ticket_quarantined`, `not_quarantined`, `merge_into_self`, `numbers_required`, `invalid_attachment`, `too_many_attachments`, `attachment_too_large`, `blocked_attachment_type` (with `filename`), `too_many_recipients`, `thread_limit`, `thread_required`, `invalid_chat_ref`, `transcript_required`, `title_required`, `id_required`, `portal_domain_required`, `portal_domain_not_under_verified_apex`, `portal_cname_missing`, or a mail outcome such as `mail_suppressed` / `ticket_email_quota`. Lookups other than tickets and chats also answer 400, not 404: `attachment_not_found`, `thread_not_found`, `quote_not_found`, `macro_not_found`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Not authenticated: `tenant_required`, `invalid_api_key`, `api_key_revoked`, `api_key_expired`, `missing_timestamp`, `timestamp_out_of_window`, `bad_signature_format`, `signature_mismatch`, or `actor_required` (a write with no usable actor).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Not allowed: `insufficient_scope` (the key's scope does not cover the action, including admin-only actions without `tickets:admin`), `action_not_allowed` (management, portal and inbound-mail actions), `forbidden` (the actor's role is too low for this action or field), or `actor_not_member` (`acting_agent` is not on the store's team; API keys and MCP calls).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "`ticket_not_found` or `chat_not_found`. These are the only 404s; other `*_not_found` codes are 400.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "413": {
                        "description": "`payload_too_large` (body over 8,000,000 characters).",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "`internal_error`.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "502": {
                        "description": "`mail_failed` or `mail_not_configured`: a reply or forward is not saved when its email could not be sent.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    },
                    "503": {
                        "description": "`not_paired` (HMAC only): the store has no paired shared secret.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TicketError"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/ab.archive": {
            "post": {
                "tags": [
                    "A/B testing"
                ],
                "summary": "ab.archive",
                "description": "Archive an experiment without promoting any variant. Mutating.",
                "operationId": "call_ab_archive",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "experiment_id": {
                                        "type": "string",
                                        "pattern": "^exp_[a-f0-9]{1,16}$"
                                    }
                                },
                                "required": [
                                    "experiment_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ab.create": {
            "post": {
                "tags": [
                    "A/B testing"
                ],
                "summary": "ab.create",
                "description": "Create a new A/B experiment with at least two variants. Mutating.",
                "operationId": "call_ab_create",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "minLength": 2,
                                        "maxLength": 128
                                    },
                                    "hypothesis": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 1024
                                    },
                                    "metric": {
                                        "type": "string",
                                        "enum": [
                                            "ctr",
                                            "conversion",
                                            "zero_results"
                                        ],
                                        "default": "ctr"
                                    },
                                    "variants": {
                                        "type": "array",
                                        "minItems": 2,
                                        "maxItems": 8,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$"
                                                },
                                                "label": {
                                                    "type": "string",
                                                    "maxLength": 64
                                                },
                                                "weight": {
                                                    "type": "integer",
                                                    "minimum": 1,
                                                    "maximum": 99
                                                },
                                                "params": {
                                                    "type": "object"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "weight"
                                            ]
                                        }
                                    },
                                    "start": {
                                        "type": "boolean",
                                        "default": false
                                    },
                                    "auto_manage": {
                                        "type": "boolean",
                                        "default": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "variants"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ab.list": {
            "post": {
                "tags": [
                    "A/B testing"
                ],
                "summary": "ab.list",
                "description": "List A/B experiments for the tenant.",
                "operationId": "call_ab_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "running",
                                            "promoted",
                                            "archived"
                                        ]
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ab.promote": {
            "post": {
                "tags": [
                    "A/B testing"
                ],
                "summary": "ab.promote",
                "description": "Promote a winning variant of a running A/B experiment. Mutating.",
                "operationId": "call_ab_promote",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "experiment_id": {
                                        "type": "string",
                                        "pattern": "^exp_[a-f0-9]{1,16}$"
                                    },
                                    "variant_id": {
                                        "type": "string",
                                        "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$"
                                    }
                                },
                                "required": [
                                    "experiment_id",
                                    "variant_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ab.results": {
            "post": {
                "tags": [
                    "A/B testing"
                ],
                "summary": "ab.results",
                "description": "Per-variant impression / click / CTR rollup for an experiment.",
                "operationId": "call_ab_results",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "experiment_id": {
                                        "type": "string",
                                        "pattern": "^exp_[a-f0-9]{1,16}$"
                                    },
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "24h",
                                            "7d",
                                            "14d",
                                            "30d"
                                        ],
                                        "default": "14d"
                                    }
                                },
                                "required": [
                                    "experiment_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.click_pain": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.click_pain",
                "description": "High-volume queries with deep average click position (>=5). Highest-leverage pin / reranker candidates.",
                "operationId": "call_analytics_click_pain",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 200
                                    },
                                    "pain_threshold": {
                                        "type": "number",
                                        "minimum": 1,
                                        "maximum": 50
                                    },
                                    "min_volume": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 1000
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.conversion_funnel": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.conversion_funnel",
                "description": "Daily funnel (searches -> clicks -> add_to_carts -> purchases) plus session-scoped conversion rates.",
                "operationId": "call_analytics_conversion_funnel",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "currency": {
                                        "type": "string",
                                        "maxLength": 3
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.ctr_trend": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.ctr_trend",
                "description": "Daily CTR over a rolling window — aggregate (default) or per top-N keyword.",
                "operationId": "call_analytics_ctr_trend",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "top_n": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 100
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.latency": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.latency",
                "description": "Per-tenant search latency (p50, p95) and fallback rate over a rolling window for the operator health card.",
                "operationId": "call_analytics_latency",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "1h",
                                            "6h",
                                            "24h",
                                            "7d"
                                        ]
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.revenue_by_query": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.revenue_by_query",
                "description": "Per-keyword revenue + order count for a rolling window, under a chosen attribution model.",
                "operationId": "call_analytics_revenue_by_query",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "attribution": {
                                        "type": "string",
                                        "enum": [
                                            "last_touch",
                                            "first_touch",
                                            "linear"
                                        ]
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 200
                                    },
                                    "currency": {
                                        "type": "string",
                                        "maxLength": 3
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.search_types": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.search_types",
                "description": "Search volume breakdown by type (keyword, vehicle/YMM, hybrid) for a rolling window.",
                "operationId": "call_analytics_search_types",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.top_clicked_products": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.top_clicked_products",
                "description": "Most-clicked products with click counts and top driving keywords for a rolling window.",
                "operationId": "call_analytics_top_clicked_products",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.top_queries": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.top_queries",
                "description": "Most-searched keywords with CTR and avg result count for a rolling window.",
                "operationId": "call_analytics_top_queries",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 200
                                    },
                                    "search_type": {
                                        "type": "string",
                                        "enum": [
                                            "all",
                                            "keyword",
                                            "vehicle",
                                            "hybrid"
                                        ],
                                        "description": "Filter by search intent. Default keyword (text SERP only)."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.weekly_digest": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.weekly_digest",
                "description": "Weekly search digest JSON for email reports (KPIs, keywords, products, zero-results, funnel, latency).",
                "operationId": "call_analytics_weekly_digest",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "week_start": {
                                        "type": "string",
                                        "description": "ISO date YYYY-MM-DD (UTC Monday). Defaults to last complete week."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/analytics.zero_results": {
            "post": {
                "tags": [
                    "Analytics"
                ],
                "summary": "analytics.zero_results",
                "description": "Search queries that returned zero results.",
                "operationId": "call_analytics_zero_results",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "window": {
                                        "type": "string",
                                        "enum": [
                                            "7d",
                                            "30d",
                                            "90d",
                                            "180d",
                                            "365d"
                                        ]
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 200
                                    },
                                    "search_type": {
                                        "type": "string",
                                        "enum": [
                                            "all",
                                            "keyword",
                                            "vehicle",
                                            "hybrid"
                                        ],
                                        "description": "Filter by search intent. Default keyword (text SERP only)."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ask": {
            "post": {
                "tags": [
                    "Search"
                ],
                "summary": "ask",
                "description": "Single-turn Ask AI over the tenant catalog and policy docs. Bounded search + catalog.get loop with cited answers.",
                "operationId": "call_ask",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "query": {
                                        "type": "string",
                                        "description": "Shopper question."
                                    },
                                    "context": {
                                        "type": "object",
                                        "properties": {
                                            "page_url": {
                                                "type": "string"
                                            },
                                            "product_id": {
                                                "type": "string"
                                            }
                                        },
                                        "additionalProperties": true
                                    },
                                    "max_tool_calls": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 10
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "shopper_context": {
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "query"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/banners.list": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "banners.list",
                "description": "List banner merchandising rules for the tenant.",
                "operationId": "call_banners_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "active",
                                            "expired",
                                            "disabled"
                                        ],
                                        "description": "Optional status filter; defaults to all."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/banners.remove": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "banners.remove",
                "description": "Delete a banner merchandising rule by id. Mutating.",
                "operationId": "call_banners_remove",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/banners.set": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "banners.set",
                "description": "Create or update a banner merchandising rule. Mutating.",
                "operationId": "call_banners_set",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "html": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "position": {
                                        "type": "string",
                                        "enum": [
                                            "top",
                                            "inline_after_n",
                                            "sidebar"
                                        ]
                                    },
                                    "n": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                    },
                                    "scope": {
                                        "type": "string",
                                        "enum": [
                                            "query",
                                            "category",
                                            "global"
                                        ]
                                    },
                                    "scope_value": {
                                        "type": "string"
                                    },
                                    "match_mode": {
                                        "type": "string",
                                        "enum": [
                                            "exact",
                                            "contains"
                                        ]
                                    },
                                    "audience_segment_id": {
                                        "type": "string"
                                    },
                                    "effective_from": {
                                        "type": "string"
                                    },
                                    "effective_to": {
                                        "type": "string"
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 65535
                                    },
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "active",
                                            "expired",
                                            "disabled"
                                        ]
                                    },
                                    "region_id": {
                                        "type": "string",
                                        "description": "Sprint 9 — banner only fires when the resolved region matches this id. Omit to apply to all regions."
                                    }
                                },
                                "required": [
                                    "html",
                                    "position",
                                    "scope"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/bot.classify": {
            "post": {
                "tags": [
                    "Bot defence"
                ],
                "summary": "bot.classify",
                "description": "Classify a request triple (UA + IP + session) as bot or human; returns bot_score 0..100 + reasons + signal breakdown.",
                "operationId": "call_bot_classify",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "event": {
                                        "type": "string",
                                        "enum": [
                                            "impression",
                                            "click"
                                        ]
                                    },
                                    "product_id": {
                                        "type": "integer",
                                        "minimum": 1
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/bot.health": {
            "post": {
                "tags": [
                    "Bot defence"
                ],
                "summary": "bot.health",
                "description": "Bot-check inline classifier health: 5-min classify volume (inline vs http), nonce issue/verify rates, 24h shadow AGREE-rate.",
                "operationId": "call_bot_health",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/bot_check.status": {
            "post": {
                "tags": [
                    "Bot defence"
                ],
                "summary": "bot_check.status",
                "description": "Per-tenant bot-check status: enrollment, last activity, and 24-hour bot-blocked counts.",
                "operationId": "call_bot_check_status",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/bundle.suggest": {
            "post": {
                "tags": [
                    "Recommendations"
                ],
                "summary": "bundle.suggest",
                "description": "Anchor-based \"complete the kit\" bundle composer using co_purchase + diversity bias.",
                "operationId": "call_bundle_suggest",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "anchor_doc_id": {
                                        "type": "string",
                                        "description": "Anchor product id to compose bundles around."
                                    },
                                    "bundle_size": {
                                        "type": "integer",
                                        "minimum": 2,
                                        "maximum": 5,
                                        "description": "Items per bundle (including anchor)."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "anchor_doc_id"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/catalog.get": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "catalog.get",
                "description": "Fetch a single indexed catalog document by id or sku with rich default fields.",
                "operationId": "call_catalog_get",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Typesense document id."
                                    },
                                    "sku": {
                                        "type": "string",
                                        "description": "SKU lookup via filter_by."
                                    },
                                    "include_fields": {
                                        "type": "string",
                                        "description": "Optional Typesense include_fields override."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/catalog.prune": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "catalog.prune",
                "description": "Delete commerce catalog documents whose last_indexed_at is strictly older than the supplied cutoff. Called after a successful full index run so hard-deleted or otherwise absent products stop appearing in suggest/typeahead. Mutating.",
                "operationId": "call_catalog_prune",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "cutoff_epoch": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "description": "Unix epoch seconds captured at the start of the connector full index run. Docs with last_indexed_at < cutoff_epoch are evicted."
                                    },
                                    "cutoff_utc": {
                                        "type": "string",
                                        "minLength": 10,
                                        "maxLength": 40,
                                        "description": "UTC cutoff as YYYY-MM-DD HH:MM:SS or ISO-8601. Alternative to cutoff_epoch."
                                    },
                                    "max_deletes": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 2000,
                                        "description": "Cap deletes per call; resume with page when has_more=true."
                                    },
                                    "page": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "description": "Typesense search page when resuming a capped run."
                                    },
                                    "active_count": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "description": "Optional connector-reported active product count for drift logging."
                                    },
                                    "force": {
                                        "type": "boolean",
                                        "description": "Bypass the incomplete-full-index safety gate. Default false."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/catalog.stats": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "catalog.stats",
                "description": "Corpus size, schema fingerprint, top-K category breadcrumbs. Read-mostly catalog metadata.",
                "operationId": "call_catalog_stats",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "top_categories": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 50
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/chat": {
            "post": {
                "tags": [
                    "Shopper UX"
                ],
                "summary": "chat",
                "description": "Conversational shopper assistant. Runs an LLM-driven loop that issues sub-tool calls (search, suggest, recommend) and returns a cited natural-language answer.",
                "operationId": "call_chat",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mode": {
                                        "type": "string",
                                        "enum": [
                                            "chat",
                                            "quiz"
                                        ],
                                        "description": "Runtime mode. \"chat\" runs the LLM agent loop (default). \"quiz\" runs the deterministic shopping-quiz scorer."
                                    },
                                    "quiz_id": {
                                        "type": "string"
                                    },
                                    "quiz_slug": {
                                        "type": "string"
                                    },
                                    "answers": {
                                        "type": "object",
                                        "description": "Map of question_id -> selected option value (single-type) or list of values (multi-type). Required when mode=quiz."
                                    },
                                    "messages": {
                                        "type": "array",
                                        "description": "Conversation so far. Each item is { role: \"user\" | \"assistant\", content: string }.",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "role": {
                                                    "type": "string",
                                                    "enum": [
                                                        "user",
                                                        "assistant"
                                                    ]
                                                },
                                                "content": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "role",
                                                "content"
                                            ]
                                        }
                                    },
                                    "shopper_context": {
                                        "type": "object",
                                        "description": "Optional shopper-context envelope (customer_id, country, currency, …). Passed through to sub-tool calls verbatim."
                                    },
                                    "shopper": {
                                        "type": "object",
                                        "description": "Attested logged-in shopper from the storefront proxy (customers_id, email, first_name, last_name, ts). Requires shopper_sig."
                                    },
                                    "shopper_sig": {
                                        "type": "string",
                                        "description": "HMAC-SHA256 of the shopper payload with the tenant shared secret."
                                    },
                                    "max_tool_calls": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 20,
                                        "description": "Per-turn ceiling on sub-tool calls. Gateway clamps to its own ceiling."
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "contact_url": {
                                        "type": "string",
                                        "description": "Storefront contact page URL. When set, an answer that cannot be completed from tools includes this link."
                                    }
                                },
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/chat.analyze_ticket": {
            "post": {
                "tags": [
                    "Shopper UX"
                ],
                "summary": "chat.analyze_ticket",
                "description": "Run ticket-resolved FAQ analysis on Seekmodo's model and bill one chat_turns unit. Store cron use when BYOK is absent. Mutating.",
                "operationId": "call_chat_analyze_ticket",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "system": {
                                        "type": "string"
                                    },
                                    "transcript": {
                                        "type": "string"
                                    },
                                    "chat_id": {
                                        "type": "integer"
                                    },
                                    "session_id": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "system",
                                    "transcript"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/chat.mcp_call": {
            "post": {
                "tags": [
                    "Shopper UX"
                ],
                "summary": "chat.mcp_call",
                "description": "Call one extra MCP tool registered for this store shopper chat.",
                "operationId": "call_chat_mcp_call",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tool": {
                                        "type": "string",
                                        "description": "Tool id from chat.mcp_catalog, such as orders::lookup."
                                    },
                                    "args": {
                                        "type": "object",
                                        "description": "Arguments for that tool."
                                    }
                                },
                                "required": [
                                    "tool"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/chat.mcp_catalog": {
            "post": {
                "tags": [
                    "Shopper UX"
                ],
                "summary": "chat.mcp_catalog",
                "description": "List extra MCP tools this store registered for the shopper chatbot.",
                "operationId": "call_chat_mcp_catalog",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {}
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/chat.mirror": {
            "post": {
                "tags": [
                    "Shopper UX"
                ],
                "summary": "chat.mirror",
                "description": "Store one shopper/assistant turn that the connector already produced. Does not run the model and does not close the thread. Mutating.",
                "operationId": "call_chat_mirror",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "user_message": {
                                        "type": "string"
                                    },
                                    "assistant_message": {
                                        "type": "string"
                                    },
                                    "customers_id": {
                                        "type": "integer"
                                    },
                                    "email": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "session_id",
                                    "user_message",
                                    "assistant_message"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/commerce.boost_by_stock": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "commerce.boost_by_stock",
                "description": "Set stock_ranking_policy=demote_all_oos via tenant.config.set. Mutating.",
                "operationId": "call_commerce_boost_by_stock",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/commerce.exclude_out_of_stock": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "commerce.exclude_out_of_stock",
                "description": "Set stock_ranking_policy=exclude_all_oos via tenant.config.set. Mutating.",
                "operationId": "call_commerce_exclude_out_of_stock",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/commerce.promotions.list": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "commerce.promotions.list",
                "description": "List active commerce promotions. Unavailable on commerce/Growth representative plan (plan or vertical gated). Stub — returns 501 until implemented.",
                "operationId": "call_commerce_promotions_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/deboosts.list": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "deboosts.list",
                "description": "List deboost merchandising rules for the tenant.",
                "operationId": "call_deboosts_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "active",
                                            "expired",
                                            "disabled"
                                        ],
                                        "description": "Optional status filter; defaults to all."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/deboosts.remove": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "deboosts.remove",
                "description": "Delete a deboost merchandising rule by id. Mutating.",
                "operationId": "call_deboosts_remove",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/deboosts.set": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "deboosts.set",
                "description": "Create or update a deboost merchandising rule. Mutating.",
                "operationId": "call_deboosts_set",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "doc_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "minLength": 1,
                                            "maxLength": 128
                                        },
                                        "minItems": 1,
                                        "maxItems": 100
                                    },
                                    "factor": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                    },
                                    "scope": {
                                        "type": "string",
                                        "enum": [
                                            "query",
                                            "category",
                                            "global"
                                        ]
                                    },
                                    "scope_value": {
                                        "type": "string"
                                    },
                                    "match_mode": {
                                        "type": "string",
                                        "enum": [
                                            "exact",
                                            "contains"
                                        ]
                                    },
                                    "audience_segment_id": {
                                        "type": "string"
                                    },
                                    "effective_from": {
                                        "type": "string"
                                    },
                                    "effective_to": {
                                        "type": "string"
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 65535
                                    },
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "active",
                                            "expired",
                                            "disabled"
                                        ]
                                    },
                                    "region_id": {
                                        "type": "string",
                                        "description": "Sprint 9 — deboost only fires when the resolved region matches this id. Omit to apply to all regions."
                                    }
                                },
                                "required": [
                                    "doc_ids",
                                    "factor",
                                    "scope"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/esp.dlq_recent": {
            "post": {
                "tags": [
                    "ESP integrations"
                ],
                "summary": "esp.dlq_recent",
                "description": "Recent ESP DLQ rows for the admin failure-visibility surface.",
                "operationId": "call_esp_dlq_recent",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 200
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/esp.test_event": {
            "post": {
                "tags": [
                    "ESP integrations"
                ],
                "summary": "esp.test_event",
                "description": "Fire a synthetic event at the configured ESP and return the provider verdict synchronously. Mutating.",
                "operationId": "call_esp_test_event",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "test_email": {
                                        "type": "string",
                                        "description": "Email to attach to the test event (e.g. operator@tenant.com). Required for Mailchimp / Klaviyo identification."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/events": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "events",
                "description": "Record search / click / impression events for analytics, LTR training, and bot-check verdict tagging. Mutating.",
                "operationId": "call_events",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "events": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "event_type": {
                                                    "type": "string",
                                                    "enum": [
                                                        "search",
                                                        "click",
                                                        "impression",
                                                        "add_to_cart",
                                                        "purchase",
                                                        "image_broken"
                                                    ]
                                                },
                                                "session_id": {
                                                    "type": "string"
                                                },
                                                "keyword": {
                                                    "type": "string"
                                                },
                                                "product_id": {
                                                    "type": "integer"
                                                },
                                                "position": {
                                                    "type": "integer"
                                                },
                                                "result_count": {
                                                    "type": "integer"
                                                },
                                                "ua": {
                                                    "type": "string"
                                                },
                                                "ip": {
                                                    "type": "string"
                                                },
                                                "referer": {
                                                    "type": "string"
                                                },
                                                "nonce": {
                                                    "type": "string"
                                                },
                                                "search_event_id": {
                                                    "type": "integer"
                                                },
                                                "filter_by": {
                                                    "type": "string"
                                                },
                                                "filters": {
                                                    "type": "object"
                                                },
                                                "latency_ms": {
                                                    "type": "integer"
                                                },
                                                "fallback_used": {
                                                    "type": "boolean"
                                                },
                                                "qty": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "price_cents": {
                                                    "type": "integer"
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "maxLength": 3
                                                },
                                                "order_id": {
                                                    "type": "string",
                                                    "maxLength": 128
                                                },
                                                "extra": {
                                                    "type": "object"
                                                },
                                                "shopper_context": {
                                                    "type": "object"
                                                }
                                            },
                                            "required": [
                                                "event_type"
                                            ]
                                        },
                                        "maxItems": 200
                                    },
                                    "shopper_context": {
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "events"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.assignments.bulk_upsert": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.assignments.bulk_upsert",
                "description": "Bulk-upsert per-tenant product fitment assignments against central seekmodo_vehicle_id values. Mutating.",
                "operationId": "call_fitment_assignments_bulk_upsert",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rows": {
                                        "type": "array",
                                        "maxItems": 1000,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "product_id": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "seekmodo_vehicle_id": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "engine_trans_code": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "source": {
                                                    "type": "string"
                                                },
                                                "deleted": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "product_id",
                                                "seekmodo_vehicle_id"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "rows"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.assignments.changes": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.assignments.changes",
                "description": "Return per-tenant fitment assignment rows changed since updated_since (ISO-8601).",
                "operationId": "call_fitment_assignments_changes",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "updated_since": {
                                        "type": "string"
                                    },
                                    "cursor": {
                                        "type": "string"
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 1000
                                    }
                                },
                                "required": [
                                    "updated_since"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.coverage": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.coverage",
                "description": "Coverage aggregates over numinix_mcp_vehicle_taxonomy for the tenant.",
                "operationId": "call_fitment_coverage",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stale_hours": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 720
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.import.csv": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.import.csv",
                "description": "Import fitment assignments from CSV text. Resolves YMM to central catalog (auto-creates merchant_import vehicles when missing). Mutating.",
                "operationId": "call_fitment_import_csv",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "csv": {
                                        "type": "string",
                                        "description": "Raw CSV body with header row."
                                    },
                                    "product_id_map": {
                                        "type": "object",
                                        "description": "Map of sku => platform product_id (resolved by connector/admin).",
                                        "additionalProperties": {
                                            "type": "integer"
                                        }
                                    },
                                    "default_source": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "csv",
                                    "product_id_map"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.orphans": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.orphans",
                "description": "Vehicles with zero fitted products (product_count=0) for the tenant.",
                "operationId": "call_fitment_orphans",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500
                                    },
                                    "freshness_floor_hours": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 720
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.overrides.list": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.overrides.list",
                "description": "Paginated list of per-tenant fitment overrides (operator-set add/remove rules layered on top of the AutoPro fitment graph).",
                "operationId": "call_fitment_overrides_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "page": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "per_page": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500
                                    },
                                    "product_id": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "description": "Optional product_id filter for the connector pull path."
                                    },
                                    "since": {
                                        "type": "string",
                                        "description": "Optional ISO-8601 lower bound on created_at (>=). Used by the connector for incremental pulls."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/fitment.resolve": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "fitment.resolve",
                "description": "Resolve a (year, make, model) triple against the per-tenant vehicle taxonomy projection into a concrete vehicle_id + canonical label. Returns null when no row matches.",
                "operationId": "call_fitment_resolve",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "year": {
                                        "type": "integer",
                                        "minimum": 1900,
                                        "maximum": 2100,
                                        "description": "Four-digit model year, e.g. 2019."
                                    },
                                    "make": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120,
                                        "description": "Make name, case-insensitive (\"honda\" matches \"Honda\")."
                                    },
                                    "model": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120,
                                        "description": "Model name, case-insensitive."
                                    }
                                },
                                "required": [
                                    "year",
                                    "make",
                                    "model"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/health": {
            "get": {
                "tags": [
                    "Health"
                ],
                "summary": "Build info + liveness",
                "operationId": "getHealth",
                "security": [],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Health"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/index": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "index",
                "description": "Bulk upsert documents into the tenant's Typesense collection. Mirrors the documents/import wire shape. Mutating.",
                "operationId": "call_index",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "kind": {
                                        "type": "string",
                                        "enum": [
                                            "product",
                                            "policy"
                                        ],
                                        "default": "product"
                                    },
                                    "action": {
                                        "type": "string",
                                        "enum": [
                                            "create",
                                            "upsert",
                                            "emplace",
                                            "update"
                                        ],
                                        "default": "upsert"
                                    },
                                    "documents": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "additionalProperties": true
                                        },
                                        "maxItems": 1000
                                    },
                                    "docs": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "additionalProperties": true
                                        },
                                        "maxItems": 1000
                                    },
                                    "collection": {
                                        "type": "string",
                                        "description": "Informational; gateway routes by tenant.vertical regardless. Accepted for connector back-compat."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.config.set": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.config.set",
                "description": "Patch per-tenant LTR settings (management, mode, ab_ramp_pct, etc). Mutating.",
                "operationId": "call_ltr_config_set",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean"
                                    },
                                    "management": {
                                        "type": "string",
                                        "enum": [
                                            "off",
                                            "auto",
                                            "shadow"
                                        ],
                                        "description": "LTR posture: off | auto (HealthMonitor) | shadow (sticky park)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "enum": [
                                            "off",
                                            "shadow",
                                            "ab",
                                            "on"
                                        ]
                                    },
                                    "ab_ramp_pct": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 95
                                    },
                                    "ndcg_floor_pct": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 100
                                    },
                                    "min_clicks": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 100000
                                    },
                                    "vertical_extractor": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            null,
                                            "commerce",
                                            "content"
                                        ]
                                    },
                                    "ips_correction": {
                                        "type": "boolean"
                                    },
                                    "accept_binary_labels": {
                                        "type": "boolean",
                                        "description": "Allow training when max grade is click-only (1); for low-volume tenants"
                                    },
                                    "training_labels_after": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Only harvest engagement rows on/after this UTC datetime (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS). Null clears."
                                    },
                                    "training_graded_labels_before": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Ignore add_to_cart/purchase grades on/after this UTC datetime (clicks still count). Null clears."
                                    },
                                    "training_require_click_before_graded": {
                                        "type": "boolean",
                                        "description": "Require a preceding same-search+product click before ATC/purchase can upgrade the label."
                                    },
                                    "training_clicks_only": {
                                        "type": "boolean"
                                    },
                                    "commerce_feature_version": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 1,
                                        "maximum": 99
                                    },
                                    "ltr_max_rank_displacement": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 60,
                                        "description": "Cap how far LTR may move a doc from its lexical rank (0/null=off)."
                                    },
                                    "lambdamart_min_linked_clicks": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 100,
                                        "maximum": 100000
                                    },
                                    "shadow_pinned_until": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "last_promoted_at_reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 40
                                    },
                                    "personalization_enabled": {
                                        "type": "boolean"
                                    },
                                    "personalization_retention_days": {
                                        "type": "integer",
                                        "minimum": 30,
                                        "maximum": 365
                                    },
                                    "lambdamart_train_params": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "description": "Optional LightGBM overrides: num_rounds, max_depth, eta, holdout_ratio."
                                    },
                                    "optimizer_enabled": {
                                        "type": "boolean",
                                        "description": "Allow LTR AI optimizer propose/apply for this tenant."
                                    },
                                    "optimizer_auto_apply": {
                                        "type": "boolean",
                                        "description": "Fleet cron may auto-apply allowlisted proposals (Growth+ after online win)."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.diagnostics": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.diagnostics",
                "description": "Snapshot of LTR pipeline health: scorer reachability, linked-click coverage, filter diversity, AGREE-rate, arm CTR.",
                "operationId": "call_ltr_diagnostics",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "lookback_hours": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 720,
                                        "default": 336
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.model.rollback": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.model.rollback",
                "description": "Operator action: roll the tenant back to a previously trained LTR model. Requires a free-text reason. Mutating.",
                "operationId": "call_ltr_model_rollback",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "model_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 32
                                    },
                                    "reason": {
                                        "type": "string",
                                        "minLength": 4,
                                        "maxLength": 512
                                    }
                                },
                                "required": [
                                    "model_id",
                                    "reason"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.retrain": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.retrain",
                "description": "Force-retrain the LTR model now. Returns the new model summary. Mutating.",
                "operationId": "call_ltr_retrain",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.shadow_deltas": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.shadow_deltas",
                "description": "List recent shadow-mode disagreements between LambdaMART and the served top-1 for operator gut-check.",
                "operationId": "call_ltr_shadow_deltas",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 200,
                                        "default": 50
                                    },
                                    "lookback_hours": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 720,
                                        "default": 168
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.shadow_feedback": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.shadow_feedback",
                "description": "Record operator gut-check (thumbs up/down) on a shadow-mode LambdaMART disagreement. Mutating.",
                "operationId": "call_ltr_shadow_feedback",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "search_event_id",
                                    "judgement"
                                ],
                                "properties": {
                                    "search_event_id": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "judgement": {
                                        "type": "integer",
                                        "enum": [
                                            -1,
                                            0,
                                            1
                                        ]
                                    },
                                    "reranker_top_pid": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "lambdamart_top_pid": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "operator_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 64
                                    },
                                    "operator_note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 512
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.status": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.status",
                "description": "Read LTR settings, the active model summary, and recent training runs.",
                "operationId": "call_ltr_status",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "history_limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50,
                                        "default": 10
                                    },
                                    "history_offset": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 10000,
                                        "default": 0
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/ltr.toggle": {
            "post": {
                "tags": [
                    "Learning-to-rank"
                ],
                "summary": "ltr.toggle",
                "description": "Toggle Learning-to-Rank on or off for the tenant. Mutating.",
                "operationId": "call_ltr_toggle",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "enabled"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/nonce.issue": {
            "post": {
                "tags": [
                    "Bot defence"
                ],
                "summary": "nonce.issue",
                "description": "Issue an HMAC nonce for the SERP click-beacon flow.",
                "operationId": "call_nonce_issue",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "session_id",
                                    "keyword"
                                ],
                                "properties": {
                                    "session_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                    },
                                    "keyword": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/nonce.verify": {
            "post": {
                "tags": [
                    "Bot defence"
                ],
                "summary": "nonce.verify",
                "description": "Verify an HMAC nonce for the SERP click-beacon flow; returns valid bool + age + reason.",
                "operationId": "call_nonce_verify",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "session_id",
                                    "keyword",
                                    "nonce"
                                ],
                                "properties": {
                                    "session_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                    },
                                    "keyword": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                    },
                                    "nonce": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/pins.landscape": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "pins.landscape",
                "description": "Snapshot of active pin rules with priority, schedule, audience, and metadata.",
                "operationId": "call_pins_landscape",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "include_inactive": {
                                        "type": "boolean"
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/pins.list": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "pins.list",
                "description": "Read editorial pins for the tenant.",
                "operationId": "call_pins_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/pins.remove": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "pins.remove",
                "description": "Delete a pin entry by id. Mutating.",
                "operationId": "call_pins_remove",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "If true, validate + preview the change without applying. Default false. The response contains a `would_*` key with the planned shape; re-call without dry_run to apply."
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/pins.set": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "pins.set",
                "description": "Pin or exclude documents for a specific query. Mutating.",
                "operationId": "call_pins_set",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Optional stable id. Defaults to rule_<16 hex>."
                                    },
                                    "query": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                    },
                                    "pinned_doc_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "minLength": 1
                                        },
                                        "minItems": 0,
                                        "maxItems": 50
                                    },
                                    "excluded_doc_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "minLength": 1
                                        },
                                        "maxItems": 50
                                    },
                                    "match": {
                                        "type": "string",
                                        "enum": [
                                            "exact",
                                            "contains"
                                        ],
                                        "description": "How the query should be matched. Defaults to exact."
                                    },
                                    "region_id": {
                                        "type": "string",
                                        "description": "Sprint 9 — pin only fires when the resolved region matches this id. Omit to apply to all regions."
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "If true, validate + preview the change without applying. Default false. The response contains a `would_*` key with the planned shape; re-call without dry_run to apply."
                                    }
                                },
                                "required": [
                                    "query"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/policy.delete": {
            "post": {
                "tags": [
                    "Other"
                ],
                "summary": "policy.delete",
                "description": "Delete one manual policy article. Compiled articles cannot be deleted here. Mutating.",
                "operationId": "call_policy_delete",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/policy.list": {
            "post": {
                "tags": [
                    "Other"
                ],
                "summary": "policy.list",
                "description": "List policy articles for this tenant. Compiled Lexmodo articles are marked read-only.",
                "operationId": "call_policy_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "page": {
                                        "type": "integer",
                                        "minimum": 1
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/policy.prune_compiled": {
            "post": {
                "tags": [
                    "Other"
                ],
                "summary": "policy.prune_compiled",
                "description": "Delete compiled policy articles that disappeared from a successful Lexmodo compile. Manual articles are kept. Mutating.",
                "operationId": "call_policy_prune_compiled",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "keep_ids": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "prefixes": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "keep_ids",
                                    "prefixes"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/policy.search": {
            "post": {
                "tags": [
                    "Other"
                ],
                "summary": "policy.search",
                "description": "Search this tenant's policy / FAQ articles (the chat policy-RAG retrieval, no LLM). Returns matching articles with a short excerpt.",
                "operationId": "call_policy_search",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "q": {
                                        "type": "string",
                                        "description": "Question or ticket text to match."
                                    },
                                    "per_page": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5
                                    }
                                },
                                "required": [
                                    "q"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/recommend.also_bought": {
            "post": {
                "tags": [
                    "Recommendations"
                ],
                "summary": "recommend.also_bought",
                "description": "Anchor-anchored frequently-bought-together recommendations from co-purchase signal with lexical fallback.",
                "operationId": "call_recommend_also_bought",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "anchor_doc_id": {
                                        "type": "string",
                                        "description": "Source product id to base recommendations on."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "shopper_context": {
                                        "type": "object"
                                    },
                                    "filter_by": {
                                        "type": "string",
                                        "maxLength": 512,
                                        "description": "Typesense filter_by clause AND-ed onto the doc-id hydrate predicate."
                                    }
                                },
                                "required": [
                                    "anchor_doc_id"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/recommend.also_viewed": {
            "post": {
                "tags": [
                    "Recommendations"
                ],
                "summary": "recommend.also_viewed",
                "description": "Anchor-anchored also-viewed recommendations from broad same-session signal with lexical fallback.",
                "operationId": "call_recommend_also_viewed",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "anchor_doc_id": {
                                        "type": "string",
                                        "description": "Source product id to base recommendations on."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "shopper_context": {
                                        "type": "object"
                                    },
                                    "filter_by": {
                                        "type": "string",
                                        "maxLength": 512,
                                        "description": "Typesense filter_by clause AND-ed onto the doc-id hydrate predicate."
                                    }
                                },
                                "required": [
                                    "anchor_doc_id"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/recommend.related": {
            "post": {
                "tags": [
                    "Recommendations"
                ],
                "summary": "recommend.related",
                "description": "Anchor-anchored related-products recommendations from co-view signal with lexical fallback.",
                "operationId": "call_recommend_related",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "anchor_doc_id": {
                                        "type": "string",
                                        "description": "Source product id to base recommendations on."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "shopper_context": {
                                        "type": "object"
                                    },
                                    "filter_by": {
                                        "type": "string",
                                        "maxLength": 512,
                                        "description": "Typesense filter_by clause AND-ed onto the doc-id hydrate predicate."
                                    }
                                },
                                "required": [
                                    "anchor_doc_id"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/recommend.trending": {
            "post": {
                "tags": [
                    "Recommendations"
                ],
                "summary": "recommend.trending",
                "description": "Non-anchored trending products recommendation (last-30-day co-occurrence aggregation).",
                "operationId": "call_recommend_trending",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "filter_by": {
                                        "type": "string",
                                        "maxLength": 512,
                                        "description": "Typesense filter_by clause AND-ed onto the doc-id hydrate predicate."
                                    }
                                },
                                "required": [],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/redirects.list": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "redirects.list",
                "description": "List keyword redirect merchandising rules for the tenant.",
                "operationId": "call_redirects_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "active",
                                            "expired",
                                            "disabled"
                                        ]
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/redirects.propose": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "redirects.propose",
                "description": "Propose keyword redirect rules from search telemetry (dry-run only).",
                "operationId": "call_redirects_propose",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 90
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 50
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/redirects.remove": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "redirects.remove",
                "description": "Delete a keyword redirect merchandising rule by id. Mutating.",
                "operationId": "call_redirects_remove",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/redirects.set": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "redirects.set",
                "description": "Create or update a keyword redirect merchandising rule. Mutating.",
                "operationId": "call_redirects_set",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string"
                                    },
                                    "target_url": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "terms": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "minLength": 1
                                        },
                                        "minItems": 1
                                    },
                                    "label": {
                                        "type": "string"
                                    },
                                    "scope": {
                                        "type": "string",
                                        "enum": [
                                            "query",
                                            "global"
                                        ]
                                    },
                                    "scope_value": {
                                        "type": "string"
                                    },
                                    "match_mode": {
                                        "type": "string",
                                        "enum": [
                                            "exact",
                                            "contains"
                                        ]
                                    },
                                    "audience_segment_id": {
                                        "type": "string"
                                    },
                                    "effective_from": {
                                        "type": "string"
                                    },
                                    "effective_to": {
                                        "type": "string"
                                    },
                                    "priority": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 65535
                                    },
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "draft",
                                            "active",
                                            "expired",
                                            "disabled"
                                        ]
                                    },
                                    "region_id": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "target_url",
                                    "terms"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/resolve_redirect": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "resolve_redirect",
                "description": "Resolve a shopper query to a merchandising redirect URL, if any.",
                "operationId": "call_resolve_redirect",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "q": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "shopper_context": {
                                        "type": "object"
                                    }
                                },
                                "required": [
                                    "q"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/restock.inventory.finalize": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "restock.inventory.finalize",
                "description": "Atomically promote a fully uploaded inventory snapshot and remove products absent from it. Mutating.",
                "operationId": "call_restock_inventory_finalize",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "snapshot_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                    }
                                },
                                "required": [
                                    "snapshot_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/restock.inventory.upsert": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "restock.inventory.upsert",
                "description": "Bulk-upsert an exact, tenant-scoped inventory snapshot for restock guidance. Mutating.",
                "operationId": "call_restock_inventory_upsert",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "snapshot_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                    },
                                    "captured_at": {
                                        "type": "string",
                                        "format": "date-time"
                                    },
                                    "rows": {
                                        "type": "array",
                                        "maxItems": 1000,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "product_id": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 64
                                                },
                                                "sku": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 128
                                                },
                                                "product_name": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "maxLength": 255
                                                },
                                                "quantity": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "product_id",
                                                "quantity"
                                            ],
                                            "additionalProperties": false
                                        }
                                    }
                                },
                                "required": [
                                    "snapshot_id",
                                    "captured_at",
                                    "rows"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/restock.orders.upsert": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "restock.orders.upsert",
                "description": "Idempotently upsert complete order lines used to estimate merchant product demand. Mutating.",
                "operationId": "call_restock_orders_upsert",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "orders": {
                                        "type": "array",
                                        "minItems": 1,
                                        "maxItems": 250,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "order_id": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 128
                                                },
                                                "ordered_at": {
                                                    "type": "string",
                                                    "format": "date-time"
                                                },
                                                "customer_key": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "minLength": 64,
                                                    "maxLength": 64
                                                },
                                                "include_in_demand": {
                                                    "type": "boolean",
                                                    "default": true
                                                },
                                                "lines": {
                                                    "type": "array",
                                                    "minItems": 1,
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "line_id": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 128
                                                            },
                                                            "product_id": {
                                                                "type": "string",
                                                                "minLength": 1,
                                                                "maxLength": 64
                                                            },
                                                            "sku": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "maxLength": 128
                                                            },
                                                            "product_name": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "maxLength": 255
                                                            },
                                                            "quantity": {
                                                                "type": "integer",
                                                                "minimum": 1
                                                            },
                                                            "unit_price_cents": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "currency": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ],
                                                                "minLength": 3,
                                                                "maxLength": 3
                                                            }
                                                        },
                                                        "required": [
                                                            "line_id",
                                                            "product_id",
                                                            "quantity"
                                                        ],
                                                        "additionalProperties": false
                                                    }
                                                }
                                            },
                                            "required": [
                                                "order_id",
                                                "ordered_at",
                                                "lines"
                                            ],
                                            "additionalProperties": false
                                        }
                                    }
                                },
                                "required": [
                                    "orders"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/restock.recommendations.list": {
            "post": {
                "tags": [
                    "Commerce"
                ],
                "summary": "restock.recommendations.list",
                "description": "List explainable stock-runway and target-cover recommendations without assuming supplier lead times.",
                "operationId": "call_restock_recommendations_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "lookback_days": {
                                        "type": "integer",
                                        "minimum": 7,
                                        "maximum": 365,
                                        "default": 28
                                    },
                                    "target_cover_days": {
                                        "type": "integer",
                                        "minimum": 7,
                                        "maximum": 180,
                                        "default": 30
                                    },
                                    "urgency": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "critical",
                                            "high",
                                            "medium",
                                            "low",
                                            "unknown",
                                            null
                                        ]
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/search": {
            "post": {
                "tags": [
                    "Search"
                ],
                "summary": "search",
                "description": "Read-only corpus search. Body params are passthrough to the per-tenant Typesense collection.",
                "operationId": "call_search",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "q": {
                                        "type": "string",
                                        "description": "Query string"
                                    },
                                    "query_by": {
                                        "type": "string",
                                        "description": "Comma-separated field list to search"
                                    },
                                    "filter_by": {
                                        "type": "string"
                                    },
                                    "sort_by": {
                                        "type": "string"
                                    },
                                    "page": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "per_page": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 250
                                    },
                                    "facet_by": {
                                        "type": "string"
                                    },
                                    "session_id": {
                                        "type": "string",
                                        "description": "Originating shopper session id; required for bot-check classification."
                                    },
                                    "ua": {
                                        "type": "string",
                                        "description": "Originating shopper User-Agent; required for bot-check classification."
                                    },
                                    "ip": {
                                        "type": "string",
                                        "description": "Originating shopper IP; required for bot-check classification. Connector should resolve through CF-Connecting-IP / X-Forwarded-For."
                                    },
                                    "referer": {
                                        "type": "string",
                                        "description": "Originating shopper Referer header; recorded in telemetry for analytics."
                                    },
                                    "lang": {
                                        "type": "string",
                                        "description": "ISO 639-1 / BCP-47 storefront language (de, en-US). When the collection has a lang facet, hits are scoped to that language."
                                    },
                                    "skip_merchandising_redirect": {
                                        "type": "boolean",
                                        "description": "When true, skip keyword-redirect short-circuit and return ranked product hits (view-all / explicit SERP intent)."
                                    },
                                    "filters": {
                                        "type": "object",
                                        "description": "Structured filter map: field => scalar | list | { op, value }. Normalized for telemetry / LTR attribution."
                                    },
                                    "price_from": {
                                        "type": "number",
                                        "description": "Inclusive minimum price (vanilla Zen Cart pfrom)."
                                    },
                                    "price_to": {
                                        "type": "number",
                                        "description": "Inclusive maximum price (vanilla Zen Cart pto)."
                                    },
                                    "shopper_context": {
                                        "type": "object",
                                        "description": "Connector-reported shopper facts (customer_group, country, logged_in, ...) used to match audience segments for merchandising rules."
                                    },
                                    "parse_nl": {
                                        "type": "boolean",
                                        "description": "Run the query through the NL intent parser before search. Fails open to lexical on any LLM error."
                                    },
                                    "image_b64": {
                                        "type": "string",
                                        "description": "Base64-encoded query image for hybrid mode. Max ~2 MB encoded. Requires image_search entitlement."
                                    },
                                    "image_url": {
                                        "type": "string",
                                        "description": "URL the embed worker should fetch for hybrid mode. Mutually exclusive with image_b64."
                                    },
                                    "image_blend_weight": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1,
                                        "description": "Per-request override of the tenant default for the vector vs text blend (0=text-only, 1=image-only, 0.5=even)."
                                    }
                                },
                                "required": [
                                    "q"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/search.byImage": {
            "post": {
                "tags": [
                    "Search"
                ],
                "summary": "search.byImage",
                "description": "Image-as-query corpus search. Accepts one of {image_b64, image_url, doc_id} and returns SKUs visually similar to the query via CLIP ViT-B/32 + Typesense vector_query.",
                "operationId": "call_search_byImage",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "image_b64": {
                                        "type": "string",
                                        "description": "Base64-encoded image (no data: prefix). Max ~2 MB encoded. Mutually exclusive with image_url and doc_id."
                                    },
                                    "image_url": {
                                        "type": "string",
                                        "description": "Publicly fetchable URL the embed worker will GET. Mutually exclusive with image_b64 and doc_id."
                                    },
                                    "doc_id": {
                                        "type": "string",
                                        "description": "\"More like this\" mode — read the existing image_embedding vector off the indexed doc. Skips the embed worker call entirely. Mutually exclusive with image_b64 and image_url."
                                    },
                                    "filter_by": {
                                        "type": "string",
                                        "description": "Optional Typesense filter_by clause; ANDed with the vendor default for the vertical (e.g. products_status gate)."
                                    },
                                    "sort_by": {
                                        "type": "string"
                                    },
                                    "page": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "per_page": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100
                                    },
                                    "facet_by": {
                                        "type": "string"
                                    },
                                    "include_fields": {
                                        "type": "string"
                                    },
                                    "exclude_fields": {
                                        "type": "string"
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "referer": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/search.by_vehicle": {
            "post": {
                "tags": [
                    "Search"
                ],
                "summary": "search.by_vehicle",
                "description": "Vehicle-id-scoped corpus search. Returns products whose `fits_vehicles` int[] contains the requested vehicle_id.",
                "operationId": "call_search_by_vehicle",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "vehicle_id": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 2147483647,
                                        "description": "Concrete vehicle id from the fitment graph. Mutually optional with (year, make, model)."
                                    },
                                    "year": {
                                        "type": "integer",
                                        "minimum": 1900,
                                        "maximum": 2100,
                                        "description": "Model year (e.g. 2019). Used with `make` + `model` when vehicle_id is omitted."
                                    },
                                    "make": {
                                        "type": "string",
                                        "description": "Vehicle make (e.g. \"Honda\"). Case-insensitive."
                                    },
                                    "model": {
                                        "type": "string",
                                        "description": "Vehicle model (e.g. \"Civic\"). Case-insensitive."
                                    },
                                    "q": {
                                        "type": "string",
                                        "description": "Optional free-text query to refine within the vehicle (e.g. \"door handle\"). Defaults to \"*\" (match everything that fits)."
                                    },
                                    "filter_by": {
                                        "type": "string",
                                        "description": "Optional additional filter_by clause; ANDed with the vehicle filter."
                                    },
                                    "sort_by": {
                                        "type": "string"
                                    },
                                    "page": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "per_page": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 250
                                    },
                                    "facet_by": {
                                        "type": "string"
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "referer": {
                                        "type": "string"
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/segments.list": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "segments.list",
                "description": "List customer segments for the tenant.",
                "operationId": "call_segments_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled_only": {
                                        "type": "boolean",
                                        "description": "When true, filters out disabled segments."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/segments.remove": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "segments.remove",
                "description": "Delete a customer segment by id. Mutating.",
                "operationId": "call_segments_remove",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/segments.set": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "segments.set",
                "description": "Create or update a customer segment. Mutating.",
                "operationId": "call_segments_set",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Optional stable id. Defaults to seg_<12 hex>."
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 120
                                    },
                                    "match_rule": {
                                        "type": "object",
                                        "description": "DSL: {all|any|<field>: value-or-list}"
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Defaults to true."
                                    },
                                    "region_id": {
                                        "type": "string",
                                        "description": "Sprint 9 — segment only matches when the resolved region matches this id. Omit to apply to all regions."
                                    }
                                },
                                "required": [
                                    "display_name",
                                    "match_rule"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/suggest": {
            "post": {
                "tags": [
                    "Search"
                ],
                "summary": "suggest",
                "description": "Typeahead suggestions: prior-search keywords, prefix-matched products, and matching categories.",
                "operationId": "call_suggest",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "q": {
                                        "type": "string",
                                        "description": "Prefix the shopper has typed so far."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 25
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "lang": {
                                        "type": "string"
                                    },
                                    "complete": {
                                        "type": "boolean"
                                    },
                                    "include_products": {
                                        "type": "boolean"
                                    },
                                    "include_keywords": {
                                        "type": "boolean"
                                    },
                                    "include_recent": {
                                        "type": "boolean"
                                    },
                                    "include_trending": {
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "q"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/synonyms.add": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "synonyms.add",
                "description": "Add or replace a synonym entry. id is optional; we generate one if omitted. Mutating.",
                "operationId": "call_synonyms_add",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "Optional stable id. Defaults to syn_<8 hex>."
                                    },
                                    "root": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Optional root term (one-way). Null for symmetric synonyms."
                                    },
                                    "synonyms": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "minLength": 1
                                        },
                                        "minItems": 1,
                                        "maxItems": 32
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "If true, validate + preview the change without applying. Default false."
                                    }
                                },
                                "required": [
                                    "synonyms"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/synonyms.list": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "synonyms.list",
                "description": "Read the per-tenant synonym list. Returns Typesense-native synonym entries.",
                "operationId": "call_synonyms_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/synonyms.remove": {
            "post": {
                "tags": [
                    "Merchandising"
                ],
                "summary": "synonyms.remove",
                "description": "Delete a synonym entry by id. Mutating.",
                "operationId": "call_synonyms_remove",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "minLength": 1
                                    },
                                    "dry_run": {
                                        "type": "boolean",
                                        "description": "If true, validate + preview the change without applying. Default false. The response contains a `would_*` key with the planned shape; re-call without dry_run to apply."
                                    }
                                },
                                "required": [
                                    "id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/tenant.catalog_preview": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "tenant.catalog_preview",
                "description": "Return a small sample of indexed documents (admin only). With `q`, runs a prefix-match autocomplete used by the admin doc picker.",
                "operationId": "call_tenant_catalog_preview",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 25
                                    },
                                    "q": {
                                        "type": "string",
                                        "maxLength": 256
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/tenant.domain.promote": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "tenant.domain.promote",
                "description": "Self-service swap of the tenant's canonical storefront host. Used by connectors to flip from dev -> prod without an operator round-trip. Mutating.",
                "operationId": "call_tenant_domain_promote",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "new_host": {
                                        "type": "string",
                                        "maxLength": 253,
                                        "description": "The hostname to promote to (no scheme, no path). Must already appear in observed_domains_json for this tenant."
                                    },
                                    "previous_host": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "platform": {
                                        "type": "string"
                                    },
                                    "connector_version": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "new_host"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/tenant.handshake": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "tenant.handshake",
                "description": "Verify connector configuration and discover the tenant's tool surface, vertical, and rate limits.",
                "operationId": "call_tenant_handshake",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "plugin_version": {
                                        "type": "string",
                                        "maxLength": 16
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/tenant.region.list": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "tenant.region.list",
                "description": "Read tenant-level multi-region flags + every numinix_mcp_tenant_regions row.",
                "operationId": "call_tenant_region_list",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/tenant.snapshot": {
            "post": {
                "tags": [
                    "Catalog & telemetry"
                ],
                "summary": "tenant.snapshot",
                "description": "Read (or push to) the full tenant runtime config snapshot.",
                "operationId": "call_tenant_snapshot",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "push": {
                                        "type": "object",
                                        "description": "Optional connector-side FSM snapshot to record.",
                                        "properties": {
                                            "auto_state": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "auto_state_since": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            },
                                            "auto_history": {
                                                "type": [
                                                    "array",
                                                    "string"
                                                ],
                                                "description": "Last 16 transitions; array preferred."
                                            },
                                            "observed_count": {
                                                "type": "integer",
                                                "minimum": 0
                                            },
                                            "errors_count": {
                                                "type": "integer",
                                                "minimum": 0
                                            },
                                            "env": {
                                                "type": "object",
                                                "description": "PHP environment snapshot from the connector host (v1.0.19+).",
                                                "properties": {
                                                    "php_version": {
                                                        "type": "string",
                                                        "description": "PHP_VERSION on the connector host (e.g. 8.1.34)."
                                                    },
                                                    "php_sapi": {
                                                        "type": "string"
                                                    },
                                                    "sodium_loaded": {
                                                        "type": "boolean"
                                                    },
                                                    "apcu_loaded": {
                                                        "type": "boolean",
                                                        "description": "extension loaded AND apc.enabled=1."
                                                    },
                                                    "apcu_extension": {
                                                        "type": "boolean",
                                                        "description": "extension loaded regardless of apc.enabled."
                                                    },
                                                    "opcache_enabled": {
                                                        "type": "boolean"
                                                    },
                                                    "curl_loaded": {
                                                        "type": "boolean"
                                                    },
                                                    "openssl_loaded": {
                                                        "type": "boolean"
                                                    },
                                                    "mysqli_loaded": {
                                                        "type": "boolean"
                                                    },
                                                    "intl_loaded": {
                                                        "type": "boolean"
                                                    },
                                                    "json_loaded": {
                                                        "type": "boolean"
                                                    },
                                                    "server_time_unix": {
                                                        "type": "integer",
                                                        "description": "Connector wall-clock at push time; gateway computes clock skew from this."
                                                    }
                                                },
                                                "additionalProperties": true
                                            },
                                            "ack_image_refresh_ids": {
                                                "type": "array",
                                                "items": {
                                                    "type": "string"
                                                },
                                                "description": "Doc ids successfully queued for image_url refresh; removed from pending_image_refresh_ids."
                                            },
                                            "inbox": {
                                                "type": "object",
                                                "description": "Chat Inbox HMAC endpoint for admin.seekmodo.com.",
                                                "properties": {
                                                    "api_url": {
                                                        "type": "string"
                                                    },
                                                    "mcp_url": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "plugin_version": {
                                                        "type": "string"
                                                    },
                                                    "capabilities": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    }
                                                },
                                                "additionalProperties": true
                                            },
                                            "last_full_push_at": {
                                                "type": "integer"
                                            },
                                            "last_full_push_duration_s": {
                                                "type": "integer"
                                            },
                                            "last_full_push_doc_count": {
                                                "type": "integer"
                                            },
                                            "last_full_push_skipped_reason": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ]
                                            }
                                        },
                                        "additionalProperties": false
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/tools": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "List tools available to your tenant (includes inputSchema)",
                "operationId": "listTools",
                "responses": {
                    "200": {
                        "description": "Tool descriptors",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "tools": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ToolDescriptor"
                                            }
                                        }
                                    },
                                    "required": [
                                        "tools"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    }
                }
            }
        },
        "/v1/tools/public": {
            "get": {
                "tags": [
                    "Catalog"
                ],
                "summary": "Unauthenticated public tool catalog (no inputSchema; feeds /docs/mcp)",
                "operationId": "listToolsPublic",
                "security": [],
                "responses": {
                    "200": {
                        "description": "Public tool list",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "tools": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "available": {
                                                        "type": "boolean"
                                                    },
                                                    "mutates": {
                                                        "type": "boolean"
                                                    },
                                                    "category": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "name",
                                                    "available",
                                                    "mutates"
                                                ]
                                            }
                                        },
                                        "fetched_at": {
                                            "type": "string",
                                            "format": "date-time"
                                        }
                                    },
                                    "required": [
                                        "tools"
                                    ]
                                }
                            }
                        }
                    }
                }
            }
        },
        "/v1/typeahead": {
            "post": {
                "tags": [
                    "Search"
                ],
                "summary": "typeahead",
                "description": "Flat-row typeahead for storefront connectors. Returns N prefix-matched docs from the tenant Typesense collection in the legacy {rows} shape WP / Zen Cart connectors expect.",
                "operationId": "call_typeahead",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "q": {
                                        "type": "string",
                                        "description": "Prefix the shopper has typed so far."
                                    },
                                    "max": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 25
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 25
                                    },
                                    "vertical": {
                                        "type": "string",
                                        "enum": [
                                            "commerce",
                                            "content",
                                            "kb",
                                            "community"
                                        ]
                                    },
                                    "session_id": {
                                        "type": "string"
                                    },
                                    "ua": {
                                        "type": "string"
                                    },
                                    "ip": {
                                        "type": "string"
                                    },
                                    "complete": {
                                        "type": "boolean"
                                    }
                                },
                                "required": [
                                    "q"
                                ],
                                "additionalProperties": true
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicle.taxonomy.lookup": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicle.taxonomy.lookup",
                "description": "Resolve a per-tenant vehicle taxonomy row by VLP slug (e.g. \"keys-for-2019-honda-civic\") or by vehicle_id. Returns the canonical row used by the BC Worker VLP renderer.",
                "operationId": "call_vehicle_taxonomy_lookup",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "slug": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200,
                                        "description": "VLP slug as the connector stored it (canonicalised, lowercase, hyphen-separated). Mutually exclusive with vehicle_id."
                                    },
                                    "vehicle_id": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "description": "Numeric vehicle_id from a prior fitment.resolve / search.byVehicle round-trip. Mutually exclusive with slug."
                                    }
                                },
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicle.taxonomy.neighbours": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicle.taxonomy.neighbours",
                "description": "Return the two AKS-canonical neighbour lanes (same make+model different year; same year+make different model) for a given vehicle_id in the per-tenant projection.",
                "operationId": "call_vehicle_taxonomy_neighbours",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "vehicle_id": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "description": "Anchor vehicle_id (typically from a prior vehicle.taxonomy.lookup or fitment.resolve call)."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100,
                                        "description": "Per-lane cap on returned rows. Defaults to 12 (matches AKS VlpInternalLinkRenderer)."
                                    }
                                },
                                "required": [
                                    "vehicle_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicle_taxonomy.bulk_upsert": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicle_taxonomy.bulk_upsert",
                "description": "Bulk-upsert vehicle taxonomy rows (year/make/model + pre-computed VLP slug + product_count) into the per-tenant projection. Up to 1000 rows per call. Called by the connector's seekmodo:vlp-project artisan command. Mutating.",
                "operationId": "call_vehicle_taxonomy_bulk_upsert",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rows": {
                                        "type": "array",
                                        "minItems": 1,
                                        "maxItems": 1000,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "vehicle_id": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "year_start": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1900,
                                                    "maximum": 2100
                                                },
                                                "year_end": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1900,
                                                    "maximum": 2100
                                                },
                                                "make_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "make_name": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                },
                                                "model_id": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "model_name": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 120
                                                },
                                                "slug": {
                                                    "type": "string",
                                                    "minLength": 1,
                                                    "maxLength": 180
                                                },
                                                "product_count": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "vehicle_id",
                                                "make_name",
                                                "model_name",
                                                "slug",
                                                "product_count"
                                            ],
                                            "additionalProperties": false
                                        }
                                    }
                                },
                                "required": [
                                    "rows"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicle_taxonomy.prune": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicle_taxonomy.prune",
                "description": "Delete vehicle taxonomy rows whose last_seen_at is older than the supplied UTC cutoff (ISO 8601). Called after a successful seekmodo:vlp-project run so vehicles that disappear from the connector's projection stop appearing in the gateway sitemap. Mutating.",
                "operationId": "call_vehicle_taxonomy_prune",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "cutoff_utc": {
                                        "type": "string",
                                        "minLength": 10,
                                        "maxLength": 40,
                                        "description": "UTC cutoff in YYYY-MM-DD HH:MM:SS or ISO-8601 form. Rows with last_seen_at strictly older are deleted."
                                    }
                                },
                                "required": [
                                    "cutoff_utc"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicles.catalog.changes": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicles.catalog.changes",
                "description": "Return central vehicle catalog rows changed since updated_since (ISO-8601). Supports cursor pagination.",
                "operationId": "call_vehicles_catalog_changes",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "updated_since": {
                                        "type": "string",
                                        "description": "ISO-8601 lower bound on updated_at (>=)."
                                    },
                                    "cursor": {
                                        "type": "string"
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 1000
                                    }
                                },
                                "required": [
                                    "updated_since"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicles.catalog.lookup": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicles.catalog.lookup",
                "description": "Resolve year/make/model (and optional engine_trans_code) against the central Seekmodo vehicle catalog.",
                "operationId": "call_vehicles_catalog_lookup",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "year": {
                                        "type": "integer",
                                        "minimum": 1900,
                                        "maximum": 2100
                                    },
                                    "make": {
                                        "type": "string"
                                    },
                                    "model": {
                                        "type": "string"
                                    },
                                    "engine_trans_code": {
                                        "type": "string"
                                    },
                                    "provider": {
                                        "type": "string"
                                    },
                                    "provider_vehicle_id": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        },
        "/v1/vehicles.picker.options": {
            "post": {
                "tags": [
                    "Fitment & vehicles"
                ],
                "summary": "vehicles.picker.options",
                "description": "Return cascading YMM picker options for vehicles that have at least one product assignment for this tenant.",
                "operationId": "call_vehicles_picker_options",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "year": {
                                        "type": "integer",
                                        "minimum": 1900,
                                        "maximum": 2100
                                    },
                                    "make": {
                                        "type": "string"
                                    },
                                    "model": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Tool result (shape varies by tool)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "additionalProperties": true
                                }
                            }
                        }
                    },
                    "202": {
                        "description": "Accepted (async tools such as events may return 202)"
                    },
                    "400": {
                        "$ref": "#/components/responses/BadRequest"
                    },
                    "401": {
                        "$ref": "#/components/responses/Unauthorized"
                    },
                    "429": {
                        "$ref": "#/components/responses/RateLimited"
                    },
                    "501": {
                        "description": "Tool unavailable for this plan/vertical, or stub"
                    }
                }
            }
        }
    },
    "webhooks": {
        "ticket.created": {
            "post": {
                "tags": [
                    "Ticket webhooks"
                ],
                "summary": "A ticket was opened",
                "description": "Sent when a ticket is created, and when a quarantined ticket is released (then `data.change.released_from_quarantine` is true). Respond with any 2xx within 10 seconds (the 10 s includes DNS and connecting). Anything else (redirects and timeouts included) is retried after about 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h (8 attempts in total). Deliveries can repeat or arrive out of order. Retries and **Redeliver** in the admin log resend the stored payload unchanged: the same event `id`, `created_at` and `data` (the ticket as it was when the event happened), with a fresh signature timestamp. An endpoint that fails at least 15 times in a row over more than 24 hours with no success is disabled; while disabled, new events are not queued for it. Re-enabling it queues again, from the first attempt, the deliveries that were cancelled because it was disabled during the last 72 hours.",
                "operationId": "ticketWebhook_ticket_created",
                "parameters": [
                    {
                        "name": "Seekmodo-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex>`. `v1` is HMAC-SHA256 of `<t>.<raw body>` keyed with your full endpoint secret (including `whsec_`). For 24 hours after **Rotate secret** the header carries two `v1` values, one per secret (new first), so accept the request when any `v1` matches. Reject when none matches or `t` is more than 5 minutes from now.",
                        "schema": {
                            "type": "string",
                            "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
                        }
                    },
                    {
                        "name": "Seekmodo-Event",
                        "in": "header",
                        "required": true,
                        "description": "Event type, same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Event-Id",
                        "in": "header",
                        "required": true,
                        "description": "Event id, same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "Delivery id (one per endpoint per event; stays the same across retries of that delivery).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketWebhook_ticket_created"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Received. Any other status, or no answer within 10 seconds, is retried."
                    }
                }
            }
        },
        "ticket.replied": {
            "post": {
                "tags": [
                    "Ticket webhooks"
                ],
                "summary": "A public reply was added",
                "description": "Sent for customer replies and agent/automated public replies. Internal notes are never sent. `data.ticket.status` is the status after the reply (for example `pending_customer`). Respond with any 2xx within 10 seconds (the 10 s includes DNS and connecting). Anything else (redirects and timeouts included) is retried after about 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h (8 attempts in total). Deliveries can repeat or arrive out of order. Retries and **Redeliver** in the admin log resend the stored payload unchanged: the same event `id`, `created_at` and `data` (the ticket as it was when the event happened), with a fresh signature timestamp. An endpoint that fails at least 15 times in a row over more than 24 hours with no success is disabled; while disabled, new events are not queued for it. Re-enabling it queues again, from the first attempt, the deliveries that were cancelled because it was disabled during the last 72 hours.",
                "operationId": "ticketWebhook_ticket_replied",
                "parameters": [
                    {
                        "name": "Seekmodo-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex>`. `v1` is HMAC-SHA256 of `<t>.<raw body>` keyed with your full endpoint secret (including `whsec_`). For 24 hours after **Rotate secret** the header carries two `v1` values, one per secret (new first), so accept the request when any `v1` matches. Reject when none matches or `t` is more than 5 minutes from now.",
                        "schema": {
                            "type": "string",
                            "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
                        }
                    },
                    {
                        "name": "Seekmodo-Event",
                        "in": "header",
                        "required": true,
                        "description": "Event type, same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Event-Id",
                        "in": "header",
                        "required": true,
                        "description": "Event id, same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "Delivery id (one per endpoint per event; stays the same across retries of that delivery).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketWebhook_ticket_replied"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Received. Any other status, or no answer within 10 seconds, is retried."
                    }
                }
            }
        },
        "ticket.status_changed": {
            "post": {
                "tags": [
                    "Ticket webhooks"
                ],
                "summary": "The status changed",
                "description": "Sent whenever the status moves, for example `open` to `solved`. Also sent when a solved ticket is closed automatically after the auto-close period (`solved` to `closed`, actor `System`), for the source ticket of a merge (to `closed`), and when a quarantined ticket is rejected as spam (to `closed`; that ticket was never announced with `ticket.created`). Respond with any 2xx within 10 seconds (the 10 s includes DNS and connecting). Anything else (redirects and timeouts included) is retried after about 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h (8 attempts in total). Deliveries can repeat or arrive out of order. Retries and **Redeliver** in the admin log resend the stored payload unchanged: the same event `id`, `created_at` and `data` (the ticket as it was when the event happened), with a fresh signature timestamp. An endpoint that fails at least 15 times in a row over more than 24 hours with no success is disabled; while disabled, new events are not queued for it. Re-enabling it queues again, from the first attempt, the deliveries that were cancelled because it was disabled during the last 72 hours.",
                "operationId": "ticketWebhook_ticket_status_changed",
                "parameters": [
                    {
                        "name": "Seekmodo-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex>`. `v1` is HMAC-SHA256 of `<t>.<raw body>` keyed with your full endpoint secret (including `whsec_`). For 24 hours after **Rotate secret** the header carries two `v1` values, one per secret (new first), so accept the request when any `v1` matches. Reject when none matches or `t` is more than 5 minutes from now.",
                        "schema": {
                            "type": "string",
                            "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
                        }
                    },
                    {
                        "name": "Seekmodo-Event",
                        "in": "header",
                        "required": true,
                        "description": "Event type, same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Event-Id",
                        "in": "header",
                        "required": true,
                        "description": "Event id, same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "Delivery id (one per endpoint per event; stays the same across retries of that delivery).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketWebhook_ticket_status_changed"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Received. Any other status, or no answer within 10 seconds, is retried."
                    }
                }
            }
        },
        "ticket.assigned": {
            "post": {
                "tags": [
                    "Ticket webhooks"
                ],
                "summary": "Assignment changed",
                "description": "Sent when someone is assigned, unassigned, or made the primary assignee. Respond with any 2xx within 10 seconds (the 10 s includes DNS and connecting). Anything else (redirects and timeouts included) is retried after about 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h (8 attempts in total). Deliveries can repeat or arrive out of order. Retries and **Redeliver** in the admin log resend the stored payload unchanged: the same event `id`, `created_at` and `data` (the ticket as it was when the event happened), with a fresh signature timestamp. An endpoint that fails at least 15 times in a row over more than 24 hours with no success is disabled; while disabled, new events are not queued for it. Re-enabling it queues again, from the first attempt, the deliveries that were cancelled because it was disabled during the last 72 hours.",
                "operationId": "ticketWebhook_ticket_assigned",
                "parameters": [
                    {
                        "name": "Seekmodo-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex>`. `v1` is HMAC-SHA256 of `<t>.<raw body>` keyed with your full endpoint secret (including `whsec_`). For 24 hours after **Rotate secret** the header carries two `v1` values, one per secret (new first), so accept the request when any `v1` matches. Reject when none matches or `t` is more than 5 minutes from now.",
                        "schema": {
                            "type": "string",
                            "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
                        }
                    },
                    {
                        "name": "Seekmodo-Event",
                        "in": "header",
                        "required": true,
                        "description": "Event type, same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Event-Id",
                        "in": "header",
                        "required": true,
                        "description": "Event id, same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "Delivery id (one per endpoint per event; stays the same across retries of that delivery).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketWebhook_ticket_assigned"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Received. Any other status, or no answer within 10 seconds, is retried."
                    }
                }
            }
        },
        "ticket.participant_changed": {
            "post": {
                "tags": [
                    "Ticket webhooks"
                ],
                "summary": "A CC participant was added or removed",
                "description": "Sent when a CC participant is added or removed: by an agent (`participants_add`, `participants_remove`, reply `cc`), from the customer portal, when an inbound customer email Cc's a new address, and when a merge copies participants to the surviving ticket. Only addresses that were not already participants count as added. Respond with any 2xx within 10 seconds (the 10 s includes DNS and connecting). Anything else (redirects and timeouts included) is retried after about 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h (8 attempts in total). Deliveries can repeat or arrive out of order. Retries and **Redeliver** in the admin log resend the stored payload unchanged: the same event `id`, `created_at` and `data` (the ticket as it was when the event happened), with a fresh signature timestamp. An endpoint that fails at least 15 times in a row over more than 24 hours with no success is disabled; while disabled, new events are not queued for it. Re-enabling it queues again, from the first attempt, the deliveries that were cancelled because it was disabled during the last 72 hours.",
                "operationId": "ticketWebhook_ticket_participant_changed",
                "parameters": [
                    {
                        "name": "Seekmodo-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex>`. `v1` is HMAC-SHA256 of `<t>.<raw body>` keyed with your full endpoint secret (including `whsec_`). For 24 hours after **Rotate secret** the header carries two `v1` values, one per secret (new first), so accept the request when any `v1` matches. Reject when none matches or `t` is more than 5 minutes from now.",
                        "schema": {
                            "type": "string",
                            "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
                        }
                    },
                    {
                        "name": "Seekmodo-Event",
                        "in": "header",
                        "required": true,
                        "description": "Event type, same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Event-Id",
                        "in": "header",
                        "required": true,
                        "description": "Event id, same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "Delivery id (one per endpoint per event; stays the same across retries of that delivery).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketWebhook_ticket_participant_changed"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Received. Any other status, or no answer within 10 seconds, is retried."
                    }
                }
            }
        },
        "webhook.test": {
            "post": {
                "tags": [
                    "Ticket webhooks"
                ],
                "summary": "Test event",
                "description": "Sent from **Send test event** in admin. Not tied to a ticket. Respond with any 2xx within 10 seconds (the 10 s includes DNS and connecting). Anything else (redirects and timeouts included) is retried after about 30 s, 2 min, 10 min, 30 min, 1 h, 3 h and 6 h (8 attempts in total). Deliveries can repeat or arrive out of order. Retries and **Redeliver** in the admin log resend the stored payload unchanged: the same event `id`, `created_at` and `data` (the ticket as it was when the event happened), with a fresh signature timestamp. An endpoint that fails at least 15 times in a row over more than 24 hours with no success is disabled; while disabled, new events are not queued for it. Re-enabling it queues again, from the first attempt, the deliveries that were cancelled because it was disabled during the last 72 hours.",
                "operationId": "ticketWebhook_webhook_test",
                "parameters": [
                    {
                        "name": "Seekmodo-Signature",
                        "in": "header",
                        "required": true,
                        "description": "`t=<unix seconds>,v1=<hex>`. `v1` is HMAC-SHA256 of `<t>.<raw body>` keyed with your full endpoint secret (including `whsec_`). For 24 hours after **Rotate secret** the header carries two `v1` values, one per secret (new first), so accept the request when any `v1` matches. Reject when none matches or `t` is more than 5 minutes from now.",
                        "schema": {
                            "type": "string",
                            "pattern": "^t=\\d+(,v1=[0-9a-f]{64})+$"
                        }
                    },
                    {
                        "name": "Seekmodo-Event",
                        "in": "header",
                        "required": true,
                        "description": "Event type, same as `type` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Event-Id",
                        "in": "header",
                        "required": true,
                        "description": "Event id, same as `id` in the body.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Seekmodo-Delivery",
                        "in": "header",
                        "required": true,
                        "description": "Delivery id (one per endpoint per event; stays the same across retries of that delivery).",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/TicketWebhook_webhook_test"
                            }
                        }
                    }
                },
                "responses": {
                    "2XX": {
                        "description": "Received. Any other status, or no answer within 10 seconds, is retried."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "SeekmodoHmac": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Seekmodo-Signature",
                "description": "HMAC-SHA256 hex digest of the **raw HTTP request body** using the tenant shared secret (`hash_hmac('sha256', $rawBody, $sharedSecret)`). Also send `X-Seekmodo-Tenant` and `X-Seekmodo-Timestamp` (Unix seconds; ±5 minute replay window). Nonce headers are ignored by the gateway."
            },
            "TicketApiKey": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "smk_tk_<64 hex>",
                "description": "Tenant API key from admin.seekmodo.com/settings/api-keys, sent as `Authorization: Bearer smk_tk_...` together with `X-Seekmodo-Tenant`. Scopes: `tickets:read`, `tickets:write`, `tickets:admin`. Ticket API only."
            },
            "SeekmodoTenant": {
                "type": "apiKey",
                "in": "header",
                "name": "X-Seekmodo-Tenant",
                "description": "Your store (tenant) id, lower case. Required with every ticket API call."
            }
        },
        "responses": {
            "Unauthorized": {
                "description": "HMAC verification failed",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "RateLimited": {
                "description": "Rate limit exceeded for tenant",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            },
            "BadRequest": {
                "description": "Invalid JSON body or tool arguments",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        }
                    }
                }
            }
        },
        "schemas": {
            "Health": {
                "type": "object",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "ok",
                            "degraded"
                        ]
                    },
                    "version": {
                        "type": "string"
                    },
                    "build_sha": {
                        "type": "string"
                    },
                    "tenant_count": {
                        "type": "integer"
                    },
                    "uptime_s": {
                        "type": "integer"
                    }
                },
                "required": [
                    "status",
                    "version"
                ]
            },
            "ToolDescriptor": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "inputSchema": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "available": {
                        "type": "boolean"
                    },
                    "mutates": {
                        "type": "boolean"
                    },
                    "supports_streaming": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "name",
                    "available",
                    "mutates"
                ]
            },
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "oneOf": [
                            {
                                "type": "string"
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string"
                                    },
                                    "message": {
                                        "type": "string"
                                    }
                                }
                            }
                        ]
                    }
                }
            },
            "TicketActingAgent": {
                "type": "object",
                "description": "Who performs the action. **API keys and MCP gateway calls (strict):** the email must belong to the store owner, a store team member, or an existing active ticket agent, otherwise the call fails with `actor_not_member` (403); no agent is created. The person's team role applies (an active ticket agent who is not a team member counts as admin), capped by the key's scope (`tickets:read` = viewer, `tickets:write` = chat, `tickets:admin` = admin). Writes made with an API key and no `acting_agent` are attributed to a service agent named `API: <key name>`. **Connector HMAC:** any valid email is accepted and created (or updated) as an active ticket agent with store-admin rights; writes without `acting_agent` fail with `actor_required` (401). `role`, `user_id` and `operator` are ignored for all of these callers.",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "name": {
                        "type": "string",
                        "description": "Display name (used only when Seekmodo has no better name for this email)."
                    },
                    "source": {
                        "type": "string",
                        "enum": [
                            "seekmodo",
                            "store"
                        ]
                    },
                    "external_ref": {
                        "type": "string",
                        "description": "Your own reference for this person (up to 120 characters)."
                    }
                },
                "required": [
                    "email"
                ]
            },
            "TicketError": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": false
                    },
                    "error": {
                        "type": "string",
                        "description": "Machine-readable error code. See the error table on https://seekmodo.com/docs/tickets#errors."
                    },
                    "email": {
                        "type": "string",
                        "description": "Present on `invalid_cc_email`: the address that was rejected."
                    },
                    "agent_ids": {
                        "type": "array",
                        "description": "Present on `unknown_agent` from `assign`: ids that are not active agents.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "filename": {
                        "type": "string",
                        "description": "Present on `blocked_attachment_type`: the refused file name."
                    }
                },
                "required": [
                    "ok",
                    "error"
                ]
            },
            "TicketSla": {
                "type": "object",
                "properties": {
                    "state": {
                        "type": "string",
                        "enum": [
                            "none",
                            "ok",
                            "warning",
                            "breached"
                        ]
                    },
                    "due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time",
                        "description": "Next response due (only while the ticket is `new` or `open`)."
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "first_response",
                            "next_response"
                        ]
                    },
                    "breached_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketAssignee": {
                "type": "object",
                "properties": {
                    "agent_id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string"
                    },
                    "role": {
                        "type": "string",
                        "enum": [
                            "assignee",
                            "watcher"
                        ]
                    },
                    "is_primary": {
                        "type": "boolean"
                    }
                }
            },
            "TicketSummary": {
                "type": "object",
                "properties": {
                    "number": {
                        "type": "integer"
                    },
                    "subject": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "new",
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved",
                            "closed"
                        ]
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ]
                    },
                    "type": {
                        "type": "string"
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "requester_name": {
                        "type": "string"
                    },
                    "requester_email": {
                        "type": "string"
                    },
                    "origin": {
                        "type": "string",
                        "enum": [
                            "email",
                            "web_form",
                            "chat",
                            "agent",
                            "api"
                        ]
                    },
                    "source_chat_ref": {
                        "type": "string"
                    },
                    "preview": {
                        "type": "string",
                        "description": "Start of the latest public message (up to 160 characters)."
                    },
                    "message_count": {
                        "type": "integer"
                    },
                    "assignees": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketAssignee"
                        }
                    },
                    "watchers": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketAssignee"
                        }
                    },
                    "primary_assignee": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/TicketAssignee"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "sla": {
                        "$ref": "#/components/schemas/TicketSla"
                    },
                    "first_response_due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "next_response_due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "resolution_due_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "first_responded_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_customer_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_agent_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "solved_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "quarantined": {
                        "type": "boolean"
                    },
                    "archived": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketDetail": {
                "allOf": [
                    {
                        "$ref": "#/components/schemas/TicketSummary"
                    },
                    {
                        "type": "object",
                        "properties": {
                            "merged_into": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "description": "Number of the ticket this one was merged into."
                            },
                            "metadata": {
                                "type": "object",
                                "additionalProperties": true
                            },
                            "csat": {
                                "oneOf": [
                                    {
                                        "type": "object",
                                        "properties": {
                                            "score": {
                                                "type": "integer"
                                            },
                                            "comment": {
                                                "type": "string"
                                            },
                                            "created_at": {
                                                "type": [
                                                    "string",
                                                    "null"
                                                ],
                                                "format": "date-time"
                                            }
                                        }
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            }
                        }
                    }
                ]
            },
            "TicketAttachmentMeta": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": [
                            "integer",
                            "null"
                        ],
                        "description": "Pass to `attachment_get`. `null` for files that were only emailed out on a forward."
                    },
                    "filename": {
                        "type": "string"
                    },
                    "content_type": {
                        "type": "string"
                    },
                    "size": {
                        "type": "integer"
                    },
                    "inline": {
                        "type": "boolean"
                    }
                }
            },
            "TicketMessage": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "customer",
                            "public_reply",
                            "internal_note",
                            "sensitive",
                            "system",
                            "forward_out",
                            "forward_in"
                        ]
                    },
                    "author_agent_id": {
                        "type": "string"
                    },
                    "author_name": {
                        "type": "string"
                    },
                    "author_email": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string"
                    },
                    "body_html": {
                        "type": "string"
                    },
                    "channel": {
                        "type": "string"
                    },
                    "recipients": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "attachments": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketAttachmentMeta"
                        }
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketThread": {
                "type": "object",
                "description": "A private forward thread (email conversation with a third party, outside the customer timeline).",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "subject": {
                        "type": "string"
                    },
                    "to": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "cc": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "bcc": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "source_message_id": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "last_message_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "messages": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketMessage"
                        }
                    }
                }
            },
            "TicketEvent": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "type": {
                        "type": "string",
                        "description": "For example `created`, `status_changed`, `priority_changed`, `assigned`, `merged_into`."
                    },
                    "actor_name": {
                        "type": "string"
                    },
                    "from": {
                        "description": "Previous value (shape depends on `type`)."
                    },
                    "to": {
                        "description": "New value (shape depends on `type`)."
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketParticipant": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "email": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "role": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "TicketDeliveryBadge": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "role": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "ok",
                            "bounced",
                            "complained",
                            "suppressed"
                        ]
                    },
                    "reason": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string"
                    }
                }
            },
            "TicketAgent": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "format": "uuid"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string"
                    },
                    "user_id": {
                        "type": "string"
                    },
                    "active": {
                        "type": "boolean"
                    },
                    "notify_email": {
                        "type": "boolean"
                    }
                }
            },
            "TicketViewCounts": {
                "type": "object",
                "properties": {
                    "mine": {
                        "type": "integer"
                    },
                    "unassigned": {
                        "type": "integer"
                    },
                    "open": {
                        "type": "integer"
                    },
                    "pending": {
                        "type": "integer"
                    },
                    "overdue": {
                        "type": "integer"
                    },
                    "solved": {
                        "type": "integer"
                    },
                    "quarantine": {
                        "type": "integer"
                    },
                    "all": {
                        "type": "integer"
                    }
                }
            },
            "TicketSettings": {
                "type": "object",
                "properties": {
                    "sla_policy": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Response/resolution targets per priority."
                    },
                    "auto_close_days": {
                        "type": "integer"
                    },
                    "customer_lifecycle_mail": {
                        "type": "boolean"
                    },
                    "sla_calendar": {
                        "type": "object",
                        "additionalProperties": true,
                        "description": "Business hours used by SLA clocks."
                    },
                    "csat_enabled": {
                        "type": "boolean"
                    },
                    "reopen_within_days": {
                        "type": "integer",
                        "description": "Days after closing during which a customer reply reopens the ticket instead of starting a new one. 0-90; out-of-range values are clamped and 0 turns reopening off.",
                        "minimum": 0,
                        "maximum": 90
                    },
                    "portal_participants_manage": {
                        "type": "boolean",
                        "description": "Whether CC participants (not only the requester) may add and remove participants in the customer portal."
                    },
                    "portal_participants_status": {
                        "type": "boolean",
                        "description": "Whether CC participants (not only the requester) may change the ticket status in the customer portal."
                    },
                    "portal_daily_caps": {
                        "type": "object",
                        "description": "SM-148: this store's own daily limits on the customer portal, per UTC day: `signup` (account confirmation emails), `reset` (password emails), `ticket` (new portal requests). `null` = use the Seekmodo maximum (`portal_daily_cap_max`). The effective limit is min(this value, the maximum).",
                        "properties": {
                            "signup": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1
                            },
                            "reset": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1
                            },
                            "ticket": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1
                            }
                        }
                    },
                    "portal_daily_cap_max": {
                        "type": "object",
                        "description": "Seekmodo maximum per store per day for each portal action (0 = no maximum). Read-only.",
                        "properties": {
                            "signup": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "reset": {
                                "type": "integer",
                                "minimum": 0
                            },
                            "ticket": {
                                "type": "integer",
                                "minimum": 0
                            }
                        }
                    },
                    "spam_allowlist": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "email_logo_url": {
                        "type": "string",
                        "description": "Logo shown in ticket emails, or `\"\"` for none."
                    },
                    "email_accent_color": {
                        "type": "string",
                        "description": "Accent color for ticket emails (`#RRGGBB`, upper-case), or `\"\"` for the default."
                    },
                    "email_brand_locked": {
                        "type": "boolean"
                    },
                    "from_display_name": {
                        "type": "string"
                    },
                    "from_local_part": {
                        "type": "string"
                    },
                    "outbound_mail_connected": {
                        "type": "boolean"
                    },
                    "outbound_mode": {
                        "type": "string"
                    },
                    "ticket_email_addon": {
                        "type": "boolean"
                    },
                    "ticket_email_usage": {
                        "type": "object",
                        "properties": {
                            "used": {
                                "type": "integer"
                            },
                            "limit": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        }
                    },
                    "portal_default_url": {
                        "type": "string"
                    },
                    "portal_custom_domain": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "portal_domain_verified": {
                        "type": "boolean"
                    },
                    "portal_cname_target": {
                        "type": "string"
                    },
                    "portal_tls": {
                        "type": "object",
                        "description": "Certificate status for the custom portal host. Seekmodo requests a certificate from Cloudflare after the host is verified and Cloudflare renews it.",
                        "properties": {
                            "enabled": {
                                "type": "boolean",
                                "description": "False when custom host certificates are not turned on for this deployment."
                            },
                            "state": {
                                "type": "string",
                                "enum": [
                                    "none",
                                    "pending",
                                    "active",
                                    "error",
                                    "moved"
                                ]
                            },
                            "hostname_status": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "ssl_status": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "records": {
                                "type": "array",
                                "description": "DNS records to add at your DNS provider if the certificate stays pending.",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "type": {
                                            "type": "string",
                                            "enum": [
                                                "TXT",
                                                "CNAME",
                                                "HTTP"
                                            ]
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "type": "string"
                                        },
                                        "purpose": {
                                            "type": "string",
                                            "enum": [
                                                "ownership",
                                                "certificate",
                                                "routing"
                                            ]
                                        }
                                    }
                                }
                            },
                            "errors": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "cert_expires_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            },
                            "checked_at": {
                                "type": [
                                    "string",
                                    "null"
                                ],
                                "format": "date-time"
                            }
                        }
                    },
                    "inbound_address": {
                        "type": "string",
                        "description": "Forward your support mailbox here to open tickets by email."
                    },
                    "me": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/TicketAgent"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                }
            },
            "TicketSuppression": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "reason": {
                        "type": "string"
                    },
                    "source": {
                        "type": "string"
                    },
                    "global": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time"
                    }
                }
            },
            "TicketMacro": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketAction_list": {
                "type": "object",
                "title": "list",
                "description": "List tickets in a view, with filters, search, sorting and paging. Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "list"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "view": {
                        "type": "string",
                        "description": "Default `open`. `mine` needs an `acting_agent`.",
                        "enum": [
                            "mine",
                            "unassigned",
                            "open",
                            "pending",
                            "overdue",
                            "solved",
                            "quarantine",
                            "all"
                        ],
                        "default": "open"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "new",
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved",
                            "closed"
                        ]
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ]
                    },
                    "assignee": {
                        "type": "string",
                        "description": "`me`, `unassigned`, or an agent id."
                    },
                    "tag": {
                        "type": "string"
                    },
                    "requester_email": {
                        "type": "string",
                        "format": "email"
                    },
                    "q": {
                        "type": "string",
                        "description": "Search subject, requester email/name and preview, or a ticket number (`42` or `#42`). Up to 200 characters."
                    },
                    "sort": {
                        "type": "string",
                        "description": "Default `updated`.",
                        "enum": [
                            "updated",
                            "created",
                            "priority",
                            "due"
                        ],
                        "default": "updated"
                    },
                    "dir": {
                        "type": "string",
                        "description": "Applies to `updated` and `created`. Default `desc`.",
                        "enum": [
                            "asc",
                            "desc"
                        ],
                        "default": "desc"
                    },
                    "page": {
                        "type": "integer",
                        "minimum": 1,
                        "default": 1
                    },
                    "per_page": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100,
                        "default": 25
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_list": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "view": {
                        "type": "string",
                        "enum": [
                            "mine",
                            "unassigned",
                            "open",
                            "pending",
                            "overdue",
                            "solved",
                            "quarantine",
                            "all"
                        ]
                    },
                    "rows": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketSummary"
                        }
                    },
                    "total": {
                        "type": "integer"
                    },
                    "page": {
                        "type": "integer"
                    },
                    "pages": {
                        "type": "integer"
                    },
                    "per_page": {
                        "type": "integer"
                    },
                    "counts": {
                        "$ref": "#/components/schemas/TicketViewCounts"
                    },
                    "me": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/TicketAgent"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "ok",
                    "rows",
                    "total",
                    "page",
                    "pages"
                ]
            },
            "TicketAction_get": {
                "type": "object",
                "title": "get",
                "description": "Read one ticket with its messages, forward threads, recent events, participants and delivery status. Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "get"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "include_notes": {
                        "type": "boolean",
                        "description": "Include internal and sensitive notes. Default true.",
                        "default": true
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_get": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "ticket": {
                        "$ref": "#/components/schemas/TicketDetail"
                    },
                    "messages": {
                        "type": "array",
                        "description": "Customer timeline, oldest first (forward messages are under `threads`).",
                        "items": {
                            "$ref": "#/components/schemas/TicketMessage"
                        }
                    },
                    "threads": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketThread"
                        }
                    },
                    "events": {
                        "type": "array",
                        "description": "Latest 100 events, newest first.",
                        "items": {
                            "$ref": "#/components/schemas/TicketEvent"
                        }
                    },
                    "viewers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "agent_id": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "typing": {
                                    "type": "boolean"
                                }
                            }
                        }
                    },
                    "requester_tickets": {
                        "type": "array",
                        "description": "Up to 5 other tickets from the same requester.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "number": {
                                    "type": "integer"
                                },
                                "subject": {
                                    "type": "string"
                                },
                                "status": {
                                    "type": "string"
                                },
                                "updated_at": {
                                    "type": [
                                        "string",
                                        "null"
                                    ],
                                    "format": "date-time"
                                }
                            }
                        }
                    },
                    "participants": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketParticipant"
                        }
                    },
                    "delivery": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketDeliveryBadge"
                        }
                    },
                    "actions": {
                        "type": "object",
                        "properties": {
                            "can_reply": {
                                "type": "boolean"
                            },
                            "can_note": {
                                "type": "boolean"
                            },
                            "can_forward": {
                                "type": "boolean"
                            },
                            "can_assign_others": {
                                "type": "boolean"
                            },
                            "can_merge": {
                                "type": "boolean"
                            },
                            "can_solve": {
                                "type": "boolean"
                            },
                            "can_reopen": {
                                "type": "boolean"
                            }
                        }
                    },
                    "me": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/TicketAgent"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "ok",
                    "ticket",
                    "messages"
                ]
            },
            "TicketAction_poll": {
                "type": "object",
                "title": "poll",
                "description": "Cheap change check: view counts, the latest event and message ids, and which tickets changed. Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "poll"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "since_event_id": {
                        "type": "integer",
                        "description": "`last_event_id` from your previous poll. `changed` is true when newer events exist."
                    },
                    "updated_since": {
                        "type": "string",
                        "description": "ISO 8601 time. Returns up to 200 ticket numbers updated after it.",
                        "format": "date-time"
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_poll": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "counts": {
                        "$ref": "#/components/schemas/TicketViewCounts"
                    },
                    "last_event_id": {
                        "type": "integer"
                    },
                    "last_message_id": {
                        "type": "integer"
                    },
                    "changed": {
                        "type": "boolean"
                    },
                    "updated_numbers": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "ts": {
                        "type": "string",
                        "format": "date-time"
                    }
                },
                "required": [
                    "ok",
                    "last_event_id",
                    "changed"
                ]
            },
            "TicketAction_agents": {
                "type": "object",
                "title": "agents",
                "description": "List the store's ticket agents (use their ids with `assign`, `list` and `bulk_update`). Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "agents"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_agents": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "agents": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketAgent"
                        }
                    },
                    "me": {
                        "oneOf": [
                            {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/TicketAgent"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "role": {
                                                "type": "string",
                                                "enum": [
                                                    "viewer",
                                                    "chat",
                                                    "admin",
                                                    "owner"
                                                ]
                                            }
                                        }
                                    }
                                ]
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "ok",
                    "agents"
                ]
            },
            "TicketAction_settings_get": {
                "type": "object",
                "title": "settings_get",
                "description": "Read the store's ticket settings (SLA, mail, portal, inbound address). Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "settings_get"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_settings_get": {
                "allOf": [
                    {
                        "type": "object",
                        "properties": {
                            "ok": {
                                "type": "boolean",
                                "const": true
                            }
                        },
                        "required": [
                            "ok"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/TicketSettings"
                    }
                ]
            },
            "TicketAction_suppressions_list": {
                "type": "object",
                "title": "suppressions_list",
                "description": "List email addresses that ticket mail is not sent to (bounces, complaints, manual blocks). Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "suppressions_list"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_suppressions_list": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "suppressions": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketSuppression"
                        }
                    }
                },
                "required": [
                    "ok",
                    "suppressions"
                ]
            },
            "TicketAction_macros_list": {
                "type": "object",
                "title": "macros_list",
                "description": "List saved reply macros. Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "macros_list"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_macros_list": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "macros": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketMacro"
                        }
                    }
                },
                "required": [
                    "ok",
                    "macros"
                ]
            },
            "TicketAction_attachment_get": {
                "type": "object",
                "title": "attachment_get",
                "description": "Download one stored attachment as base64. Needs `tickets:read` or higher.",
                "x-required-scope": "tickets:read",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "attachment_get"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "attachment_id": {
                        "type": "integer",
                        "description": "`id` from a message's `attachments`.",
                        "minimum": 1
                    }
                },
                "required": [
                    "action",
                    "number",
                    "attachment_id"
                ]
            },
            "TicketResult_attachment_get": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "attachment": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "filename": {
                                "type": "string"
                            },
                            "content_type": {
                                "type": "string"
                            },
                            "size": {
                                "type": "integer"
                            },
                            "content_base64": {
                                "type": "string",
                                "contentEncoding": "base64"
                            }
                        }
                    }
                },
                "required": [
                    "ok",
                    "attachment"
                ]
            },
            "TicketAction_reports": {
                "type": "object",
                "title": "reports",
                "description": "SLA and CSAT performance for a date range: first-response and resolution times (avg and median) by priority, channel and assignee, SLA breaches, daily backlog, CSAT trend and comments. Merged and quarantined tickets are excluded. Dates are inclusive and use the SLA calendar timezone (UTC when none is set). Admin only (per-agent numbers): needs `tickets:admin`.",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "reports"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "from": {
                        "type": "string",
                        "format": "date",
                        "description": "First day (YYYY-MM-DD). Default: `days` days ending at `to`."
                    },
                    "to": {
                        "type": "string",
                        "format": "date",
                        "description": "Last day (YYYY-MM-DD). Default: today."
                    },
                    "days": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 366,
                        "default": 30,
                        "description": "Range length when `from` is omitted. Ranges over 366 days fail with `range_too_long`."
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_reports": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "range": {
                        "type": "object",
                        "properties": {
                            "from": {
                                "type": "string",
                                "format": "date"
                            },
                            "to": {
                                "type": "string",
                                "format": "date"
                            },
                            "days": {
                                "type": "integer"
                            },
                            "timezone": {
                                "type": "string"
                            }
                        }
                    },
                    "generated_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "summary": {
                        "allOf": [
                            {
                                "$ref": "#/components/schemas/TicketReportGroup"
                            }
                        ],
                        "type": "object",
                        "properties": {
                            "backlog_end": {
                                "type": "integer"
                            },
                            "csat": {
                                "type": "object",
                                "properties": {
                                    "responses": {
                                        "type": "integer"
                                    },
                                    "average": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "satisfied_pct": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "distribution": {
                                        "type": "object",
                                        "description": "Responses per score 1-5.",
                                        "additionalProperties": {
                                            "type": "integer"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "by_priority": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketReportGroup"
                        }
                    },
                    "by_channel": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketReportGroup"
                        }
                    },
                    "by_agent": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketReportGroup"
                        }
                    },
                    "daily": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "date": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "created": {
                                    "type": "integer"
                                },
                                "solved": {
                                    "type": "integer"
                                },
                                "backlog": {
                                    "type": "integer",
                                    "description": "Unresolved tickets at the end of the day."
                                },
                                "sla_breaches": {
                                    "type": "integer"
                                },
                                "csat_responses": {
                                    "type": "integer"
                                },
                                "csat_average": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "csat_weekly": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "week_start": {
                                    "type": "string",
                                    "format": "date"
                                },
                                "responses": {
                                    "type": "integer"
                                },
                                "average": {
                                    "type": [
                                        "number",
                                        "null"
                                    ]
                                }
                            }
                        }
                    },
                    "csat_comments": {
                        "type": "array",
                        "description": "Latest 50 non-empty comments.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "number": {
                                    "type": "integer"
                                },
                                "subject": {
                                    "type": "string"
                                },
                                "priority": {
                                    "type": "string"
                                },
                                "score": {
                                    "type": "integer"
                                },
                                "comment": {
                                    "type": "string"
                                },
                                "created_at": {
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    }
                },
                "required": [
                    "ok",
                    "range",
                    "summary",
                    "by_priority",
                    "by_channel",
                    "by_agent",
                    "daily",
                    "csat_weekly",
                    "csat_comments"
                ]
            },
            "TicketReportGroup": {
                "type": "object",
                "description": "Metrics for one group. Times are wall-clock minutes (1 decimal).",
                "properties": {
                    "key": {
                        "type": "string",
                        "description": "Priority, channel (origin) or agent id; empty = unassigned."
                    },
                    "label": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string",
                        "description": "by_agent only."
                    },
                    "created": {
                        "type": "integer",
                        "description": "Tickets created in the range."
                    },
                    "solved": {
                        "type": "integer",
                        "description": "Tickets resolved (solved or closed) in the range."
                    },
                    "first_response": {
                        "allOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "count": {
                                        "type": "integer"
                                    },
                                    "avg_minutes": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "median_minutes": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        ],
                        "type": "object",
                        "properties": {
                            "awaiting": {
                                "type": "integer",
                                "description": "Created in range, no public agent reply yet."
                            }
                        },
                        "description": "First public agent reply minus creation, for tickets created in the range (agent-originated tickets excluded)."
                    },
                    "resolution": {
                        "allOf": [
                            {
                                "type": "object",
                                "properties": {
                                    "count": {
                                        "type": "integer"
                                    },
                                    "avg_minutes": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    },
                                    "median_minutes": {
                                        "type": [
                                            "number",
                                            "null"
                                        ]
                                    }
                                }
                            }
                        ],
                        "description": "Latest solve/close minus creation, for tickets resolved in the range."
                    },
                    "sla_breaches": {
                        "type": "integer",
                        "description": "Missed first/next response windows (SLA job events) in the range."
                    },
                    "sla_breaches_first_response": {
                        "type": "integer"
                    },
                    "breached_tickets": {
                        "type": "integer"
                    },
                    "resolution_breaches": {
                        "type": "integer",
                        "description": "Tickets resolved in the range after their resolution due time."
                    }
                }
            },
            "TicketAction_create": {
                "type": "object",
                "title": "create",
                "description": "Open a ticket. Assigning anyone other than yourself needs admin rights. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "create"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "body": {
                        "type": "string",
                        "description": "First message (required)."
                    },
                    "subject": {
                        "type": "string",
                        "description": "Up to 300 characters. Defaults to the start of the body."
                    },
                    "requester_email": {
                        "type": "string",
                        "description": "Customer email. Required with `as_agent_reply`.",
                        "format": "email"
                    },
                    "requester_name": {
                        "type": "string"
                    },
                    "priority": {
                        "type": "string",
                        "description": "Default `normal`.",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ],
                        "default": "normal"
                    },
                    "type": {
                        "type": "string",
                        "description": "Up to 32 characters."
                    },
                    "tags": {
                        "description": "Replaces the tag list. Array or comma-separated string; tags are lower-cased, limited to `a-z 0-9 _ -` (spaces become `-`), 40 characters each, 20 tags.",
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "origin": {
                        "type": "string",
                        "description": "Default `agent`. Integrations should send `api`.",
                        "enum": [
                            "email",
                            "web_form",
                            "chat",
                            "agent",
                            "api"
                        ],
                        "default": "agent"
                    },
                    "as_agent_reply": {
                        "type": "boolean",
                        "description": "Store the first message as an agent reply and email it to the requester. Once sent the status becomes `pending_customer`. If the email cannot be sent the ticket is still created and the call still returns `ok: true`; the status then stays unchanged, so check `get` (`delivery`) when it matters."
                    },
                    "send_ack": {
                        "type": "boolean",
                        "description": "Email the requester an \"we got your request\" receipt."
                    },
                    "assignee_ids": {
                        "type": "array",
                        "description": "Up to 20 agent ids.",
                        "items": {
                            "type": "string",
                            "description": "Agent id (UUID) from the `agents` action.",
                            "format": "uuid"
                        },
                        "maxItems": 20
                    },
                    "assign_self": {
                        "type": "boolean",
                        "description": "Assign the acting agent."
                    }
                },
                "required": [
                    "action",
                    "body"
                ]
            },
            "TicketResult_create": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "created": {
                        "type": "boolean",
                        "const": true
                    }
                },
                "required": [
                    "ok",
                    "number",
                    "created"
                ]
            },
            "TicketAction_reply": {
                "type": "object",
                "title": "reply",
                "description": "Send a public reply to the requester and CC participants by email. Replying to an unassigned ticket assigns it to the acting agent. Nothing is saved when the email cannot be sent (`mail_failed`, 502). Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "reply"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "body": {
                        "type": "string",
                        "description": "Plain text, up to 50,000 characters."
                    },
                    "status_after": {
                        "type": "string",
                        "description": "Status after the reply. Default `pending_customer`.",
                        "enum": [
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved"
                        ],
                        "default": "pending_customer"
                    },
                    "cc": {
                        "type": "array",
                        "description": "Up to 20 addresses, added to the ticket as CC participants (new ones send `ticket.participant_changed`). They stay on the ticket even if the reply then fails to send.",
                        "items": {
                            "type": "string",
                            "format": "email"
                        },
                        "maxItems": 20
                    },
                    "cc_on_reply": {
                        "type": "boolean",
                        "description": "Send one message (To requester, Cc participants) instead of one message per person. Implied when `cc` is set."
                    },
                    "attachments": {
                        "type": "array",
                        "description": "Up to 10 files, 5 MiB in total (decoded), sent with the reply and stored on the message. Executable and script types (for example `.exe`, `.js`, `.bat`) are refused with `blocked_attachment_type` and the file's `filename`. The whole request body is capped at 8,000,000 characters.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "filename": {
                                    "type": "string",
                                    "description": "File name (path separators are stripped; up to 180 characters)."
                                },
                                "content_type": {
                                    "type": "string",
                                    "description": "MIME type. Default `application/octet-stream`."
                                },
                                "content_base64": {
                                    "type": "string",
                                    "description": "File bytes, base64-encoded.",
                                    "contentEncoding": "base64"
                                }
                            },
                            "required": [
                                "filename",
                                "content_base64"
                            ]
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "action",
                    "number",
                    "body"
                ]
            },
            "TicketResult_reply": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved"
                        ]
                    },
                    "recipients": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "ok",
                    "number",
                    "status"
                ]
            },
            "TicketAction_note": {
                "type": "object",
                "title": "note",
                "description": "Add an internal note (never emailed to the customer). `@name` mentions add those agents as watchers and notify them. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "note"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "body": {
                        "type": "string",
                        "description": "Up to 50,000 characters."
                    },
                    "sensitive": {
                        "type": "boolean",
                        "description": "Store as a sensitive note (credentials). Its text is never put in notification mail or the list preview. `contains_credentials: true` or `kind: \"sensitive\"` do the same."
                    }
                },
                "required": [
                    "action",
                    "number",
                    "body"
                ]
            },
            "TicketResult_note": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "internal_note",
                            "sensitive"
                        ]
                    }
                },
                "required": [
                    "ok",
                    "number",
                    "kind"
                ]
            },
            "TicketAction_update": {
                "type": "object",
                "title": "update",
                "description": "Change status, priority, tags, type or subject. Only fields you send change. Setting status `closed` needs admin rights (`forbidden` otherwise). Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "update"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "status": {
                        "type": "string",
                        "description": "New status. `closed` needs admin rights.",
                        "enum": [
                            "new",
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved",
                            "closed"
                        ]
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ]
                    },
                    "tags": {
                        "description": "Replaces the tag list. Array or comma-separated string; tags are lower-cased, limited to `a-z 0-9 _ -` (spaces become `-`), 40 characters each, 20 tags.",
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "type": {
                        "type": "string",
                        "description": "Free-form ticket type (up to 32 characters)."
                    },
                    "subject": {
                        "type": "string",
                        "description": "New subject (up to 300 characters; blank is ignored)."
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_update": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "ticket": {
                        "oneOf": [
                            {
                                "$ref": "#/components/schemas/TicketSummary"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    }
                },
                "required": [
                    "ok",
                    "ticket"
                ]
            },
            "TicketAction_assign": {
                "type": "object",
                "title": "assign",
                "description": "Add or remove assignees and set the primary assignee. Changing anyone other than yourself needs admin rights. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "assign"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "add": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "Agent id (UUID) from the `agents` action.",
                            "format": "uuid"
                        },
                        "maxItems": 20
                    },
                    "remove": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "Agent id (UUID) from the `agents` action.",
                            "format": "uuid"
                        },
                        "maxItems": 20
                    },
                    "primary": {
                        "type": "string",
                        "description": "Agent id (UUID) from the `agents` action.",
                        "format": "uuid"
                    },
                    "self": {
                        "type": "boolean",
                        "description": "Add the acting agent."
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_assign": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "assignees": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketAssignee"
                        }
                    },
                    "watchers": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketAssignee"
                        }
                    },
                    "count": {
                        "type": "integer"
                    }
                },
                "required": [
                    "ok",
                    "number"
                ]
            },
            "TicketAction_watch": {
                "type": "object",
                "title": "watch",
                "description": "Watch a ticket (get notified without being assigned). Another agent's id needs admin rights. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "watch"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "agent_id": {
                        "type": "string",
                        "description": "Default: the acting agent.",
                        "format": "uuid"
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_watch": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "watching": {
                        "type": "boolean",
                        "const": true
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_unwatch": {
                "type": "object",
                "title": "unwatch",
                "description": "Stop watching a ticket. Another agent's id needs admin rights. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "unwatch"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "agent_id": {
                        "type": "string",
                        "description": "Default: the acting agent.",
                        "format": "uuid"
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_unwatch": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "watching": {
                        "type": "boolean",
                        "const": false
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_participants_add": {
                "type": "object",
                "title": "participants_add",
                "description": "Add a CC participant who receives public replies. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "participants_add"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "name": {
                        "type": "string"
                    }
                },
                "required": [
                    "action",
                    "number",
                    "email"
                ]
            },
            "TicketResult_participants_add": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "participants": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketParticipant"
                        }
                    }
                },
                "required": [
                    "ok",
                    "participants"
                ]
            },
            "TicketAction_participants_remove": {
                "type": "object",
                "title": "participants_remove",
                "description": "Remove a CC participant. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "participants_remove"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    }
                },
                "required": [
                    "action",
                    "number",
                    "email"
                ]
            },
            "TicketResult_participants_remove": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "participants": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/TicketParticipant"
                        }
                    }
                },
                "required": [
                    "ok",
                    "participants"
                ]
            },
            "TicketAction_forward_create": {
                "type": "object",
                "title": "forward_create",
                "description": "Start a private forward thread: email a third party (supplier, courier) about the ticket. Replies come back into the thread, not the customer timeline. Up to 100 threads per ticket and 50 recipients per message. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "forward_create"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "body": {
                        "type": "string",
                        "description": "Up to 50,000 characters."
                    },
                    "to": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "email"
                                }
                            },
                            {
                                "type": "string",
                                "description": "Comma-, semicolon- or newline-separated list."
                            }
                        ],
                        "description": "At least one address."
                    },
                    "cc": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "email"
                                }
                            },
                            {
                                "type": "string",
                                "description": "Comma-, semicolon- or newline-separated list."
                            }
                        ]
                    },
                    "bcc": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "email"
                                }
                            },
                            {
                                "type": "string",
                                "description": "Comma-, semicolon- or newline-separated list."
                            }
                        ]
                    },
                    "subject": {
                        "type": "string",
                        "description": "Defaults to the ticket subject."
                    },
                    "quote_message_id": {
                        "type": "integer",
                        "description": "Quote a customer or public-reply message from the ticket timeline."
                    },
                    "attachments": {
                        "type": "array",
                        "description": "Up to 10 files, 5 MiB in total (decoded). The whole request body is capped at 8,000,000 characters.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "filename": {
                                    "type": "string",
                                    "description": "File name (path separators are stripped; up to 180 characters)."
                                },
                                "content_type": {
                                    "type": "string",
                                    "description": "MIME type. Default `application/octet-stream`."
                                },
                                "content_base64": {
                                    "type": "string",
                                    "description": "File bytes, base64-encoded.",
                                    "contentEncoding": "base64"
                                }
                            },
                            "required": [
                                "filename",
                                "content_base64"
                            ]
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "action",
                    "number",
                    "body",
                    "to"
                ]
            },
            "TicketResult_forward_create": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "thread_id": {
                        "type": "integer"
                    }
                },
                "required": [
                    "ok",
                    "thread_id"
                ]
            },
            "TicketAction_forward_reply": {
                "type": "object",
                "title": "forward_reply",
                "description": "Send another message on a forward thread. Addresses you pass are added to the thread's existing recipients. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "forward_reply"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "thread_id": {
                        "type": "integer",
                        "minimum": 1
                    },
                    "body": {
                        "type": "string",
                        "description": "Up to 50,000 characters."
                    },
                    "to": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "email"
                                }
                            },
                            {
                                "type": "string",
                                "description": "Comma-, semicolon- or newline-separated list."
                            }
                        ]
                    },
                    "cc": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "email"
                                }
                            },
                            {
                                "type": "string",
                                "description": "Comma-, semicolon- or newline-separated list."
                            }
                        ]
                    },
                    "bcc": {
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "format": "email"
                                }
                            },
                            {
                                "type": "string",
                                "description": "Comma-, semicolon- or newline-separated list."
                            }
                        ]
                    },
                    "attachments": {
                        "type": "array",
                        "description": "Up to 10 files, 5 MiB in total (decoded). The whole request body is capped at 8,000,000 characters.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "filename": {
                                    "type": "string",
                                    "description": "File name (path separators are stripped; up to 180 characters)."
                                },
                                "content_type": {
                                    "type": "string",
                                    "description": "MIME type. Default `application/octet-stream`."
                                },
                                "content_base64": {
                                    "type": "string",
                                    "description": "File bytes, base64-encoded.",
                                    "contentEncoding": "base64"
                                }
                            },
                            "required": [
                                "filename",
                                "content_base64"
                            ]
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "action",
                    "number",
                    "thread_id",
                    "body"
                ]
            },
            "TicketResult_forward_reply": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "thread_id": {
                        "type": "integer"
                    }
                },
                "required": [
                    "ok",
                    "thread_id"
                ]
            },
            "TicketAction_presence": {
                "type": "object",
                "title": "presence",
                "description": "Mark the acting agent as viewing (and optionally typing on) a ticket; returns the other agents seen in the last 30 seconds. Meant for desk UIs. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "presence"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    },
                    "typing": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_presence": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "viewers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "agent_id": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "typing": {
                                    "type": "boolean"
                                }
                            }
                        }
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_convert_from_chat": {
                "type": "object",
                "title": "convert_from_chat",
                "description": "Turn a chat transcript into a ticket. Idempotent per `chat_ref`: a second call returns the existing ticket with `created: false`. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "convert_from_chat"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "chat_ref": {
                        "type": "string",
                        "description": "`store:<id>` (or `platform:<id>` on Seekmodo's own inbox). Id: 1-64 of `A-Z a-z 0-9 _ -`.",
                        "pattern": "^(platform|store):[A-Za-z0-9_-]{1,64}$"
                    },
                    "transcript": {
                        "type": "array",
                        "description": "Up to 500 lines. Required for `store:` refs.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "role": {
                                    "type": "string",
                                    "description": "Default `user`."
                                },
                                "content": {
                                    "type": "string",
                                    "description": "Up to 20,000 characters."
                                },
                                "date": {
                                    "type": "string"
                                },
                                "admin_name": {
                                    "type": "string"
                                }
                            }
                        },
                        "maxItems": 500
                    },
                    "requester_email": {
                        "type": "string",
                        "format": "email"
                    },
                    "requester_name": {
                        "type": "string"
                    },
                    "subject": {
                        "type": "string"
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ]
                    },
                    "assign_self": {
                        "type": "boolean",
                        "description": "Default true.",
                        "default": true
                    }
                },
                "required": [
                    "action",
                    "chat_ref"
                ]
            },
            "TicketResult_convert_from_chat": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "created": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "ok",
                    "number",
                    "created"
                ]
            },
            "TicketAction_quarantine_promote": {
                "type": "object",
                "title": "quarantine_promote",
                "description": "Release a ticket held as suspected spam into the normal queue (starts its SLA clocks and sends `ticket.created` webhooks). Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "quarantine_promote"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_quarantine_promote": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "quarantined": {
                        "type": "boolean",
                        "const": false
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_quarantine_reject": {
                "type": "object",
                "title": "quarantine_reject",
                "description": "Close a quarantined ticket as spam (status `closed`, sends `ticket.status_changed`). No customer mail is sent. Only for tickets in quarantine: any other ticket answers `not_quarantined` (400). Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "quarantine_reject"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket number (the per-store `#42`, not an internal id).",
                        "minimum": 1
                    }
                },
                "required": [
                    "action",
                    "number"
                ]
            },
            "TicketResult_quarantine_reject": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string",
                        "const": "closed"
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_settings_set": {
                "type": "object",
                "title": "settings_set",
                "description": "Change ticket settings and return them. `notify_email` (the acting agent's own notifications) works with `tickets:write`; every other field needs admin rights (`forbidden`, 403, otherwise). Only fields you send change. Needs `tickets:write` or higher.",
                "x-required-scope": "tickets:write",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "settings_set"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "notify_email": {
                        "type": "boolean",
                        "description": "Email the acting agent about ticket activity."
                    },
                    "sla_policy": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "auto_close_days": {
                        "type": "integer",
                        "description": "1-60.",
                        "minimum": 1,
                        "maximum": 60
                    },
                    "customer_lifecycle_mail": {
                        "type": "boolean"
                    },
                    "sla_calendar": {
                        "type": "object",
                        "additionalProperties": true
                    },
                    "csat_enabled": {
                        "type": "boolean"
                    },
                    "reopen_within_days": {
                        "type": "integer",
                        "description": "Days after closing during which a customer reply reopens the ticket instead of starting a new one. 0-90; out-of-range values are clamped and 0 turns reopening off.",
                        "minimum": 0,
                        "maximum": 90
                    },
                    "portal_participants_manage": {
                        "type": "boolean",
                        "description": "Whether CC participants (not only the requester) may add and remove participants in the customer portal."
                    },
                    "portal_participants_status": {
                        "type": "boolean",
                        "description": "Whether CC participants (not only the requester) may change the ticket status in the customer portal."
                    },
                    "portal_daily_caps": {
                        "type": "object",
                        "description": "Admin only. Lower this store's daily portal limits. Send only the keys to change; `null` (or empty) resets a key to the Seekmodo maximum. Values above the maximum are clamped to it, values below 1 to 1.",
                        "properties": {
                            "signup": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1
                            },
                            "reset": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1
                            },
                            "ticket": {
                                "type": [
                                    "integer",
                                    "null"
                                ],
                                "minimum": 1
                            }
                        }
                    },
                    "spam_allowlist": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "email_logo_url": {
                        "type": "string",
                        "description": "`https://` URL, up to 500 characters. Any other value (including `\"\"`) clears the logo."
                    },
                    "email_accent_color": {
                        "type": "string",
                        "description": "Hex color such as `#10B981`. Any other value (including `\"\"`) clears it back to the default."
                    },
                    "from_display_name": {
                        "type": "string",
                        "description": "Up to 80 characters."
                    },
                    "from_local_part": {
                        "type": "string",
                        "description": "Part before the `@` of the From address. Invalid values fall back to `support`."
                    },
                    "outbound_resend_api_key": {
                        "type": "string",
                        "description": "Your own Resend key for branded From addresses. `\"\"` removes it. Never returned."
                    },
                    "portal_custom_domain": {
                        "type": "string",
                        "description": "Host under your verified store domain. `\"\"` removes it."
                    },
                    "verify_portal_domain": {
                        "type": "boolean",
                        "description": "Check the portal CNAME and mark the domain verified."
                    },
                    "refresh_portal_tls": {
                        "type": "boolean",
                        "description": "Re-read the certificate status of the custom portal host from Cloudflare."
                    }
                },
                "required": [
                    "action"
                ]
            },
            "TicketResult_settings_set": {
                "allOf": [
                    {
                        "type": "object",
                        "properties": {
                            "ok": {
                                "type": "boolean",
                                "const": true
                            }
                        },
                        "required": [
                            "ok"
                        ]
                    },
                    {
                        "$ref": "#/components/schemas/TicketSettings"
                    }
                ]
            },
            "TicketAction_merge": {
                "type": "object",
                "title": "merge",
                "description": "Merge ticket `number` into ticket `into`. The source is closed (sending `ticket.status_changed`) and archived. Its messages, attachments and forward threads move to the target, and tags are combined. Its assignees are added to the target as assignees; watchers are not carried over. Its CC participants are copied to the target, and when the two tickets have different requesters the source requester is added to the target as a CC participant (each new participant sends `ticket.participant_changed`). Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "merge"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "number": {
                        "type": "integer",
                        "description": "Ticket to merge away.",
                        "minimum": 1
                    },
                    "into": {
                        "type": "integer",
                        "description": "Ticket that survives.",
                        "minimum": 1
                    }
                },
                "required": [
                    "action",
                    "number",
                    "into"
                ]
            },
            "TicketResult_merge": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "number": {
                        "type": "integer",
                        "description": "The surviving ticket."
                    },
                    "merged": {
                        "type": "integer",
                        "description": "The ticket that was merged away."
                    }
                },
                "required": [
                    "ok",
                    "number",
                    "merged"
                ]
            },
            "TicketAction_bulk_update": {
                "type": "object",
                "title": "bulk_update",
                "description": "Apply the same change to up to 100 tickets. Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "bulk_update"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "numbers": {
                        "type": "array",
                        "description": "Up to 100 ticket numbers.",
                        "items": {
                            "type": "integer"
                        },
                        "maxItems": 100
                    },
                    "status": {
                        "type": "string",
                        "description": "New status. `closed` needs admin rights.",
                        "enum": [
                            "new",
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved",
                            "closed"
                        ]
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ]
                    },
                    "tags": {
                        "description": "Replaces the tag list. Array or comma-separated string; tags are lower-cased, limited to `a-z 0-9 _ -` (spaces become `-`), 40 characters each, 20 tags.",
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "type": {
                        "type": "string",
                        "description": "Free-form ticket type (up to 32 characters)."
                    },
                    "subject": {
                        "type": "string",
                        "description": "New subject (up to 300 characters; blank is ignored)."
                    },
                    "add_tags": {
                        "description": "Tags to add (instead of replacing).",
                        "oneOf": [
                            {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            {
                                "type": "string"
                            }
                        ]
                    },
                    "assign_add": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "Agent id (UUID) from the `agents` action.",
                            "format": "uuid"
                        },
                        "maxItems": 10
                    },
                    "assign_remove": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "description": "Agent id (UUID) from the `agents` action.",
                            "format": "uuid"
                        },
                        "maxItems": 10
                    }
                },
                "required": [
                    "action",
                    "numbers"
                ]
            },
            "TicketResult_bulk_update": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "updated": {
                        "type": "integer"
                    }
                },
                "required": [
                    "ok",
                    "updated"
                ]
            },
            "TicketAction_suppressions_add": {
                "type": "object",
                "title": "suppressions_add",
                "description": "Stop sending ticket mail to an address. Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "suppressions_add"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "reason": {
                        "type": "string",
                        "description": "Up to 500 characters."
                    }
                },
                "required": [
                    "action",
                    "email"
                ]
            },
            "TicketResult_suppressions_add": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "email": {
                        "type": "string"
                    },
                    "global": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_suppressions_remove": {
                "type": "object",
                "title": "suppressions_remove",
                "description": "Allow ticket mail to an address again. Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "suppressions_remove"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "email": {
                        "type": "string",
                        "format": "email"
                    }
                },
                "required": [
                    "action",
                    "email"
                ]
            },
            "TicketResult_suppressions_remove": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "removed": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketAction_macros_set": {
                "type": "object",
                "title": "macros_set",
                "description": "Create a macro, or update one when `id` is given. Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "macros_set"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "id": {
                        "type": "integer",
                        "description": "Existing macro id to update."
                    },
                    "title": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string"
                    }
                },
                "required": [
                    "action",
                    "title",
                    "body"
                ]
            },
            "TicketResult_macros_set": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "macro": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "title": {
                                "type": "string"
                            },
                            "body": {
                                "type": "string"
                            }
                        }
                    }
                },
                "required": [
                    "ok",
                    "macro"
                ]
            },
            "TicketAction_macros_remove": {
                "type": "object",
                "title": "macros_remove",
                "description": "Delete a macro. Needs `tickets:admin`: a `tickets:write` key gets `insufficient_scope` (403). With an `acting_agent`, that person must also be a store admin or owner (`forbidden` otherwise).",
                "x-required-scope": "tickets:admin",
                "properties": {
                    "action": {
                        "type": "string",
                        "const": "macros_remove"
                    },
                    "acting_agent": {
                        "$ref": "#/components/schemas/TicketActingAgent"
                    },
                    "id": {
                        "type": "integer",
                        "minimum": 1
                    }
                },
                "required": [
                    "action",
                    "id"
                ]
            },
            "TicketResult_macros_remove": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean",
                        "const": true
                    },
                    "id": {
                        "type": "integer"
                    }
                },
                "required": [
                    "ok"
                ]
            },
            "TicketApiRequest": {
                "description": "Every call is one JSON object with an `action` and that action's fields.",
                "oneOf": [
                    {
                        "$ref": "#/components/schemas/TicketAction_list"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_get"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_poll"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_agents"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_settings_get"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_suppressions_list"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_macros_list"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_attachment_get"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_reports"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_create"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_reply"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_note"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_update"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_assign"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_watch"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_unwatch"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_participants_add"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_participants_remove"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_forward_create"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_forward_reply"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_presence"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_convert_from_chat"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_quarantine_promote"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_quarantine_reject"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_settings_set"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_merge"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_bulk_update"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_suppressions_add"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_suppressions_remove"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_macros_set"
                    },
                    {
                        "$ref": "#/components/schemas/TicketAction_macros_remove"
                    }
                ],
                "discriminator": {
                    "propertyName": "action",
                    "mapping": {
                        "list": "#/components/schemas/TicketAction_list",
                        "get": "#/components/schemas/TicketAction_get",
                        "poll": "#/components/schemas/TicketAction_poll",
                        "agents": "#/components/schemas/TicketAction_agents",
                        "settings_get": "#/components/schemas/TicketAction_settings_get",
                        "suppressions_list": "#/components/schemas/TicketAction_suppressions_list",
                        "macros_list": "#/components/schemas/TicketAction_macros_list",
                        "attachment_get": "#/components/schemas/TicketAction_attachment_get",
                        "reports": "#/components/schemas/TicketAction_reports",
                        "create": "#/components/schemas/TicketAction_create",
                        "reply": "#/components/schemas/TicketAction_reply",
                        "note": "#/components/schemas/TicketAction_note",
                        "update": "#/components/schemas/TicketAction_update",
                        "assign": "#/components/schemas/TicketAction_assign",
                        "watch": "#/components/schemas/TicketAction_watch",
                        "unwatch": "#/components/schemas/TicketAction_unwatch",
                        "participants_add": "#/components/schemas/TicketAction_participants_add",
                        "participants_remove": "#/components/schemas/TicketAction_participants_remove",
                        "forward_create": "#/components/schemas/TicketAction_forward_create",
                        "forward_reply": "#/components/schemas/TicketAction_forward_reply",
                        "presence": "#/components/schemas/TicketAction_presence",
                        "convert_from_chat": "#/components/schemas/TicketAction_convert_from_chat",
                        "quarantine_promote": "#/components/schemas/TicketAction_quarantine_promote",
                        "quarantine_reject": "#/components/schemas/TicketAction_quarantine_reject",
                        "settings_set": "#/components/schemas/TicketAction_settings_set",
                        "merge": "#/components/schemas/TicketAction_merge",
                        "bulk_update": "#/components/schemas/TicketAction_bulk_update",
                        "suppressions_add": "#/components/schemas/TicketAction_suppressions_add",
                        "suppressions_remove": "#/components/schemas/TicketAction_suppressions_remove",
                        "macros_set": "#/components/schemas/TicketAction_macros_set",
                        "macros_remove": "#/components/schemas/TicketAction_macros_remove"
                    }
                }
            },
            "TicketApiResult": {
                "description": "Result for the action you sent (see `TicketResult_<action>`). Successful results always have `ok: true`.",
                "oneOf": [
                    {
                        "$ref": "#/components/schemas/TicketResult_list"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_get"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_poll"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_agents"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_settings_get"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_suppressions_list"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_macros_list"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_attachment_get"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_reports"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_create"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_reply"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_note"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_update"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_assign"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_watch"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_unwatch"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_participants_add"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_participants_remove"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_forward_create"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_forward_reply"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_presence"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_convert_from_chat"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_quarantine_promote"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_quarantine_reject"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_settings_set"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_merge"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_bulk_update"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_suppressions_add"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_suppressions_remove"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_macros_set"
                    },
                    {
                        "$ref": "#/components/schemas/TicketResult_macros_remove"
                    }
                ]
            },
            "TicketWebhookTicket": {
                "type": "object",
                "properties": {
                    "number": {
                        "type": "integer"
                    },
                    "subject": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "new",
                            "open",
                            "pending_customer",
                            "on_hold",
                            "solved",
                            "closed"
                        ]
                    },
                    "priority": {
                        "type": "string",
                        "enum": [
                            "low",
                            "normal",
                            "high",
                            "urgent"
                        ]
                    },
                    "type": {
                        "type": "string"
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "requester_name": {
                        "type": "string"
                    },
                    "requester_email": {
                        "type": "string"
                    },
                    "origin": {
                        "type": "string",
                        "enum": [
                            "email",
                            "web_form",
                            "chat",
                            "agent",
                            "api"
                        ]
                    },
                    "message_count": {
                        "type": "integer"
                    },
                    "assignee_ids": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "primary_assignee_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "solved_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketWebhookActor": {
                "type": "object",
                "description": "Who caused the event. `agent_id` is null for system and customer actions.",
                "properties": {
                    "agent_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string"
                    }
                }
            },
            "TicketWebhookMessage": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "customer",
                            "public_reply"
                        ]
                    },
                    "channel": {
                        "type": "string"
                    },
                    "author_name": {
                        "type": "string"
                    },
                    "author_email": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string",
                        "description": "Plain text, cut at 10,000 characters."
                    },
                    "body_truncated": {
                        "type": "boolean"
                    },
                    "attachment_count": {
                        "type": "integer"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                }
            },
            "TicketWebhook_ticket_created": {
                "type": "object",
                "description": "Sent when a ticket is created, and when a quarantined ticket is released (then `data.change.released_from_quarantine` is true).",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id (`evt_...`). The same as the `Seekmodo-Event-Id` header and unchanged on retries and redeliveries; use it to drop duplicates."
                    },
                    "type": {
                        "type": "string",
                        "const": "ticket.created"
                    },
                    "api_version": {
                        "type": "string",
                        "const": "2026-11-21"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the event happened. Unchanged on retries and redeliveries."
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "ticket": {
                                "$ref": "#/components/schemas/TicketWebhookTicket"
                            },
                            "change": {
                                "type": "object",
                                "properties": {
                                    "released_from_quarantine": {
                                        "type": "boolean",
                                        "const": true
                                    }
                                }
                            },
                            "actor": {
                                "$ref": "#/components/schemas/TicketWebhookActor"
                            }
                        },
                        "required": [
                            "ticket"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "api_version",
                    "created_at",
                    "tenant_id",
                    "data"
                ]
            },
            "TicketWebhook_ticket_replied": {
                "type": "object",
                "description": "Sent for customer replies and agent/automated public replies. Internal notes are never sent. `data.ticket.status` is the status after the reply (for example `pending_customer`).",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id (`evt_...`). The same as the `Seekmodo-Event-Id` header and unchanged on retries and redeliveries; use it to drop duplicates."
                    },
                    "type": {
                        "type": "string",
                        "const": "ticket.replied"
                    },
                    "api_version": {
                        "type": "string",
                        "const": "2026-11-21"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the event happened. Unchanged on retries and redeliveries."
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "ticket": {
                                "$ref": "#/components/schemas/TicketWebhookTicket"
                            },
                            "change": {
                                "type": "object",
                                "properties": {
                                    "author_type": {
                                        "type": "string",
                                        "enum": [
                                            "customer",
                                            "agent",
                                            "system"
                                        ]
                                    },
                                    "channel": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                }
                            },
                            "actor": {
                                "$ref": "#/components/schemas/TicketWebhookActor"
                            },
                            "message": {
                                "$ref": "#/components/schemas/TicketWebhookMessage"
                            }
                        },
                        "required": [
                            "ticket"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "api_version",
                    "created_at",
                    "tenant_id",
                    "data"
                ]
            },
            "TicketWebhook_ticket_status_changed": {
                "type": "object",
                "description": "Sent whenever the status moves, for example `open` to `solved`. Also sent when a solved ticket is closed automatically after the auto-close period (`solved` to `closed`, actor `System`), for the source ticket of a merge (to `closed`), and when a quarantined ticket is rejected as spam (to `closed`; that ticket was never announced with `ticket.created`).",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id (`evt_...`). The same as the `Seekmodo-Event-Id` header and unchanged on retries and redeliveries; use it to drop duplicates."
                    },
                    "type": {
                        "type": "string",
                        "const": "ticket.status_changed"
                    },
                    "api_version": {
                        "type": "string",
                        "const": "2026-11-21"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the event happened. Unchanged on retries and redeliveries."
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "ticket": {
                                "$ref": "#/components/schemas/TicketWebhookTicket"
                            },
                            "change": {
                                "type": "object",
                                "properties": {
                                    "from": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "new",
                                            "open",
                                            "pending_customer",
                                            "on_hold",
                                            "solved",
                                            "closed",
                                            null
                                        ]
                                    },
                                    "to": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "enum": [
                                            "new",
                                            "open",
                                            "pending_customer",
                                            "on_hold",
                                            "solved",
                                            "closed",
                                            null
                                        ]
                                    }
                                }
                            },
                            "actor": {
                                "$ref": "#/components/schemas/TicketWebhookActor"
                            }
                        },
                        "required": [
                            "ticket"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "api_version",
                    "created_at",
                    "tenant_id",
                    "data"
                ]
            },
            "TicketWebhook_ticket_assigned": {
                "type": "object",
                "description": "Sent when someone is assigned, unassigned, or made the primary assignee.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id (`evt_...`). The same as the `Seekmodo-Event-Id` header and unchanged on retries and redeliveries; use it to drop duplicates."
                    },
                    "type": {
                        "type": "string",
                        "const": "ticket.assigned"
                    },
                    "api_version": {
                        "type": "string",
                        "const": "2026-11-21"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the event happened. Unchanged on retries and redeliveries."
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "ticket": {
                                "$ref": "#/components/schemas/TicketWebhookTicket"
                            },
                            "change": {
                                "type": "object",
                                "properties": {
                                    "action": {
                                        "type": "string",
                                        "enum": [
                                            "assigned",
                                            "unassigned",
                                            "primary_changed"
                                        ]
                                    },
                                    "agent_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    },
                                    "previous_agent_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "description": "Only on `primary_changed`."
                                    }
                                }
                            },
                            "actor": {
                                "$ref": "#/components/schemas/TicketWebhookActor"
                            }
                        },
                        "required": [
                            "ticket"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "api_version",
                    "created_at",
                    "tenant_id",
                    "data"
                ]
            },
            "TicketWebhook_ticket_participant_changed": {
                "type": "object",
                "description": "Sent when a CC participant is added or removed: by an agent (`participants_add`, `participants_remove`, reply `cc`), from the customer portal, when an inbound customer email Cc's a new address, and when a merge copies participants to the surviving ticket. Only addresses that were not already participants count as added.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id (`evt_...`). The same as the `Seekmodo-Event-Id` header and unchanged on retries and redeliveries; use it to drop duplicates."
                    },
                    "type": {
                        "type": "string",
                        "const": "ticket.participant_changed"
                    },
                    "api_version": {
                        "type": "string",
                        "const": "2026-11-21"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the event happened. Unchanged on retries and redeliveries."
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "ticket": {
                                "$ref": "#/components/schemas/TicketWebhookTicket"
                            },
                            "change": {
                                "type": "object",
                                "properties": {
                                    "action": {
                                        "type": "string",
                                        "enum": [
                                            "added",
                                            "removed"
                                        ]
                                    },
                                    "email": {
                                        "type": [
                                            "string",
                                            "null"
                                        ]
                                    }
                                }
                            },
                            "actor": {
                                "$ref": "#/components/schemas/TicketWebhookActor"
                            }
                        },
                        "required": [
                            "ticket"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "api_version",
                    "created_at",
                    "tenant_id",
                    "data"
                ]
            },
            "TicketWebhook_webhook_test": {
                "type": "object",
                "description": "Sent from **Send test event** in admin. Not tied to a ticket.",
                "properties": {
                    "id": {
                        "type": "string",
                        "description": "Event id (`evt_...`). The same as the `Seekmodo-Event-Id` header and unchanged on retries and redeliveries; use it to drop duplicates."
                    },
                    "type": {
                        "type": "string",
                        "const": "webhook.test"
                    },
                    "api_version": {
                        "type": "string",
                        "const": "2026-11-21"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "description": "When the event happened. Unchanged on retries and redeliveries."
                    },
                    "tenant_id": {
                        "type": "string"
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "endpoint_id": {
                                "type": "integer"
                            },
                            "message": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "endpoint_id",
                            "message"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "api_version",
                    "created_at",
                    "tenant_id",
                    "data"
                ]
            }
        }
    }
}
